Skip to content

Commit

Permalink
ProxyAttack
Browse files Browse the repository at this point in the history
  • Loading branch information
xbw committed Jan 6, 2014
1 parent be6cad8 commit 9606bd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions proxyattack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import rscan

readfile = 'proxylist.txt'
port = 5555

if __name__ == '__main__':
if rscan.readaddrlist(readfile):
print 'Waiting data on port',port
rscan.senddata(rscan.loadport(port))
8 changes: 4 additions & 4 deletions rscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def readiplist(listfile):
else:
break
print 'Add',total,'ip range'
return True
return total

def addport(portstart,portend=0):
global s_ports
Expand Down Expand Up @@ -356,7 +356,7 @@ def readportlist(listfile):
else:
break
print 'Add',total,'port range'
return True
return total

def addaddr(ip,port):
global s_addrlist
Expand Down Expand Up @@ -388,7 +388,7 @@ def readaddrlist(listfile):
port = string.atoi(port)
addaddr(ip,port)
print 'Add',total,'addr'
return True
return total

def addresult():
global s_addrlist,s_result
Expand Down Expand Up @@ -524,7 +524,7 @@ def loadport(port):
try:
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
s.bind(('localhost',port))
s.bind(('0.0.0.0',port))
s.listen(1)
ac,addr = s.accept()
recvlen = 8192
Expand Down

0 comments on commit 9606bd1

Please sign in to comment.