-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGeneric-decryption-function-for-any-NLS-encrypted-data.vbs
More file actions
72 lines (40 loc) · 1.4 KB
/
Generic-decryption-function-for-any-NLS-encrypted-data.vbs
File metadata and controls
72 lines (40 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Source: https://community.nortridge.com/t/getting-the-last-4-of-social/2298/25
* From stanleyM
* /
'Generic decryption function for any NLS encrypted data from stanleyM
Function DecryptNLS(x)
dekey = "[YOUR ENCRYPTION KEY HERE]"
'Format validation
xvalidate = left(x,9) & mid(x,32,3) & right(x,2)
If xvalidate = "[000001][==]==" Then
Encrpt = right(x,24)
EncrptIV = mid(x,10,24)
DecryptNLS = NLSApp.NLSAESDecrypt(Encrpt, dekey, EncrptIV)
Else
DecryptNLS = "NA"
End if
End function
' -------------------------------------
/*
* sample test script from Jojo
*/
testVal = DecryptNLS("SAMPLE TEST ENCRYPTED DATA")
last4ss = Mid(testval, len(testval)-3 )
msgbox "ss: " & testval & " - - > last4ss: " & last4ss
Function DecryptNLS(x)
dekey = "[YOUR ENCRYPTION KEY HERE]"
'Format validation
xvalidate = left(x,9) & mid(x,32,3) & right(x,2)
'msgbox xvalidate
If xvalidate = "[000001][==]==" Then
Encrpt = right(x,24)
'msgbox Encrpt
EncrptIV = mid(x,10,24)
'msgbox EncrptIV
DecryptNLS = NLSApp.NLSAESDecrypt(Encrpt, dekey, EncrptIV)
Else
DecryptNLS = "NA"
End if
End function
' -------------------------------------