This is the VBScript Obfuscator written in VBScript. You can obfuscate your VBS source file easily with this command line utility.
Github: https://github.com/DoctorLai/VBScript_Obfuscator
How does it work?
The obfuscator will parse each character of your VBS file, and obfuscate it via a random character. The source code is thus obfuscated with concatenation of these characters.
The obfuscated source can be run with the VBScript function Execute
but the source code looks pretty obfuscated.
Function vbs_obfuscator(n)
Dim r, k
r = Round(Rnd() * 10000) + 1
k = Round(Rnd() * 2) + 1
Select Case k
Case 0
vbs_obfuscator = "CLng(&H" & Hex(r + n) & ")-" & r
Case 1
vbs_obfuscator = (n - r) & "+CLng(&H" & Hex(r) & ")"
Case Else
vbs_obfuscator = (n * r) & "/CLng(&H" & Hex(r) & ")"
End Select
End Function
Function Obfuscator(vbs)
Dim length, s, i
length = Len(vbs)
s = ""
For i = 1 To length
s = s & "chr(" & vbs_obfuscator(Asc(Mid(vbs, i))) + ")&"
Next
s = s & "vbCrlf"
Obfuscator = "Execute " & s
End Function
Passing multiple filenames
You can pass multiple VBScript file names at command line, and the obfuscator will obfuscate each source and print the obfuscated string one by one to the console.
You can also redirect the console to save to new vbs via cscript.exe vbs_obfuscator.vbs sample.vbs > sample_obfuscated.vbs
Proof of work
doctorlai
is my github ID and you can view my profile https://github.com/DoctorLai which has my steemit URL page.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
Nice work, do you plan on adding more complex obfuscation steps? You could probably do a character map and reference the characters in complicated ways.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks. Yes. I plan to add the defuscation first...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
赞。虽然我看不太懂,但感觉很流壁…
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
其实没有什么技术含量。隔行如隔山……
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
不知道为什么,就想发这个给你看看哈哈
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
哇哈哈, 妹子你太逗了。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我也觉得很流壁😂
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Obfuscator 是什么?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
混淆
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
用来干嘛的呢?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
比如 C# 或者 JAVA 编译出的文件其实都可以反汇编成原代码,这时候把源代码搞乱又不影响运行就是一种比较好的保护代码的方式。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit