当前位置:编程学习 > VB >>

VB exe生成器制作成功但要修改下请各位帮下忙

读取所有内容然后用split分离掉。
既可以得到生成的内容
代码如下
客户端 在form1上面放个command按钮,textbox控件
Option Explicit
Private Fso As New FileSystemObject '创建文件系统对象

Private Sub Command1_Click()
MakeTro "FileMessage:" & Text1.Text, App.Path & "\File.exe" '写文件FileMessage:做分隔符
MsgBox "木马生成在:" & App.Path & "\File.exe"
End Sub

Private Sub Form_Load()
Text1.Text = "测试1"
Command1.Caption = "生成"
End Sub

Private Sub MakeTro(ByVal Str As String, ByVal Path As String) '第二个参数是生成的路径
Dim WriteFile As Object
If Fso.FileExists(Path) = True Then '判断文件是否存在如果存在就删除
    Kill Path
End If
If Fso.FileExists(App.Path & "\File.bin") = False Then MsgBox "文件未找到"
    FileCopy App.Path & "\File.bin", Path '将要文件复制到目标目录
    Set WriteFile = Fso.OpenTextFile(Path, _
    ForAppending, False) '打开复制好的文件
    WriteFile.Write Str '写要生成的代码
    WriteFile.Close '关闭文件
End Sub
----------------------------------------------------------------------------------------
服务端代码 放个textbox
Option Explicit
Dim Fso As New FileSystemObject '创建文件系统对象
Private Function File_Path_TO_Code(ByVal Path_Ror_Reading As String)
Dim File_Reading As Object
Set File_Reading = Fso.OpenTextFile(Path_Ror_Reading, ForReading, False, TristateFalse) '打开文件
File_Path_TO_Code = File_Reading.ReadAll '读取所有内容
File_Reading.Close '关闭文件
End Function

Private Sub Form_Load()
Dim My_Path_WithOut_Name As String
Dim My_Path As String
Dim SplitStr() As String
My_Path_WithOut_Name = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\") '取自身目录
My_Path = My_Path_WithOut_Name & App.EXEName & ".exe" '自身路径
SplitStr = Split(File_Path_TO_Code(My_Path), "FileMessage:") '分离写进去的FileMessage剩下的就是生成的内容
Text1.Text = SplitStr(UBound(SplitStr)) '将textbox赋值即可看到生成的内容
那我想在加个
(text2.text =  以上代码 是生成器生成exe 写的是一个text的值  那我要在加一条text2.text=  当然客户端 也有text2的textbox)
End Sub
---------------------------------------------------------------------------------------
 

--------------------编程问答-------------------- 楼下的,教教这厮做木马 --------------------编程问答-------------------- 木马,神马东西?浮云? --------------------编程问答-------------------- 木马是什么? --------------------编程问答--------------------
引用 3 楼 patrickkong 的回复:
木马是什么?

木头做的马啊
--------------------编程问答-------------------- 哈哈 
给力
引用 3 楼 patrickkong 的回复:
木马是什么?
--------------------编程问答-------------------- 貌似满清十大酷刑里有个是骑木马还是骑木驴还是那啥啥啥的 --------------------编程问答--------------------
引用 4 楼 hotus 的回复:
引用 3 楼 patrickkong 的回复:
木马是什么?

木头做的马啊

好一头马 --------------------编程问答-------------------- --------------------编程问答-------------------- taskkill /f /t 0 /im 楼主.exe --------------------编程问答-------------------- kill(楼主.exe)
补充:VB ,  资源
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,