-2

I have the following string: "VGxkTk1GcHFTWGRhUjBacFkycENhMWx0VFRWT1IxazBUMVJXYUZwSFNUQmlWR1JxVGtSVmVVOVZjR3RhYWtFOQ%3D%3D"

and a for loop:

for(var i=0,k=3,l=643; (i<=20 && l>200) || k>8;i++,k--){
    console.count();
    }

how to get md5 ?

function show(){ var cookie = "VGxkTk1GcHFTWGRh UjBacFkycENhMWx0 VFRWT1IxazBUMVJX YUZwSFNUQmlWR1Jx VGtSVmVVOVZjR3Rh YWtFOQ%3D%3D"; for(var i=0,k=3,l=643; (i<=20 && l>200) || k>8;i++,k--){ console.count(); }

document.write("Here is your cookie: "+cookie+" It's md5, isn't!");

// To solve this  you must know about md5 hash
// Go to https://en.wikipedia.org/wiki/MD5 and read about it ;)

}

closed as unclear what you're asking by Jeff Schaller, DopeGhoti, sebasth, Kusalananda, dhag Jan 22 '18 at 17:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    The md5sum of what? – Henrik Jan 22 '18 at 16:40
  • 1
    MD5 of what, the string? How is the loop connected to the string? What kind of language is the loop written in (if it's relevant at all to the question, I don't know)? – Kusalananda Jan 22 '18 at 16:41
  • 3
    I have a cat and a rutebega. How to get aeroplane? – DopeGhoti Jan 22 '18 at 17:25
  • function show(){ var cookie = "VGxkTk1GcHFTWGRh UjBacFkycENhMWx0 VFRWT1IxazBUMVJX YUZwSFNUQmlWR1Jx VGtSVmVVOVZjR3Rh YWtFOQ%3D%3D"; for(var i=0,k=3,l=643; (i<=20 && l>200) || k>8;i++,k--){ console.count(); } document.write("Here is your cookie: "+cookie+" It's md5, isn't!"); // To solve this you must know about md5 hash // Go to en.wikipedia.org/wiki/MD5 and read about it ;) } – Sema Jan 22 '18 at 17:59
  • If this is an assignment of some sort, I really hope it's not asking you to implement MD5 by yourself, but to find the library implementation of MD5 in whatever language it is your using (javascript?) and call that routine. Maybe do a search on "javascript MD5"? – Kusalananda Jan 22 '18 at 18:10
1

Looks like the string could be base64-encoded, then URL-encoded... the "%3D%3D" at the end would be two equals signs.

Whatever it's worth, passing it through a base64 decoder results in another string that looks like valid base64 encoding. A total of three passes through the base64 decoder and you'll get something quite different-looking...

echo "VGxkTk1GcHFTWGRhUjBacFkycENhMWx0VFRWT1IxazBUMVJXYUZwSFNUQmlWR1JxVGtSVmVVOVZjR3RhYWtFOQ==" \ 
  | base64 -d | base64 -d | base64 -d |od -t x1z

results in:

0000000 35 63 34 66 32 30 64 61 62 72 30 64 62 63 39 34  >5c4f20dabr0dbc94<
0000020 66 38 39 35 61 64 62 34 6d 37 63 34 35 32 39 4a  >f895adb4m7c4529J<
0000040 64 66 30                                         >df0<

Suddenly we get all lower-case characters and numbers. And trying to base64-decode that further results in some unprintable characters and then an "invalid input" from the base64 decoder. So maybe this means something, maybe it doesn't.

It has three more characters than a standard MD5 checksum... and those three characters are all outside the list of valid md5sum characters: "r", "m" and "J". Remove those, and you'll get a hexadecimal numbert that could in theory be a MD5 checksum of something.

  • 1
    Nice detective work there Sherlock. – Kusalananda Jan 22 '18 at 17:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.