Follow us on Twitter!
The important thing is not to stop questioning. - Albert Einstein
Monday, April 21, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 28
Guests Online: 25
Members Online: 3

Registered Members: 82858
Newest Member: alexxkim
Latest Articles
View Thread

HellBound Hackers | Challenges | Encryption

Author

enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 30-06-08 18:38
Code
// encryption challenge number 5

#include <iostream>
using namespace std;

int main (int argc, char * const argv[])
{
    char string[]="PikkJstvh . Gigjmiq{ . 972? . l`kohvk . rqxb";
    int key[]={+8,+4,-1};
    int count=0;
   
    for(int i=0;i<strlen(string);i++)
    {
        if(string[i]!=(char)32)
        {
            string[i]+=key[count];
            count++;
            if(count==sizeof(key)/4) count=0;
        }
    }
   
    cout << string;
   
    return 0;
}




After i compile it and run it it just gives me jibberish can anyone help me. (this Isn't my code i got it from the code bank and put in the string and key from encryption 5) And i am very new to C++.

thanx :D




Edited by on 30-06-08 21:42
Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 30-06-08 23:55
One thing I found with this challenge is the way you look at the key.

Instead of looking at the encryption and doing +8, +4, -1 to them, think of that algorithm already applied to the encryption, so that it would be in reverse.

Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 01-07-08 00:22
hmm.. I tried

int key[]={-8,-4,+1};

instead of

int key[]={+8,+4,-1};

but it still didn't work Sad it still comes out as jibberish.???




Edited by on 01-07-08 02:26
Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 01-07-08 02:41
yeah your program wont work, bc the pattern doesnt just follow exactly with the key and then repeat. Do it by hand, and its more trial and error, but makes sense in the end



Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-09-08 19:38
am I correct in assuming it's a variable key rotational algorithm?
I'm using modulus to keep it in between 65 and 122 (a-z, A-Z, []\^_`)

is that correct?

I can send my python to anyone who wants to check it out.
Author

RE: enc5

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 06-09-08 19:42
You don't need a program. Sure, you can use it, but when I did the challenge there were a few discrepancies in the pattern. It'll be easier if you just go through and do it by hand.


i252.photobucket.com/albums/hh11/zanimabean/Zim.png


Edited by Futility on 06-09-08 19:43
Futility91@hotmail.com Futility91
Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-09-08 20:04
True, only took me about 20 mins by hand, just write out all the things you are looking at in a line, the pattern and its discrepancies will become clear soon enough.


Author

RE: enc5

Dunuin
Member

Your avatar

Posts: 10
Location:
Joined: 24.01.09
Rank:
Guest
Posted on 08-03-09 22:53
Can someone help me? I think I have got the plaintext but I don't know how to write it right, so the challangeform accepts it. Can I PM someone?
Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-03-09 23:05
yeah, u can pm me if u want...


Author

RE: enc5

Dunuin
Member

Your avatar

Posts: 10
Location:
Joined: 24.01.09
Rank:
Guest
Posted on 09-03-09 17:44
Ok, finished it now.

You have to answer the sentence with spaces and changed/deleted wrong characters.
Author

RE: enc5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-03-09 17:51
glad that u got it! Wink


Author

RE: Still stuck on enc 5


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-11-10 19:46
So i definitely got this one, but my answer isn't what the challenge is looking for. It's ok... Not panicking, but... I would like to know if can send someone what I have and if they can tell me how to derive the answer the challenge box is looking for.

EDIT: Wow. As soon as I posted this I looked at it again and figured it out. Pretty cool challenge, except for the speelling mistakes, ya?Grin

Edited by on 05-11-10 23:37