Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11865
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | GS <gs@v.invalid> |
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Decode-email |
| Date | Sun, 18 Feb 2018 10:41:49 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 62 |
| Message-ID | <p6c6s3$mfd$1@dont-email.me> (permalink) |
| References | <p65b0i$lv6$1@dont-email.me> <ljcgouzp7580$.vcj771vl6v39.dlg@40tude.net> <p67qbo$kag$1@dont-email.me> <p67v6u$euc$1@dont-email.me> <p68aec$4gu$1@dont-email.me> <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> <p6c6ac$icf$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="iso-8859-15"; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Sun, 18 Feb 2018 15:41:55 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="fd31f3c1b7db06402ee49c6cfd988b78"; logging-data="23021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198CcQuoz18qSoPDNbl00fH" |
| X-Antivirus-Status | Clean |
| X-Newsreader | MesNews/1.08.06.00-gb |
| X-Antivirus | Avast (VPS 180217-2, 02/17/2018), Outbound message |
| X-Face | G"ln~:.wBqHZznO'(lJjjprxGYAjIF7#^u)lx,@"H'F#uXm%j`T6kxat5rq092aW;K*#<!y <6K)wt3HjA)V"XV`W3}Qts*D['Jm:qqpgttEl^wk@9{HJglN-Q'.91Af~ySM>m4jZ(2aW$34N&B&E@ j~tjGV-aC18j1y>zi.\[ZGXsd |
| Cancel-Lock | sha1:K9RpKfWnl8k6lURUR/zQghIs2aw= |
| X-ICQ | 543516788 |
| Xref | csiph.com microsoft.public.scripting.vbscript:11865 |
Show key headers only | View raw
> "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
Ah! I missed change#1
Thanks, it's been an adventure working this out with you!
--
Garry
Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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