Ejemplo n.º 1
0
def main():
    r = simplerequest.SimpleRequest("csec380-core.csec.rit.edu",
                                    port=82,
                                    type="POST",
                                    resource="/getSecure")
    r.render()
    r.send()

    token = simplerequest.parse_value(r.data, "Token is:")

    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu",
        port=82,
        type="POST",
        resource="/getFlag3Challenge",
        body=f"token={token}",
    )
    r.render()
    r.send()

    captcha = simplerequest.parse_value(r.data, "following:")

    # Possible operator list
    operators = ["+", "-", "//", "*"]

    # Find the operator in the captcha
    op = list(filter(lambda operator: (operator in captcha), operators))
    op = op[0]

    # Get the numbers from the captcha
    captcha = captcha.split(op)

    if op == "//":
        captcha = int(captcha[0]) // int(captcha[1])
    elif op == "+":
        captcha = int(captcha[0]) + int(captcha[1])
    elif op == "-":
        captcha = int(captcha[0]) - int(captcha[1])
    elif op == "*":
        captcha = int(captcha[0]) * int(captcha[1])
    else:
        print("Operator unknown....")

    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu",
        port=82,
        type="POST",
        resource="/getFlag3Challenge",
        body=f"token={token}&solution={captcha}",
    )
    r.render()
    r.send()

    print(simplerequest.parse_value(r.data, "flag is"))
Ejemplo n.º 2
0
def main():
    r = simplerequest.SimpleRequest("csec380-core.csec.rit.edu",
                                    port=82,
                                    type="POST")
    r.render()
    r.send()

    print(simplerequest.parse_value(r.data, "flag is"))
Ejemplo n.º 3
0
def main():
    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu", port=82, type="POST", resource="/getSecure"
    )
    r.render()
    r.send()

    token = simplerequest.parse_value(r.data, "Token is:")

    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu",
        port=82,
        type="POST",
        resource="/getFlag2",
        body=f"token={token}",
    )
    r.render()
    r.send()

    print(simplerequest.parse_value(r.data, "flag is"))
Ejemplo n.º 4
0
def main():
    r = simplerequest.SimpleRequest("csec380-core.csec.rit.edu",
                                    port=82,
                                    type="POST",
                                    resource="/getSecure")
    r.render()
    r.send()

    token = simplerequest.parse_value(r.data, "Token is:")

    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu",
        port=82,
        type="POST",
        resource="/createAccount",
        body=f"token={token}&username=oneNutW0nder",
        agent=
        "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
    )
    r.render()
    r.send()

    password = simplerequest.parse_value(r.data, "password is")
    password = simplerequest.url_encode(password)

    r = simplerequest.SimpleRequest(
        "csec380-core.csec.rit.edu",
        port=82,
        type="POST",
        resource="/login",
        body=f"token={token}&username=oneNutW0nder&password={password}",
        agent=
        "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
    )
    r.render()
    r.send()

    print(simplerequest.parse_value(r.data, "flag is"))
Ejemplo n.º 5
0
import simplerequest
import math
import time



e = time.time()

r = simplerequest.SimpleRequest(
    "csec380-core.csec.rit.edu", port=82, type="POST", resource="/getSecure"
)

r.render()
r.send()

key = simplerequest.parse_value(r.data, "Token is:")

r = simplerequest.SimpleRequest(
    "csec380-core.csec.rit.edu", port=82, type="GET", resource="/getFlag5"
)

r.render()
r.send()

xidx = r.data.find("var x =")
yidx = r.data.find("var y =")

x = int(r.data[xidx + 8 : xidx + 12].strip(";").strip('"'))
y = int(r.data[yidx + 8 : yidx + 10].strip(";"))

i = complex(x, 3)