Skip to content

Commit

Permalink
Merge pull request iagox86#147 from ngo/sigint_doesnt_exit
Browse files Browse the repository at this point in the history
Traps SIGINT so that an accidental Ctrl-C does not kill the whole server
  • Loading branch information
iagox86 authored Apr 9, 2020
2 parents b57d8e8 + 404a05d commit e0df5de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/dnscat2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
##

$LOAD_PATH << File.dirname(__FILE__) # A hack to make this work on 1.8/1.9

trap "SIGINT" do
puts "Ctrl-C is disabled, use exit"
end
# Create the window right away so other includes can create their own windows if they want
require 'libs/swindow'
WINDOW = SWindow.new(nil, true, { :prompt => "dnscat2> ", :name => "main" })
Expand Down

0 comments on commit e0df5de

Please sign in to comment.