Thread: Decrypt this!

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    36

    Decrypt this!

    raFconsi,eebr,0530
    ooKap,idks,0015

    The following 2 lines are taken from a database on my website. To be exact it is from the file "Members.db" where member information is stored. i.e username, password, money amount. The characters are only shuffled around - there is no encryption at the character level. Figure out what I did and what each of the words separated by commas means.

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Shuffling every third letter around isn't that smart. Neither is using very similar usernames. Neither is posting stuff straight from your database concerning a live website.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    Wow! That shows that I need to implement a better encryption algorithem. As for my site, how did you find it? Also, can you tell me how you figured out the encryption?

  4. #4
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Quote Originally Posted by francoissoft
    As for my site, how did you find it?
    I'm guessing he checked your profile.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  5. #5
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Wow! That shows that I need to implement a better encryption algorithem.
    Look into hashes. A lot of things use MD5 to hash passwords, and store the hash. Then they do hash == MD5(what_you_entered_as_password) to check passwords. However, there are some that don't think MD5 is secure/will be for much longer, and use other algorithms such as one of the SHA algorithms. Wikipedia has articles on all of that for a starting point.
    Also, can you tell me how you figured out the encryption?
    I looked at it. I'd didn't figure out the algorithm you used, I just guessed. Once. Your password is a) too short b) in a dictionary. So, when you change your password, choose something a wee harder to crack. No dictionary words, and longer than 4 characters.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    Ok, crack the stuff on the second line.
    FrancoisSoft
    FrancoisSoft on the Web
    If you stare at a computer for 5 minutes you might be a nerdneck.

  7. #7
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    Koopa,kids,1005
    Don't quote me on that... ...seriously

  8. #8
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    Wow! You're sharp!
    FrancoisSoft
    FrancoisSoft on the Web
    If you stare at a computer for 5 minutes you might be a nerdneck.

  9. #9
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by francoissoft View Post
    Wow! You're sharp!
    Actually, it's just that your encryption method totally blows.

  10. #10
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    methinks this is not so much about "check out my uber cool encryption" as it is about "zomg guys check out my new uber cool webbernetsite"...

  11. #11
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Quote Originally Posted by @nthony View Post
    methinks this is not so much about "check out my uber cool encryption" as it is about "zomg guys check out my new uber cool webbernetsite"...
    Well, as for the website... why does it peg the CPU at 100%?! This does this in almost every browser I've tested (Firefox in Windows, Iceweasel in Debian, Epiphany,...) except for IE. (Which appears to be too ignorant to cache the logo...)

    You are... using JavaScript to change the color of the font of your "FrancoisSoft" logo? AH! First, I enjoy seizures as much as the next guy, but a static or gently animated logo will likely earn you much more praise. Second, and more importantly, if it must flash colors, make it an animated GIF so you don't suck the very life out of my CPU.

    Also, Home.php doesn't seem to be your default/index(/whatever the technical name for it is) page. Perhaps you should rename it to index.php? As a result, using only a domain name gets a directory listing of your homepage. Worse, we see Members.db. Even if your file did use some sort of encryption/hash that was good, being able to obtain Members.db is not good. I shouldn't have access to that file.

    That being said, I have no other major nitpicks. I like the design (or lack thereof) of the project pages more than your homepage, but your homepage isn't terrible. (Other than the 100% CPU thing - fix that!)

    To be fair, some credit is deserved: I tried your WormWars program, in Linux. It compiles (with warnings) but after I hit the red worm the screen blanks and locks up in what appears to be an infinite loop. Although it didn't work, your site seems to indicate that you've never tried it in anything outside of Windows. The windows one worked well. 54506 on Phase 12 is my high. Kept me entertained for a while. Cool little game, much better than the usual requests for help on CBoard. Not bad. (Though that bug in Linux is probably there in Windows, it's just not being flushed out as well.)
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  12. #12
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    Try editing the source code. Could have something to do with PD Curses.
    FrancoisSoft
    FrancoisSoft on the Web
    If you stare at a computer for 5 minutes you might be a nerdneck.

  13. #13
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Could have something to do with PD Curses.
    I doubt it. Turns out, this is the (or at least one) offending error:
    Code:
        char StrBuff[50];
    Line #34 of WormWars.cpp. That buffer is way too small for this:
    Code:
            sprintf(StrBuff, "Score: %i  Clock: %i  Phase: %i  Length: %i  Worms: %i  (press H for help)", Score, Clock, Phase, Player.GetLength(), WormCount);
    ...which needs 65 bytes + whatever the %i's want. I increased StrBuffer to 128 bytes, and everything was then ok. Your program runs in Linux, fix that bug.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  14. #14
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    Wow. But why did it work on windows? Could you send me the Linux executable?
    FrancoisSoft
    FrancoisSoft on the Web
    If you stare at a computer for 5 minutes you might be a nerdneck.

  15. #15
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Once you step past the end of the array, you enter "undefined behavior". What happens afterwards is completely unknown. It could work, it could crash, it could print garbage to the screen. Any number of things, all dependent on the system, the exact setup, the alignment of the moon, etc.
    Although I've found that small bugs that don't exhibit themselves on Windows tend to be flushed out in Linux. (Just the differences in the two OS.)
    Can't attach executables on CBoard. (Your code only uses curses outside of the standard stuff as far as I can see, so it ought to build on many other systems, not just Linux & Windows.)
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to decrypt / encrypt using libgcrypt ? (ARC4)
    By jabka in forum C Programming
    Replies: 6
    Last Post: 04-21-2010, 11:34 PM
  2. Assignment to decrypt a text.
    By hubris in forum C++ Programming
    Replies: 2
    Last Post: 05-26-2009, 12:16 PM
  3. need help
    By the bosss in forum C++ Programming
    Replies: 1
    Last Post: 11-12-2007, 10:56 PM
  4. Help needed in C Programming
    By ProgC in forum C Programming
    Replies: 7
    Last Post: 03-29-2007, 03:42 AM
  5. CRYPT don' t save file
    By krakz in forum C Programming
    Replies: 5
    Last Post: 02-28-2003, 04:51 AM