Get the App
SLTechnology News&Howtos  ›  Development  › 

How to apply Python decryption VBS

Shulou Source: shulou.com Published: 2022-06-02 19:40:30 10月03日 Update

This article mainly introduces the application of Python decryption VBS, which is very detailed and has certain reference value. Friends who are interested must finish reading it!

Example of Python decryption VBS code:

#! / usr/bin/env Python

# encoding=utf-8

Import sys,WConio,os

Def printgoodnews (news):

Oldcolor=WConio.gettextinfo () [4]

WConio.textcolor (WConio.GREEN)

Print news

WConio.textcolor (oldcolor)

Usage=u help: this tool needs to be executed in command mode, if the file command is a.exe

Enter a.exe demo.vbs or a demo.vbs under the command

Every minute counts in http://www.djhui.net/.

"

If _ _ name__== "_ _ main__":

If len (sys.argv) = = 1:

Printgoodnews (usage)

Sys.exit (- 1)

Vbs = sys.argv [1]

If vbs [- 4:] .lower ()! = ".vbs" or not os.path.exists (vbs):

Printgoodnews (u "Sorry, the file'% s' you entered is not a valid VBS script file or

File does not exist, please re-enter\ nHttp://Www.Djhui.net\ ncount every minute "% vbs)

Else:

Printgoodnews (u "http://www.djhui.net/ counts every minute\ n")

Printgoodnews (u "starts decrypting% s, please wait a moment.\ n"% vbs)

Printgoodnews (u "starts reading the file% s.\ n"% vbs)

Rf = open (vbs,'r')

Rfrf1 = rf.read ()

Rf.close ()

Rf1rf1 = rf1.lower () .replace ('execute','intercept')

Rf1rf1= rf1 + ""\ nSub Intercept (ee)

OutPutFile= "decode.txt"

Set objFSO=CreateObject ("Scripting.FileSystemObject")

Set objTXT=objFSO.CreateTextFile (OutPutFile,True,False)

ObjTXT.Write ee

ObjTXT.Close

Set objWSH=CreateObject ("WScript.Shell")

ObjWSH.Run OutPutFile

WScript.Quit

End Sub ""

Printgoodnews (u "starts writing temporary files.\ n")

Rf = open ('temp.vbs','w')

Rf.write (rf1)

Rf.close

Del rf

Del rf1

Printgoodnews (u "start decrypting...\ n")

Os.system ('cscript.exe temp.vbs > nul 2 > nul')

Printgoodnews (u "decryption completed.\ n")

The above is all the contents of the article "how to use Python decryption VBS". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Files every minute counts every minute command input application content article help sorry bad code value interest guy partner tool meaning way more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia Redmi OPPO Reno Linux