daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Dec 29th, 2016 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2.  
  3. import socket
  4.  
  5. fuzzLen = 100
  6. target = '192.168.96.131'
  7. port = 21
  8. user = 'yourmom'
  9. password = 'yourmom'
  10.  
  11. # Define the FTP commands to be fuzzed
  12. commands=(["!","dir","mdelete","qc","site","mdir","sendport","size","account",
  13. "mget","put","status","append","form","mkdir","pwd","struct","ascii","get","mls",
  14. "system","bell","glob","mode","quote","sunique","binary","hash","modtime","recv",
  15. "tenex","help","mput","reget","tick","case","idle","newer","rstatus","trace","cd",
  16. "image","nmap","rhelp","type","cdup","ipany","nlist","rename","chmod","ipv4","ntrans",
  17. "umask","ipv6","open","verbose","cr","lcd","prompt","rmdir","?","delete","ls","passive",
  18. "runique","debug","macdef","proxy","send", "stor"]) #remove stor when testing is done
  19.  
  20. #loop through commands, assigning hex values in sequence
  21. for i in xrange(0, len(commands), 1):
  22.     var = 0x21 + i
  23.     fuzz = chr(var) * int(fuzzLen)
  24.     #print "Command: " + commands[i] + " | " + "hex: " + str(hex(var)) + " | " + "ASCII: " + chr(var)
  25.     print "Fuzzing " + commands[i] + " with " + str(len(fuzz)) + " " + "'" + chr(var) + "'" + "  " +  "(" + str(hex(var)) + ")"
  26.     print fuzz
  27.     try:
  28.         #setup socket and send fuzz
  29.         s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  30.         connect=s.connect((target,port))
  31.         s.recv(1024)
  32.         s.send('USER '+ user + '\r\n')
  33.         s.recv(1024)
  34.         s.send('PASS ' + password + '\r\n')
  35.         s.recv(1024)
  36.         s.send(i + ' ' + fuzz + '\r\n')
  37.         s.recv(1024)
  38.         s.send('QUIT\r\n')
  39.         s.close()
  40.         print "Fuzz sent...\n\n"
  41.     except:
  42.         print "could not send fuzz\n\n"
  43.  
  44. '''
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top