Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11818
| From | "Mayayana" <mayayana@invalid.nospam> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Decode-email |
| Date | 2018-02-15 20:09 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <p65b0i$lv6$1@dont-email.me> (permalink) |
I don't know if anyone's interested in this, but
maybe. I don't like to enable script in the browser.
Yet thousands of websites use a specific javascript
to encode email addresses, usually making them
invisible unless one enables script. The decoder
is called decode-email.min.js. It's not just the typical
hex ASCII values. It uses an extra twist, converting
the ASCII values for letters to hex representations
of that number XOR-ed.
I got tired of not being able to find someone's
email, so I wrote a little desktop decoder script.
I also wrote an encoder. The encoder below will
accept someone@somewhere.com53 and return:
35465A58505A5B5075465A5850425D5047501B565A58
That string will be converted back by the decoder.
The 53 is random. It just requires any byte-value
numeric key to do the encoding. The decoder doesn't
need to know it because the encoded string starts
with the key. (H35 = decimal 53)
'----------- begin decoder script ---------------------------
' Script to do the job of email-decode.min.js. This script is used
' on many sites to obfuscate email addresses. The email will be encoded
' as a very long string of characters. Each 2 characters represent a
' hex code, but the first two are a key. That key is then XOR-ed with
' each following pair to get the email characters.
' Example:
' s = "523b3c343d" 'decimal: 82 59 60 52 61
'82 XOR 59 = 105 = i
'82 XOR 60 = 110 = n
'82 XOR 52 = 102 = f
'82 XOR 61 = 111 = o
' s decoded = "info"
s = InputBox("Enter encrypted email address text to decode. This script
works to replace email-decode.min.js, which is used on thousands of
websites.", "Decode email address")
If Len(s) = 0 Then WScript.quit
sRet = InputBox("Decrypted email:", "Decode email address", EmailDecode(s))
WScript.quit
Function EmailDecode(sIn)
Dim iKey, iPos, s2, iVal
iKey = CByte("&H" & Left(sIn, 2)) 'get they XOR key.
iPos = 3
Do While iPos <= Len(sIn)
' get each character pair, treat as hex code and convert to
decimal.
' XOR each with the key value, then treat that as an ASCII
character code and
' convert to character.
s2 = Mid(sIn, iPos, 2)
iVal = cbyte("&H" & s2)
EmailDecode = EmailDecode & Chr(iVal XOR iKey)
iPos = iPos + 2
Loop
End Function
'---------------------- begin encoder script ---------
Dim s, sEmail, sKey, s2, i, iKey, iVal
s = InputBox("Enter email address to encode. Follow that with a 2-digit key
for encoding", "Email address encoder")
If Len(s) = 0 Then WScript.quit
On Error Resume Next
s = Replace(s, " ", "")
sEmail = Left(s, len(s) - 2)
sKey = Right(s, 2)
iKey = cbyte(sKey)
If Err.number <> 0 Then
MsgBox "Error in entering email and encryption key."
WScript.Quit
End If
s2 = Hex(iKey)
For i = 1 to Len(sEmail)
iVal = Asc(Mid(sEmail, i, 1))
iVal = iVal XOR iKey
s2 = s2 & Hex(iVal)
Next
s = InputBox("Encoded email address:", "Encode email address", s2)
WScript.quit
Back to microsoft.public.scripting.vbscript | Previous | Next — Next in thread | Find similar | Unroll thread
Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-15 20:09 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-15 22:52 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-15 23:02 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-15 23:34 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-16 00:44 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-16 09:46 -0500
Re: Decode-email JJ <jj4public@vfemail.net> - 2018-02-17 22:00 +0700
Re: Decode-email JJ <jj4public@vfemail.net> - 2018-02-17 01:46 +0700
Re: Decode-email GS <gs@v.invalid> - 2018-02-16 15:30 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 09:29 -0500
Re: Decode-email JJ <jj4public@vfemail.net> - 2018-02-17 21:47 +0700
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 19:51 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 20:33 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 21:40 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 21:43 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 22:57 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 23:10 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 23:18 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 23:41 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-18 10:23 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-18 10:38 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-18 11:09 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-18 13:20 -0500
Re: Decode-email JJ <jj4public@vfemail.net> - 2018-02-18 09:47 +0700
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 21:50 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-16 18:43 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-16 20:06 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-16 23:18 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-16 23:32 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 00:00 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 09:24 -0500
Re: Decode-email "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-02-17 16:07 +0100
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 10:46 -0500
Re: Decode-email "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-02-17 18:18 +0100
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 21:46 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-17 23:09 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 23:13 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-17 23:23 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-18 10:32 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-18 10:41 -0500
Re: Decode-email "Mayayana" <mayayana@invalid.nospam> - 2018-02-18 16:30 -0500
Re: Decode-email GS <gs@v.invalid> - 2018-02-18 16:41 -0500
csiph-web