Qbasicnews.com
November 19, 2019, 01:06:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Decrypt this:  (Read 5290 times)
na_th_an
*/-\*
*****
Posts: 8244



WWW
« on: February 08, 2004, 07:54:52 PM »

I'm gonna add myself to the current motif. Decrypt this short text:

Code:
72<3>7=>3<47>55<8>3<6<8


It is fairly easy Tongue so the best algo wins (shorter & faster).
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #1 on: February 08, 2004, 08:46:28 PM »

is it a sentence? :x Gah! Im horrible at these
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #2 on: February 08, 2004, 09:18:57 PM »

It is a sentence Cheesy
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #3 on: February 08, 2004, 09:21:34 PM »

is this the answer?
Code:
72<3>7=>3<47>55<8>3<6<8


if not i dont know >_>
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #4 on: February 10, 2004, 08:28:20 AM »

I am asking you to decrypt my file.

C'mon, is it that hard?

I think it is fairly easy.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Meg
Ancient QBer
****
Posts: 483


« Reply #5 on: February 10, 2004, 09:24:24 AM »

<edit>
Logged
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #6 on: February 10, 2004, 09:45:22 AM »

aha i know the algo. will post after my exam.... exam? **AAHHHH**
my exam in 15 mins....
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #7 on: February 10, 2004, 10:43:46 AM »

Quote from: "Meg"
Quote
72<3>7=>3<47>55<8>3<6<8


Code:

CLS
PRINT "HELLO WORLD"
END


 Cheesy

*peace*

Meg.


Hey, that was not fair. You gave a serious hint and didn't give the algo to decrypt the text. Basicly, you ruined the challenge Sad
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #8 on: February 10, 2004, 11:59:44 AM »

Awwwww... Meeeeeeeeeeeeg!

Ah well, I was gonna give it a shot, and fail. But Nate, tell us, how the heck do we decrypt that anyway?
Logged
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #9 on: February 10, 2004, 01:11:37 PM »

YEEHAW!
this is soooo messy, but hey...

Code:
'AHA!
CLS
s$ = "72<3>7=>3<47>55<8>3<6<8 "
FOR I = 1 TO LEN(s$)
 a$ = MID$(s$, I, 1)
 IF VAL(a$) <> 0 THEN
   num$ = num$ + a$
 ELSE
   IF orig = 0 THEN orig = VAL(num$)
   oldd$ = old$
   old$ = a$
   oldnum = num
   num = VAL(num$)
   num$ = ""
   SELECT CASE oldd$
     CASE ">"
       new = new + num
     CASE "<"
       new = new - num
   END SELECT
       PRINT CHR$(new + orig);
 END IF
NEXT
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #10 on: February 10, 2004, 02:03:09 PM »

This challenge isn't challenging no more. Here is my original proggie:

Code:
DECLARE FUNCTION decript$ (a$)
DECLARE FUNCTION encript$ (a$)
a$ = "HELLO WORLD"
PRINT a$
b$ = encript$(a$)
PRINT b$
c$ = decript$(b$)
PRINT c$

FUNCTION decript$ (a$)
   c% = VAL(a$): res$ = CHR$(c%)
   o$ = RIGHT$(a$, LEN(a$) - LEN(LTRIM$(STR$(VAL(a$)))))
   WHILE o$ <> ""
      m$ = LEFT$(o$, 1)
      o$ = RIGHT$(o$, LEN(o$) - 1)
      IF m$ = "<" THEN c% = c% - VAL(o$) ELSE IF m$ = ">" THEN c% = c% + VAL(o$)
      IF m$ <> "=" THEN o$ = RIGHT$(o$, LEN(o$) - LEN(LTRIM$(STR$(VAL(o$)))))
      res$ = res$ + CHR$(c%)
   WEND
   decript$ = res$
END FUNCTION

FUNCTION encript$ (a$)
   a% = ASC(LEFT$(a$, 1)): out$ = LTRIM$(STR$(a%))
   FOR i% = 2 TO LEN(a$)
      m% = ASC(MID$(a$, i%, 1))
      IF m% = a% THEN
         out$ = out$ + "="
      ELSEIF m% < a% THEN
         out$ = out$ + "<" + LTRIM$(STR$(a% - m%))
      ELSE
         out$ = out$ + ">" + LTRIM$(STR$(m% - a%))
      END IF
      a% = m%
   NEXT i%
   encript$ = out$
END FUNCTION


I've invented another encryptation algo. The output was:

Code:
35520781707917087370403237390843093082270089242032262084180723599073160833251033


Now crack this one.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #11 on: February 10, 2004, 04:38:25 PM »

Hey? Dont i get *any* credit? I cracked your old algo, and i wrote a program to decypher it! And i had it mainly worked out before megs post.
Logged
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #12 on: February 10, 2004, 07:28:37 PM »

Hey...you get credit, Dark. I couldn't have done that to save my life. Shocked
I'm good at encryption (hey, nobody's cracked it yet! :wink: ) And I suck at decryption. It's easy to be that way. Tongue
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #13 on: February 11, 2004, 09:49:51 AM »

Of course, dark_prevail, you get credit. I just thought that you used the hint, and with the hint the challenge disappeared. Nice algo, btw. I was a little bit pissed off and I didn't even check it. My apologies Smiley

Now give this a go:

Code:
35520781707917087370403237390843093082270089242032262084180723599073160833251033


This time it is a little bit harder until you find the pattern.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #14 on: February 11, 2004, 10:02:44 AM »

Thanks for the credit =D

Its ok, no apoligies needed, nathan. I would have been pissed off to, if someone had comprimised my challenge like that. =P

Quote from: "na_th_an"
Nice algo, btw.

Hah! Its a pile of spagetti  Tongue

I will have a look at your new, code, although it looks a lot harder. =P
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!