Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11863
| From | "Mayayana" <mayayana@invalid.nospam> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Decode-email |
| Date | 2018-02-18 10:32 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <p6c6ac$icf$1@dont-email.me> (permalink) |
| References | (5 earlier) <p68csu$hek$1@dont-email.me> <p69duk$eg7$1@dont-email.me> <p6apek$fqk$1@dont-email.me> <p6au9v$4ri$1@dont-email.me> <p6av3a$9hm$1@dont-email.me> |
"GS" <gs@v.invalid> wrote | I'm testing...
|
| me@me.com
|
| ..with 2 digits appended using this script to encode:
|
I didn't repost the whole thing. Just the correction.
Here it is:
Note that change#2 is what makes sure that all
hex renditions are 2 characters. Then I realized that
the problem with 0-15 was that they key was ending up
as one character. So 10, for example, would be A.
But it needs to be 0A in order to work because the\
script is parsing 2 characters at a time.
So the line marked change#1 is what fixes that.
It's what Evertjan huffily derided as "more
than 5 lines of code". :)
The first version went like so:
s2 = Hex(iKey)
The correction, just before the loop starts, is:
s2 = Right("00" & Hex(iKey), 2)
----------------------------------------
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 = Right("00" & Hex(iKey), 2) 'change #1
For i = 1 to Len(sEmail)
iVal = Asc(Mid(sEmail, i, 1))
iVal = iVal XOR iKey
s2 = s2 & Right( "00" & Hex(iVal), 2) 'change#2
Next
s = InputBox("Encoded email address:", "Encode email address", s2)
WScript.quit
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | 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