Example #1
0
def checkLoginForm(html_data):
    try:
        html_proc = beatsop(html_data, "html.parser")

        loginForm = False
        checkLoginForm.new_directory_for_target = None

        forms = html_proc.findAll('form')
        if forms:
            for x in forms:
                if x.findAll('input', {'type': 'password'}) != []:
                    loginForm = True
            return loginForm
        elif html_proc.findAll('a'):

            for one_redirect_link in html_proc.findAll('a'):
                if 'login' in one_redirect_link.get(
                        'href') or 'admin' in one_redirect_link.get('href'):
                    checkLoginForm.new_directory_for_target = one_redirect_link.get(
                        'href')

                    return checkLoginForm.new_directory_for_target

    except Exception as e:
        pass
Example #2
0
def checkLoginForm(html_data):
    try:
        html_proc = beatsop(html_data, "html.parser")
        loginForm = False

        forms = html_proc.findAll('form')
        for x in forms:
            if x.findAll('input', {'type': 'password'}) != []:
                loginForm = True
        return loginForm
    except Exception:
        pass
Example #3
0
def checkLoginForm(html_data):
    try:
        html_proc = beatsop(html_data, "html.parser")
        loginForm = False

        forms = html_proc.findAll('form')
        for x in forms:
            if x.findAll('input', {'type': 'password'}) != []:
                loginForm = True
        return loginForm
    except Exception:
            pass
Example #4
0
def getInputFields(html_data):

    try:
        html_proc = beatsop(html_data, "html.parser")
        postData = {}
        inputs = []
        allInputs = ['', '']
        action = None

        forms = html_proc.findAll('form')
        for x in forms:
            if x.findAll('input', {'type': 'password'}) != []:
                inputs = x.findAll('input')

                action = x.get('action')

        allInputs[0] = inputs
        allInputs[1] = action
        return allInputs
    except Exception as e:
        pass
Example #5
0
def getInputFields(html_data):
    # TODO: Consider getting new target if 301 or 302
    try:
        html_proc = beatsop(html_data, "html.parser")
        postData = {}
        inputs = []
        allInputs = ['', '']
        action = None

        forms = html_proc.findAll('form')
        for x in forms:
            if x.findAll('input', {'type': 'password'}) != []:
                inputs = x.findAll('input')
                # Get form action and append it to the base URL
                # Not everything will have an action. Maybe log
                # that it's a login form, but couldn't attempt login
                action = x.get('action')

        allInputs[0] = inputs
        allInputs[1] = action
        return allInputs
    except Exception as e:
        print(e)
Example #6
0
def getInputFields(html_data):
    # TODO: Consider getting new target if 301 or 302
    try:
        html_proc = beatsop(html_data, "html.parser")
        postData = {}
        inputs = []
        allInputs = ['', '']
        action = None

        forms = html_proc.findAll('form')
        for x in forms:
            if x.findAll('input', {'type': 'password'}) != []:
                inputs = x.findAll('input')
                # Get form action and append it to the base URL
                # Not everything will have an action. Maybe log
                # that it's a login form, but couldn't attempt login
                action = x.get('action')

        allInputs[0] = inputs
        allInputs[1] = action
        return allInputs
    except Exception as e:
            print e