Programming 1

Put your programming skills to the test in these challenges.

Re: Programming 1

Post by Defience on Tue Sep 21, 2010 3:00 pm
([msg=46251]see Re: Programming 1[/msg])

tearsstream wrote:I'm a complete noob but I did it with a method kind of similar to what DM79 is suggesting. Chucked the word list into Excel, split the words so that it was one letter per cell, used CODE() to get a numerical value for each letter, and took the product of each row to give me a unique number for each word.

There are a few things that you need to iron out, but I'm not going to give it all away ;)

Took me about 45 mins, which considering I haven't got a clue what I'm doing is probably about 100 times less than the rest are going to take me...

Though I'd just chuck it out there as how a non-programmer did it.


That is certainly an interesting method of doing this. As you do other missions and begin to become familiar with a programming language, you might want to come back to this one and try to write a script in that language. I often go back after time and review some of my earlier coding and find many ways of improving on them. It's also fun to see what I was thinking at the time. Good luck with the rest!
User avatar
Defience
Addict
Addict
 
Posts: 1281
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Re: Programming 1

Post by xhor on Fri Sep 24, 2010 1:30 pm
([msg=46426]see Re: Programming 1[/msg])

Hah nice. Ghetto excel hashmap. 8-)

You should learn the basics of a language. It's quite painless and it'll make applying your creativity a whole lot simpler.
xhor
New User
New User
 
Posts: 8
Joined: Thu Sep 02, 2010 10:16 pm
Blog: View Blog (0)


Re: Programming 1

Post by right on Tue Oct 26, 2010 2:25 pm
([msg=48147]see Re: Programming 1[/msg])

HEy guys . I want to load the wordlist into a variable in JavaScript. I use the textarea in html, but i dont know how to seperate each line from the other. how can javascript know there is <br> in the textarea?

I tried all the wrap properties but it didnt help
right
New User
New User
 
Posts: 7
Joined: Sun Jul 05, 2009 10:21 am
Blog: View Blog (0)


Re: Programming 1

Post by msbachman on Tue Oct 26, 2010 6:25 pm
([msg=48162]see Re: Programming 1[/msg])

right wrote:HEy guys . I want to load the wordlist into a variable in JavaScript. I use the textarea in html, but i dont know how to seperate each line from the other. how can javascript know there is <br> in the textarea?

I tried all the wrap properties but it didnt help


I don't know much javascript but it should have something analogous to preg_match or something.

I did it totally differently, and less efficiently. I copy-pasted to a text file, then manually removed superfluous chars.
"I'm going to get into your sister. I'm going to get my hands on your daughter."
~Gatito
User avatar
msbachman
Contributor
Contributor
 
Posts: 681
Joined: Mon Jan 12, 2009 10:22 pm
Location: In the sky lol
Blog: View Blog (0)


Re: Programming 1

Post by secretformula on Wed Oct 27, 2010 11:20 pm
([msg=48227]see Re: Programming 1[/msg])

I wrote a solution in C but it doesn't work, can I PM somebody my code and have them look at it because I see no bug and when I inject data using the debugger rather than load from the file it works perfectly... If I could PM somebody that would be great! Does the wordlist use windows or linux line endings? Does it matter when using a file pointer in C?
secretformula
New User
New User
 
Posts: 9
Joined: Sun Oct 24, 2010 8:38 pm
Blog: View Blog (0)


Re: Programming 1

Post by Avery17 on Thu Oct 28, 2010 12:45 am
([msg=48230]see Re: Programming 1[/msg])

secretformula wrote:I wrote a solution in C but it doesn't work, can I PM somebody my code and have them look at it because I see no bug and when I inject data using the debugger rather than load from the file it works perfectly... If I could PM somebody that would be great! Does the wordlist use windows or linux line endings? Does it matter when using a file pointer in C?


PM me it, I just finished my solution yesterday. I've done this in PHP and C so far.
Avery17
Experienced User
Experienced User
 
Posts: 81
Joined: Fri Sep 17, 2010 11:28 pm
Blog: View Blog (0)


Re: Programming 1

Post by right on Sat Oct 30, 2010 5:41 am
([msg=48329]see Re: Programming 1[/msg])

alrighty ive finished this mission after something like 4 days
.
but I still have a question... how can I write to the solution input field from a different frame?

I named the hackthissite window "hts", and used the following:
window.parent.hts.document.submitform.solution.value += strOutp;
but it didn't work.
right
New User
New User
 
Posts: 7
Joined: Sun Jul 05, 2009 10:21 am
Blog: View Blog (0)


Re: Programming 1

Post by msbachman on Sat Oct 30, 2010 6:46 am
([msg=48330]see Re: Programming 1[/msg])

secretformula wrote:Does the wordlist use windows or linux line endings? Does it matter when using a file pointer in C?


You should get something like ghex, this question is easily answerable with any hex editor. That said, newlines are 0x0D0A.

I'd love to take a look at it if you want to send me a PM. Haven't coded in a while but hopefully my skills haven't atrophied too much. Hopefully you can get it to me by tomorrow.
"I'm going to get into your sister. I'm going to get my hands on your daughter."
~Gatito
User avatar
msbachman
Contributor
Contributor
 
Posts: 681
Joined: Mon Jan 12, 2009 10:22 pm
Location: In the sky lol
Blog: View Blog (0)


Re: Programming 1

Post by fashizzlepop on Sun Oct 31, 2010 1:44 am
([msg=48372]see Re: Programming 1[/msg])

right wrote:alrighty ive finished this mission after something like 4 days
.
but I still have a question... how can I write to the solution input field from a different frame?

I named the hackthissite window "hts", and used the following:
window.parent.hts.document.submitform.solution.value += strOutp;
but it didn't work.

Explain better please... what language for instance.
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: Programming 1

Post by right on Tue Nov 02, 2010 11:15 am
([msg=48470]see Re: Programming 1[/msg])

fashizzlepop wrote:
right wrote:alrighty ive finished this mission after something like 4 days
.
but I still have a question... how can I write to the solution input field from a different frame?

I named the hackthissite window "hts", and used the following:
window.parent.hts.document.submitform.solution.value += strOutp;
but it didn't work.

Explain better please... what language for instance.

javascript
right
New User
New User
 
Posts: 7
Joined: Sun Jul 05, 2009 10:21 am
Blog: View Blog (0)


PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests