Permanent Programming 11

Put your programming skills to the test in these challenges.

Re: Permanent Programming 11

Post by fashizzlepop on Tue Nov 30, 2010 12:58 am
([msg=49639]see Re: Permanent Programming 11[/msg])

asleep777 wrote:So different question with same intent: What next?

Personally, I set up the cookie jar first, then POST with login credentials. The site stores the cookie info and then I move on to the challenge.
The glass is neither half-full nor half-empty; it's merely twice as big as it needs to be.
User avatar
fashizzlepop
Developer
Developer
 
Posts: 2303
Joined: Sat May 24, 2008 1:20 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by gsingh2011 on Sat Apr 09, 2011 1:03 pm
([msg=56187]see Re: Permanent Programming 11[/msg])

I think I'm going to end up doing this with javascript, but was anyone able to do it with another lanuage, like C/C++, Java, or Python? I'm trying it with python and I can login easily but when I try to access the programming mission page I get httperror_seek_wrapper: HTTP Error 403: request disallowed by robots.txt. Was anyone able to get around this problem?

EDIT: So I did it easily with javascript, and for anyone who wants to use python, I was using the mechanize library and I had to set_handle_robots(False) so that it wouldn't follow the rules of robots.txt.
gsingh2011
New User
New User
 
Posts: 11
Joined: Sun Mar 27, 2011 2:14 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by adamcaa on Wed Jun 01, 2011 9:27 pm
([msg=58024]see Re: Permanent Programming 11[/msg])

I've written a perl script to login in, parse the character sequence make the shift and submit the answer.
I've checked my script's output against member posts that have completed the mission and my output matches up. However I still get the 'you're answer is wrong' page.

here is the output from my script maybe I can get some pointers?

Starting...
Data String: 56 62 63 29 36 42 32 74 45 20 45
Shift: -15
Solution: GMN,39/Y<#<
Wrong Answer!
Done!

[Edit] Yes! I finally got it using Wireshark and perl module LWP::UserAgent.
Last edited by adamcaa on Thu Jun 02, 2011 10:03 pm, edited 1 time in total.
adamcaa
New User
New User
 
Posts: 10
Joined: Fri May 27, 2011 9:33 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by b33tr00t on Thu Jun 02, 2011 4:23 am
([msg=58045]see Re: Permanent Programming 11[/msg])

your solution is correct. if you are sure that you are not submitting any extra chars(a space maybe?) with with the answer then look into the field/form names and submit button. also read all the previous posts here. the answer to your problem was already posted. i could refer you to a specific post but i am sure you will find it.
User avatar
b33tr00t
New User
New User
 
Posts: 25
Joined: Thu Mar 17, 2011 1:29 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by amardeep234 on Wed Jun 15, 2011 5:06 pm
([msg=58562]see Re: Permanent Programming 11[/msg])

I just completed it in C, when I read:
Code: Select all
<h2>Congrats</h2></div><div class="light-td">Good Job, amardeep234, You have successfully completed this mission<br />

I yelled, HUZZZAAAAAH! :mrgreen:

The only shortcut I used was using libCurl, I gave up trying to write the socket code my self, I just couldn't do it. libCurl is definitely very nice, so simple to do socket programming with it and so many options :)

