I have a task with MD5 hash. I made an API call to the server and was able to get hash. Right now, I have to solve the hash and send my solution to its address.But I have never seen a problem or a coding task like this. Can anyone give me a help with this ?
import fetch from "node-fetch";
const crypto = require('crypto');
const GUID = '6a21be94-c29f-41e1-aa59-0a1029644872'
const SLUG = 'baris-savas-91533'
const baseApi = `http://career.dijitalgaraj.com/hash/${SLUG}`
const apiRequest = async () => {
const response = await fetch(baseApi, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'X-GUID': GUID
},
body: JSON.stringify({
GUID: GUID
})
})
const data = await response.json()
return data.hash
}
const HASH = await apiRequest()
console.log(HASH)
//We have splitted the hidden email address into multiple substrings, starting with first two letters and increasing by two letters in each iteration. For example:
// hello@dijitalgaraj.com => he hell hello@ hello@di hello@diji ... hello@dijitalgaraj.com
// We'll refer this substrings as "x" in the following clause.
// Each substring is hashed with the formula: md5(md5(your_email_address) + x + md5(x)) and then added all together as the hash.
// Using the information above, solve the hash, find the hidden email address and send your project to that address. The address is created uniquely for you.This is the step that I can't proceed.And also it says in notification ==>
1-The mail address can contain numbers, all english letters and special characters: + - . _ @ (understood clearly )
2-Don't try to decode or reverse-engineer md5 hash to solve the problem. ( And here I don't know what to do )
from Decoding a MD5 hash based on a given formula
No comments:
Post a Comment