Skip to content

Commit ae7a015

Browse files
committed
Changed to Puts and get_once - also forgot the timeout...
1 parent 24bc109 commit ae7a015

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/auxiliary/scanner/misc/poisonivy_control_scanner.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def initialize
2727
register_options(
2828
[
2929
OptString.new('PORTS', [true, "Ports to Check","80,8080,443,3460"]),
30+
OptInt.new('TIMEOUT', [true, "The socket connect timeout in milliseconds", 1000]),
3031
OptInt.new('CONCURRENCY', [true, "The number of concurrent ports to check per host", 10]),
3132
], self.class)
3233

@@ -58,10 +59,10 @@ def run_host(ip)
5859
}
5960
)
6061
r << [ip,port,"open",'Unknown']
61-
s.send("\x00"*0x100,0) #Send 0x100 zeros, wait for answer
62-
data = s.recv(0x100)
62+
s.puts("\x00"*0x100,0) #Send 0x100 zeros, wait for answer
63+
data = s.get_once(0x100)
6364
if data.length == 0x100
64-
data = s.recv(0x4)
65+
data = s.get_once(0x4)
6566
if data == "\xD0\x15\x00\x00" #Signature for PIVY C&C
6667
print_status("#{ip}:#{port} - C&C Server Found")
6768
r << [ip,port,"open",'Poison Ivy C&C']

0 commit comments

Comments
 (0)