• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Phyton randomAFTP.py

Status
Not open for further replies.

Versus71

Leech
User
Joined
Nov 3, 2011
Messages
168
Reputation
0
Reaction score
304
Points
63
Credits
0
‎13 Years of Service‎
57%
This code generates random IP addresses and check them to anonymous FTP login. Usage is very simple, script name and number of ip addresses you wish to check.

Usage:

Code:
>python randomAFTP.py 100
Code:
>#!/usr/bin/python
# This was written for educational purpose and pentest only. Use it at your own risk.
# Author will be not responsible for any damage!
# !!! Special greetz for my friend sinner_01 !!!
# Toolname        : randomAFTP.py
# Coder           : baltazar a.k.a b4ltazar < [email protected]>
# Version         : 0.1
# Greetz for rsauron and low1z, great python coders
# greetz for d3hydr8, r45c4l, qk, fx0, Soul, MikiSoft, c0ax, b0ne, tek0t and all members of ex darkc0de.com, ljuska.org 

import sys, subprocess, random
from ftplib import FTP

def logo():
 print "\n|---------------------------------------------------------------|"
 print "| b4ltazar[@]gmail[dot]com                                      |"
 print "|   04/2012     randomAFTP.py    v.0.1                          |"
 print "|    b4ltazar.wordpress.com     &      ljuska.org               |"
 print "|                                                               |"
 print "|---------------------------------------------------------------|\n"
       
if sys.platform == 'linux' or sys.platform == 'linux2':
 subprocess.call("clear", shell=True)
 logo()
else:
 subprocess.call("cls", shell=True)
 logo()
 
 
if len(sys.argv) != 2:
 print "[!] Usage: python randomAFTP.py 50"
 print "[!] Please visit b4ltazar.wordpress.com & ljuska.org"
 print "[!] Thx for using this script, now exiting!"
 sys.exit(1)
 
hits = sys.argv[1]
 
def randomIP():
 ran1 = random.randrange(255) + 1
 ran2 = random.randrange(255) + 1
 ran3 = random.randrange(255) + 1
 ran4 = random.randrange(255) + 1
 randIP = "%d.%d.%d.%d" % (ran1, ran2, ran3, ran4)
 return randIP
 
def ftpanon(IP):
 print "[!] IP address: ", IP
 user = "anonymous@"+IP
 p = ""
 try:
   ftp = FTP(IP)
   ftp.login(user, p);print ""
   #ftp.login()
   ftp.retrlines('list')
   print "[!] w00t,w00t! Anonymous login successfuly!"
 except:
   pass
 
 
if __name__ == "__main__":
 print "[!] There is %s random IP addresses for checking!" % hits
 print "[!] Let's start\n"
 for x in xrange(int(hits)):
   try:
     IP = randomIP()
     ftpanon(IP)
   except:
     pass
   
 print "\n[!] Thx for using this script, please visit b4ltazar.wordpress.com & ljuska.org"
 
Status
Not open for further replies.
Back
Top