I don't think this a spoiler, since I'm not revealing code, simply explaining what I did (coding this will be 100x harder than what you read, though it's a guide for anyone brave enough to try this challenge in C).

I had 3 files, but 4 main things occurred (since curlHTTPrequest was used twice, using different functions):

Code: Select all
./curlHTTPRequest.o [arg] //takes INPUT arg, either GET or POST. (GET function simply GETs HTS prog11 http-page and dump it into text file, POST functions posts decoded string, along with headers etc)

./search.o // finds the STRING & SHIFT in dumped text file from curlHTTPRequest.o, clean it up & output it

./prog11-reverseAsciiShift.o [arg] //takes arguments from search.o OUTPUT (STRING/SHIFT), and does the decoding

// Then back to curlHTTPRequest, which POST the decoded string. This was the most problematic for me, and I couldn't of done it without Wireshark


I definitely learnt a lot from this.
amardeep234
New User
New User
 
Posts: 3
Joined: Tue Nov 09, 2010 1:08 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by geft on Wed Jun 22, 2011 7:31 am
([msg=58833]see Re: Permanent Programming 11[/msg])

I've done the code, but I'm clueless on what to do next. I'm a beginner who only knows basic C and C++, with hardly any knowledge in networking. How do I program a code which transmits data over the internet? What should I be learning first?
geft
New User
New User
 
Posts: 3
Joined: Wed Jun 22, 2011 7:25 am
Blog: View Blog (0)


Re: Permanent Programming 11

Post by b33tr00t on Wed Jun 22, 2011 8:02 am
([msg=58835]see Re: Permanent Programming 11[/msg])

I've done the code, but I'm clueless on what to do next. I'm a beginner who only knows basic C and C++, with hardly any knowledge in networking. How do I program a code which transmits data over the internet? What should I be learning first?


Look up socket programming. One of the convenient ways is to use libcurl.
User avatar
b33tr00t
New User
New User
 
Posts: 25
Joined: Thu Mar 17, 2011 1:29 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by wan26 on Fri Apr 06, 2012 9:11 pm
([msg=65521]see Re: Permanent Programming 11[/msg])

Well for me this was hard in c++, but isdigit helps if you're doing it this way. ios::trunc if you are going to be placing the cipher from the website in a file and running the program again to test. Also It helps to test using wireshark -and in placing it into a file i could see what went wrong in any formatting by comparing it to packets in the tcp stream.

It took me ages, but it was probably worth it for the other challanges

Curl helps alot,
User avatar
wan26
Experienced User
Experienced User
 
Posts: 91
Joined: Sun Jan 22, 2012 6:46 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by EnterQuery on Tue Jul 10, 2012 4:34 pm
([msg=67940]see Re: Permanent Programming 11[/msg])

Hi guys,

This is my very first post on the forums, so I'd like to take the time to thank all the people who have put their time into making these challenges and to those who point noobs like me in the right direction. I've learned a lot in a very short time.

I originally tried to take this challenge in Java, but I kept running in to problems related to the built in URL classes as well as the HttpComponents and HttpClient classes by Apache. I just found it to cumbersome to deal with, so I decided to try it in Python. I know doing this in JavaScript is probably the easiest way, but I want to learn more about the browser/server interaction and how to manipulate it.

After spending an evening learning and putting things together in Python (compared to many nights messing with Java and still resulting in code that wouldn't even compile half the time) I think I have something that should work. The extracted string and shift are what they supposed to be and I think I apply the shift correctly. I submit it, whilst keeping in mind the safeguards, but I always get a response that my answer is wrong.

Clearly, I'm doing something wrong... Would someone be so kind to take a look at my code? It's pretty short (disregarding comments and debug code)...

Again, thanks for everything!

[EDIT]: Got it! Turns out I had the wrong idea of how to approach it. I thought that every char in the string should be converted to its ASCII code then altered with shift and then converted to a char again...
EnterQuery
New User
New User
 
Posts: 1
Joined: Tue Jul 10, 2012 4:14 pm
Blog: View Blog (0)


Re: Permanent Programming 11

Post by ichimeno on Wed Jul 18, 2012 10:27 am
([msg=68145]see Re: Permanent Programming 11[/msg])

Hello dear community! Please excuse my stupid question, but does this mission use the whole ASCII chart? What I mean by that is that does this mission use ASCII chars like 'TAB' ? Does it also use chars that have the dec value between 128-255?

EDIT: Opps, I didn't read the whole thread. I have to use the entire range :D

-- Thu Jul 19, 2012 1:47 pm --

Err sorry for the double-post but I'm having a problem uploading the answer to the website. My program is written in Java and decrypts the generated string successfully. I want to send the answer to Hack This Site using HttpClient from Apache and using POST requests but as a response from the server I get "Brute forcing is not allowed.". Wtf, I'm not bruteforcing the site in anyway :S

Did anyone encounter this problem? I hope I didn't place any spoilers :)

Thank you :)
ichimeno
New User
New User
 
Posts: 1
Joined: Sat Jun 28, 2008 2:30 pm
Blog: View Blog (0)


PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron