View Full Version : Reverse: C()n73$t f0r t3h l33t
iDxMan
05-26-2002, 02:42 PM
Ok. Who's up for it? I have my version, but I'll post it later.
Same character rules as before.
l33t Input : 7r@n$1@7\()n: c()d3rp|-|()rum$.n37: 7h3 ()7h3r wh|73 m3@7
Text output: transIat\on: coderforums.net: the other white meat
Well.. Ink's 7r@n$1@7\()n isn't quite standard.
-r
xilica
05-26-2002, 07:15 PM
Darnit, you took the words right out of my mouths. When I showed my Visual Basic encrypter to my Dad he said, "Nice, but can you decrypt it?" I said "No, net yet..."
inkedmn
05-27-2002, 05:12 PM
/me smells the use of regexp's and isn't terribly excited about it ;)
iDxMan
05-28-2002, 12:35 AM
Yep.. And unfortunately I had to use one of the naughty variables.. ($&) mmm.. regex's are tasty.. Now to finish the owl book.
-r
xilica
05-28-2002, 12:53 AM
In Visual Basic:
Private Sub Command1_Click()
Dim i As Long
Dim sIn As String
Dim sTemp As String
Dim sOut As String
sIn = txtIn.Text
For i = 1 To Len(sIn)
sTemp = Mid$(sIn, i, 1)
Select Case sTemp
Case "@"
sOut = sOut & "a"
Case "b"
sOut = sOut & "b"
Case "c"
sOut = sOut & "c"
Case "d"
sOut = sOut & "d"
Case "e"
sOut = sOut & "e"
Case "p|-|"
sOut = sOut & "f"
Case "g"
sOut = sOut & "g"
Case "H"
sOut = sOut & "h"
Case "|"
sOut = sOut & "i"
Case "j"
sOut = sOut & "j"
Case "k"
sOut = sOut & "k"
Case "l"
sOut = sOut & "l"
Case "m"
sOut = sOut & "m"
Case "n"
sOut = sOut & "n"
Case "()"
sOut = sOut & "o"
Case "p"
sOut = sOut & "p"
Case "q"
sOut = sOut & "q"
Case "r"
sOut = sOut & "r"
Case "$"
sOut = sOut & "s"
Case "7"
sOut = sOut & "t"
Case "u"
sOut = sOut & "u"
Case "v"
sOut = sOut & "v"
Case "w"
sOut = sOut & "w"
Case "x"
sOut = sOut & "x"
Case "y"
sOut = sOut & "y"
Case "z"
sOut = sOut & "z"
Case "4"
sOut = sOut & "B"
Case "B"
sOut = sOut & "B"
Case "C"
sOut = sOut & "C"
Case "D"
sOut = sOut & "D"
Case "3"
sOut = sOut & "E"
Case "ph"
sOut = sOut & "F"
Case "G"
sOut = sOut & "G"
Case "}{"
sOut = sOut & "H"
Case "I"
sOut = sOut & "1"
Case "J"
sOut = sOut & "J"
Case "K"
sOut = sOut & "K"
Case "L"
sOut = sOut & "L"
Case "M"
sOut = sOut & "M"
Case "N"
sOut = sOut & "N"
Case "0"
sOut = sOut & "O"
Case "P"
sOut = sOut & "P"
Case "Q"
sOut = sOut & "Q"
Case "R"
sOut = sOut & "R"
Case "5"
sOut = sOut & "S"
Case "T"
sOut = sOut & "7"
Case "U"
sOut = sOut & "U"
Case "V"
sOut = sOut & "V"
Case "W"
sOut = sOut & "W"
Case "X"
sOut = sOut & "X"
Case "Y"
sOut = sOut & "Y"
Case "Z"
sOut = sOut & "Z"
End Select
Next i
txtOut.Text = sOut
End Sub
txtIn.Text = v|nce |$ D4 b()mb
txtOut.Text = vince is DA bomb
iDxMan
05-28-2002, 01:02 AM
Forgive my lack of vb knowledge, but isn't it that running through the string char-by-char, and picking one out via `Mid$`? How can that match any of the multi-char translations?
For i = 1 To Len(sIn)
sTemp = Mid$(sIn, i, 1)
iDxMan
05-28-2002, 01:08 AM
.. just a bit backwards.. 7->T
Although, that's the catch of reversing it.. 7 matches T&t .. As 3 does Ee. Oh well..
Case "T"
sOut = sOut & "7"
recluse
05-28-2002, 03:07 AM
Which one is the Owl book?
iDxMan
05-28-2002, 10:00 AM
Mastering Regular Expressions by Friedl.
http://www.oreilly.com/catalog/regex/
xilica
05-28-2002, 04:00 PM
Excuse my interruption but...
I did this very quickly last night and I understand some of the letters are messed up but who cares about that it works as long as you change them back. Here is the code that i messed up on:
sTemp = Mid$(sIn, i, 1)
It should be:
sTemp = Mid$(sIn, i, 4)
because the 4 in there signifies that it can be 4 characters at max. For example, this character: p|-|.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.