Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use vbs to implement XorEncode

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you how to use vbs to achieve XorEncode, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The code is as follows:

If Not WScript.Arguments.Count=1 Then WScript.Echo "Please drag the vbs file to be converted to me!" WScript.Quit Set fso=CreateObject ("Scripting.FileSystemObject") Set self=fso.OpenTextFile (WScript.ScriptFullName) Set vbs=fso.CreateTextFile (Left (WScript.Arguments (0), Len (WScript.Arguments (0)-4) + "_ XorEncode.vbs") Do Until self.AtEndOfStream aline=self.ReadLine If aline= "Function Decode (s) N) "Then w=true If w Then vbs.WriteLine aline Loop Set src=fso.OpenTextFile (WScript.Arguments (0)) Randomize:n=Int (255*Rnd+1) vbs.WriteLine" Execute ("&" Decode ("& Encode (src.Read (fso.GetFile (WScript.Arguments (0)) .size), n) &"," & n & ")" src.Close:vbs.Close:self.Close Set src=Nothing:Set vbs=Nothing:Set self=Nothing:Set fso=Nothing WScript.Echo "Successful!" Function Encode (Next End Function Function Decode n) For iMagne1 To Len (s) Encode=Encode& "& (Asc (Mid (s)) Xor n) Next End Function Function Decode (s) ns=Split (Mid (s)-1) For iMagne 0 To UBound (ns) Decode=Decode&Chr (CInt (ns (I) Xor n) Next End Function is all the content of this article" how to use vbs to achieve XorEncode ", thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report