A little help with Timed 7
So I've been working on Timed 7 using PHP + GD Library, and I'm pretty sure the actual code works correctly, just not how I'm sending it to HBH. I decoded a barcode by hand and it matches up to the code my program outputs.
I'm a little confused as to what it means by a 'valid' barcode. If it means using the formula to make sure everything matches up to the check digit, then that's what I'm doing. I'm also confused as to what to set 'validity' equal to. Is it a true/false variable, or should I actually set it to 'valid' or 'invalid'?
I think my biggest problem though, is that the barcode I decode is different from the one that HBH spits out when I request it, because I do all the decoding before I connect to HBH with cURL. So if anyone can help me how to figure out how to get the barcode HBH spits out, rather than a random one, that would be great.
If anyone wants to help me more, I can PM them my code to see if there's something specific I'm doing wrong.
And I hope this isn't a spoiler, but this is the code my program outputted: 684093883049
For this barcode:
ive been working on this for a while now .. I cant seem to pull images generated by barcode.php and I cURL from it and it gives me garbage. how do I get around this? what am I missing out ? hope this is not a spoiler..
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'http://www.hellboundhackers.org/challenges/timed/timed7/barcode.php');
result:
‰PNG ��� IHDR���Ò���d���ÉÄüi���PLTEÿÿÿ���UÂÓ~���tRNS�@æØf���;IDATH‰cرñŸŸ™æ±ù
lü™ŸßàÏÃçyŒGåFåFåFåFåFåFåF冢ÜÈ�hÒˆ¸;D2����IEND®B`‚
Compromise wrote: [quote]stranac wrote: I cant seem to find out how to download the generated image. Any help would be nice. Thanks. (Using PHP)
cURL.[/quote]
OK, but if I get the page trough cURL, I can just see the url. Or are you saying I should access the image URL directly? I guess I should try that.
Hope this isn't a spoiler but it's not the part being tested by this challenge anyways. This is what you do.
- download png file from http://www.hellboundhackers.org/challenges/timed/timed7/barcode.php
- decode barcode. test validity
- POST barcode=NUMBER&validity=(valid|invalid) to http://www.hellboundhackers.org/challenges/timed/timed7/index.php
All within the specified time.
As you can see from my profile page I haven't done it (keep getting time outs) but I think this is correct.
Edited as per GTADarkDude's post.
wolfmankurd wrote: …
- POST barcode=NUMBER&validity=(valid|invalid) to http://www.hellboundhackers.org/challenges/timed/timed7/barcode.php …POST the answer to index.php, not barcode.php.
stranac wrote: Does anyone know what the time limit is on this one?
I was kinda hoping my home connection would be good enough, but it seems I'm gonna have to do it when I get back to college.
unless it's very low you should have time, cause the actual computation doesn't take long at all nor does the post.
I can easily save the barcode local, look how thick a line is(in pixels), but i dont know how i now can decode the barcode. I already Googled, but didn't find any helpfull answer. Can somebody give me a link or something to help me out?
Edit:
My Script already outputs his: 10101011110100011010001101110110011001011011101010111010010011101001000100001011101001101100101
1 = black px 0 = white px
if that spoils to mutch ill edit it. Then you could answer me per PM :)