Permanent Programming 2

Put your programming skills to the test in these challenges.

Re: Permanent Programming 2

Post by sesteves86 on Tue Nov 08, 2011 6:00 am
([msg=62868]see Re: Permanent Programming 2[/msg])

It was tought to make it under the 15 sec and to discover the 1st character problem, but it tastes good when we solve it 8-)
1st I was trying to decode the image with smallbasic, then the output I would copy-paste throught notepad to excel and get the remaining decoding there, but would take 15-20 sec to do the job.
I see that the goal is to make all the work with only 1 program.
sesteves86
New User
New User
 
Posts: 1
Joined: Tue Nov 08, 2011 5:56 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by zyewni on Thu May 10, 2012 4:18 am
([msg=66251]see Re: Permanent Programming 2[/msg])

Weirdest thing - decided I'd have a go at this mission this morning.
Had to learn to work with images in PHP - interesting and fun. So script connects, logs in, hits the challenge page, goes and gets the image.
Spent a good hour working out the next bit (cut me some slack, had the baby to care for too).

Once I had everything worked out, and had verified that my responses were making sense over and over, I added in the lines to put the solution in the post data and send it. First try, I got an error, but not the one I was expecting - "YOU HAVE ALREADY COMPLETED THIS MISSION".

This script couldn't have sent the answer during my tests, because I never added it to the post data. And it's impossible that I would have completed it before - I just learned the necessary skills this morning. Odd.

And I never did figure out how to display the image in my browser after
Code: Select all
$source = connect($sess,"missions/prog/2/PNG/",$postdata);
$image = imagecreatefromstring($source);

I tried all sorts of function calls, just kept displaying symbol soup. Everything parses fine, I just would have liked to output the image as well as debugging strings.
zyewni
New User
New User
 
Posts: 3
Joined: Sun May 06, 2012 12:28 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by wan26 on Thu Jun 21, 2012 9:55 am
([msg=67417]see Re: Permanent Programming 2[/msg])

I did this in c++ by saving the .png [set the download path to my codeblocks project directory] and pasted the answer from my terminal, for a bit I was wondering why my answer was wrong. This is the place in my function that creates morse tripped up;

Code: Select all
for (int x = 1; x<=49; x++) { // I set the max value of x to 39 because i was testing a particular image for a while, finally changed it 49 to accept more values ha

    outfile << char(array[x] - array[y]);
        y++;
    }


Glad it's over! But at least I have some nifty things to re use later. I recommend the cimg library if you're going to write it all in c++, it worked wonders.
User avatar
wan26
Experienced User
Experienced User
 
Posts: 91
Joined: Sun Jan 22, 2012 6:46 pm
Blog: View Blog (0)


Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests