Exe2bat. vbs

Source: Internet
Author: User
If you don't talk about it much, you will use it for testing ~
Fp = wscript. Arguments (0)
Fn = right (FP, Len (FP)-limit Rev (FP ,""))
With Createobject ("ADODB. Stream ")
. Type = 1:. Open:. loadfromfile FP: Str =. Read: SL = lenb (STR)
End
Sll = SL mod 65536: SLH = sl65536
With Createobject ("scripting. FileSystemObject"). opentextfile (FP & ". Bat", 2, true)
. Write "@ echo STR = """
For I = 1 to SL
Bt = ASCB (midb (STR, I, 1 ))
If BT <16 then. Write "0"
. Write hex (BT)
If I mod 128 = 0 then. Write "" _> debug. Vbs "+ Vbcrlf +" @ echo + """
Next
. Writeline "> debug. Vbs "+ Vbcrlf +" @ echo with wscript. stdout: r = vbcrlf "_
+ ": For I = 1 to Len (STR) Step 48:. Write" "E" "+ hex (256 + (I-1)/2 )"_
+ ": For J = I to I + 46 Step 2 :. write "+ mid (STR, J, 2): Next :. write R: Next> debug. Vbs "
. Writeline "@ echo. write "" RBx "" + R + "+ hex (SLH) +" + R + "" rcX "" + R + "+ hex (SLL) _
+ "+ R +" "N Debug. tmp" "+ R +" "W" "+ R +" Q "" + R: end "_
+ "> Debug. Vbs & Cscript // nologo debug. Vbs | Debug.exe> NUL & Ren Debug. tmp "" & FN & "" & del debug. Vbs "
End

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.