How to use vbs to encrypt and decrypt QWERTY password
This article mainly introduces how to use vbs to encrypt and decrypt the QWERTY password, the article is very detailed, has a certain reference value, interested friends must read it!
There is a question when doing Arthur's Online Riddle:
If QWERTY = ABCDEF then, OLSQFR =?
Qwerty is a standard typewriter and computer keyboard based on the Latin alphabet used in various countries. QWERTY is the first six letters of the first line of the keyboard. The order of the keys was designed by Christopher Scholes (Christopher Sholes). Typewriters arranged with QWERTY were put into mass production in 1874. Since then, it has become the most widely used man-machine interface, and most computers use Qwerty keyboards.
If QWERTY corresponds to ABCDEF, then the correspondence of the other letters is arranged in keyboard order and alphabetical order respectively.
QWERTYUIOPASDFGHJKLZXCVBNM ABCDEFGHIJKLMNOPQRSTUVWXYZ
It was too troublesome to find one by one, so I wrote a VBS script for QWERTY decryption:
The copy code is as follows:
'Author: Demon
'Website: http://demon.tw
Date: 2012-2-9
Function FromQwerty (str)
Dim d, s, t, i, c, r
S = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
T = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
Set d = CreateObject ("Scripting.Dictionary")
For I = 1 To 52
D (Mid (t, I, 1)) = Mid (s, I, 1)
Next
For I = 1 To Len (str)
C = Mid (str, I, 1)
If d.Exists (c) Then
R = r & d (c)
Else
R = r & c
End If
Next
FromQwerty = r
End Function
WScript.Echo FromQwerty ("OLSQFR")
By the way, I also wrote a QWERTY encrypted
The copy code is as follows:
'Author: Demon
'Website: http://demon.tw
Date: 2012-2-9
Function ToQwerty (str)
Dim d, s, t, i, c, r
S = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
T = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
Set d = CreateObject ("Scripting.Dictionary")
For I = 1 To 52
D (Mid (s, I, 1)) = Mid (t, I, 1)
Next
For I = 1 To Len (str)
C = Mid (str, I, 1)
If d.Exists (c) Then
R = r & d (c)
Else
R = r & c
End If
Next
ToQwerty = r
End Function
WScript.Echo ToQwerty ("I LOVE YOU")
If QWERTY = ABCDEF then, O SGCT NGX = I LOVE YOU
The above is all the contents of the article "how to use vbs to encrypt and decrypt QWERTY passwords". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!