Exemplo n.º 1
0
def send_answermd5(masterData):
    sendip = masterData['ip']
    sendport = masterData['port']
    request_id = masterData['id']
    md5_hash = masterData['md5']
    ranges = masterData['ranges']

    my_ip = vra_http_request_helper.get_my_ip()
    my_port = vra_http_request_helper.get_my_port()

    print("/checkmd5: templates to try: " + str(ranges))
    result = 1
    result_string = ''
    for range in ranges:
        result_string = vra_md5.md5_crack(str(md5_hash), str(range))
        if result_string:
            result = 0
            print("cracking " + str(md5_hash) + " gave " + result_string)
            break
        else:
            print("failed to crack " + str(md5_hash))
    print("Giving back: " + str(result_string))
    jdata = json.dumps({"ip":my_ip,
                        "port":my_port,
                        "id":request_id,
                        "md5":md5_hash,
                        "result":result,
                        "resultstring":result_string
                        })
    vra_http_request_helper.send_post_request(sendip, sendport, jdata, "/answermd5")
    print("Sent /answermd5")
    return 0
Exemplo n.º 2
0
def checkmd5():
    masterData = json.loads(str(request.get_data()))

    # tocrack="68e1c85222192b83c04c0bae564b493d" # hash of koer
    print('md5 cracker starting...')
    tocrack= str(masterData['md5'])
    res=md5_crack(tocrack,"r???at")
    if res:
        print("cracking "+tocrack+" gave "+res)
    else:
        print("failed to crack "+tocrack)

    vra_checkmd5.send_answermd5(masterData, res)

    return 'success'