1.

Solve : VBS crypting?

Answer»

Hey guys! I was wondering if there was a way to encrypt a string in vbs? I'm looking for a simple, but secure way to encrypt, then decrypt a string entered. I tried google but the scripts I found just blew me right out of the water. I would like to understand the code, so I can use it later to suit different purposes.your not going to get any sort of serious and reversible string encryption without "blow you out of the water" type code. A good type of encryption for casual use or for FUN is a basic Xor cipher:

Code: [Select]Function CryptXor(StringUse,Password)
Dim I
Dim RetStr
Dim Charuse,CharPwd
For I = 1 to Len(StringUse)
charuse = Mid(stringuse,I,1)
charpwd = Mid(password,(I mod len(password))+1,1)
retstr = retstr + chr(asc(charuse) xor asc(charpwd))
Next
CryptXor = retstr
End Function

Not sure if you've used functions or not in VBScript; my entire script looks like this:

Code: [Select]
Dim strcrypt
Dim strpassword
Dim encrypted ,testdecrypt
Strcrypt = Inputbox("Enter string to Xor:")
strpassword = inputbox("Enter password to use:")
encrypted= CryptXor(strcrypt,strpassword)
testdecrypt = CryptXor(encrypted,strpassword)
msgbox "encrypted:" + encrypted
msgbox "decrypted again:" + testdecrypt

Additionally, there might be a COM object you can create for encryption, but I'm not sure.Quote from: BC_Programmer on February 14, 2010, 11:19:45 PM

I'm really just looking for something to put people's minds at ease. Pretty much, the user will enter their desired string to encrypt, and that string is the en/decryption KEY. That way the string is more-secure...right?Quote from: BC_Programmer on February 14, 2010, 11:19:45 PM
t "blow you out of the water"

Here is some code this will truly blow you out of the water

^^^)*()*&_(&()&*)(*&*

*&(*&(*&*)()(_)(+_(+_(*&&

*&*(&(*5446465454M4♣4♦♦╝4♦4♦É6658◘8b87O7◘7&

X888◘8x8◘◘88◘◘88○99○○9○1☺1☺1☺1☺1☺☺o11♂1☺1111♥♥♥

1☺11☺☺☺7•789999○98Yb8○8○◘98é998○898○88



It was DONE in EEVIAC ++

Although the code may need some revision

I have to agree...that code is totally confusing.Quote from: BC_Programmer on February 14, 2010, 11:19:45 PM
Can I use this in VB6, if so, how?Same way you would from VBS... just copy paste.Quote from: EEVIAC on February 16, 2010, 10:13:43 AM
Here is some code this will truly blow you out of the water

^^^)*()*&_(&()&*)(*&*

*&(*&(*&*)()(_)(+_(+_(*&&

*&*(&(*5446465454M4♣4♦♦╝4♦4♦É6658◘8b87O7◘7&

X888◘8x8◘◘88◘◘88○99○○9○1☺1☺1☺1☺1☺☺o11♂1☺1111♥♥♥

1☺11☺☺☺7•789999○98Yb8○8○◘98é998○898○88



It was done in EEVIAC ++

Although the code may need some revision



is that actually a programming language?Quote from: hey101 on February 18, 2010, 11:51:33 AM
is that actually a programming language?

it's probably the ASCII equivalent of the matching EBCDIC characters resulting from the machine code used for encryption on the EEVIAC.

I'm assuming the EEVIAC uses EBCDIC, which it might not. I'm fairly certain it's too old to use ASCII.Thats confusing but ok. I stil have no idea what EBCDIC or EEVIAC is but thats ok. EEVIAC was an old computer, like UNIVAC.

EBCDIC was a character encoding scheme used before ASCII.Omg i actually understand that i think. lol Thanks.Quote from: BC_Programmer on February 18, 2010, 02:10:32 PM
EEVIAC was an old computer, like UNIVAC.


Lol, actually BC, I think you're thinking of the ENIAC

EEVIAC---Embedded Electronic Variably Integrated Astro Console

Is a record album recorded by "Man or Astroman", an off-the-wall surf type band.. Unless I'm mistaken, they might have gotten the idea from a real computer

and just for the record hey101, they're random keys I types while HOLDING down the Alt key and pressing number on the numeric key pad That what i originally thought but i had to ask.


Discussion

No Comment Found