Example #1
0
    parser.add_argument("-N", "--no-interactive", action="store_true", default=False,
                    help="Optional switch. If set, the IPython interactive console will not start.")
    args = parser.parse_args()
    if args.no_proxy:
        args.proxy_host = ""
        args.proxy_port = ""
    elif not args.no_proxy and (args.proxy_host == "" or args.proxy_port == ""):
        print("Arguments proxyHost and proxyPort are mandatory if the switch --no-proxy is not used.")
        exit()
    return args

allBrowserTool = list()
mainBrowserTool = None

if __name__ == "__main__":
    args = parseArgs()

    #Block: Uncomment when debugging using REPL
    #args.proxy_host = ""
    #args.proxy_port = ""
    #End Block

    main(args)
    if not args.no_interactive:
        banner = '*** Nested interpreter ***'
        exit_msg = '*** Back in main python. Call ipshell() to restart ***'
        ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg)
        ipshell.set_autoindent() #Disable autoindent
        ipshell()

import time
from Tools.utils import *
from Tools.BrowserTool import BrowserTool
import Tools.SQLiTool
import Tools.XSSTool
import Tools.CryptoTool
from main import *
from IPython.terminal.embed import InteractiveShellEmbed
import base64

banner = '*** Nested interpreter ***'
exit_msg = '*** Back in main python. Call ipshell() to restart ***'
ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg)
ipshell.set_autoindent()


def example():
    for i in range(0, 10):
        mainBrowserTool.browser.refresh()
        time.sleep(1)
    mainBrowserTool.browser.get("http://www.google.com")
    time.sleep(1)
    mainBrowserTool.browser.get("http://hotmail.com")


def example_get():
    mainBrowserTool.browser.get("http://www.google.com")


example()
time.sleep(1)