首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

VB制作类似木马生成器解决方法

2012-02-28 
VB制作类似木马生成器如,2.EXE程序里面代码:Inet1.Protocol icFTPInet1.URL Text1.TextInet1.RemotePo

VB制作类似木马生成器
如,2.EXE程序里面代码: 

Inet1.Protocol = icFTP
Inet1.URL = Text1.Text
Inet1.RemotePort = 21
Inet1.UserName = Text2.Text
Inet1.Password = Text3.Text
Inet1.Execute "", "GET" & qq.Txt & App.Path & "qq.Txt" 
  right1 = Inet1.StillExecuting
  Do While right1
  right1 = Inet1.StillExecuting
  DoEvents
  Loop
  MsgBox "下载成功", vbCritical, "请检查网络设置!"
  Exit Sub


然后吧这个2.EXE程序引入1.EXE程序资源调用!

1.EXE程序界面里面有Text1.Text ,Text2.Text ,Text3.Text 三个文本框! 生成调用2.EXE程序生成EXE程序 这里生成的时候 要把Text1.Text ,Text2.Text ,Text3.Text 三个文本框的内容和2.EXE程序的Inet1.URL = Text1.Text,Inet1.UserName = Text2.Text
Inet1.Password = Text3.Text 捆绑在一起! 直接生成一个EXE程序 有点相似木马生成器!
1.EXE程序代码: 怎么调用我就不会写了!
Dim app1() As Byte
app1 = LoadResData(101, "CUSTOM") '如果为空,读取资源文件中的(101,"custom")字符串

Open App.Path & "2.EXE" For Binary As #2 '打开 文件名.exe用二进制的方式写入数据
Put #2, , app1
Close #2 '关闭 这里还要说明一下 这里所谓的打开并不是指运行 而是用二进制方式打开文件写入原始数据

[解决办法]
参考:
~~~~~信息随EXE自身保存~~~~~

看一下:10F 、13F 、14F 。

[解决办法]
给你个很好的源码!
写资源文件的。

VB code
Private Declare Function BeginUpdateResource Lib "kernel32" Alias "BeginUpdateResourceA" (ByVal pFileName As String, ByVal bDeleteExistingResources As Boolean) As LongPrivate Declare Function UpdateResource Lib "kernel32" Alias "UpdateResourceA" (ByVal hUpdate As Long, ByVal lpType As Any, ByVal lpName As Any, ByVal wLanguage As Long, lpData As Any, ByVal cbData As Long) As LongPrivate Declare Function EndUpdateResource Lib "kernel32" Alias "EndUpdateResourceA" (ByVal hUpdate As Long, ByVal fDiscard As Boolean) As LongPrivate Function WriteRes(ByVal ResFileName As String, ByVal WriteFileName As String, ByVal ResType As String, ByVal ResID As Long) As BooleanDim VbArrayRes() As Byte '写入内容Dim hUpdate As Long '被写入的目标文件路径Dim Ret As Long '资源句柄Dim ResTypeX As String    ResTypeX = StrConv(ResType, vbUpperCase) '将资源标识符       hUpdate = BeginUpdateResource(WriteFileName, False) '打开要写入的目标文件    ReDim VbArrayRes(FileLen(ResFileName) - 1) '计算资源文件大小    Open ResFileName For Binary As #1 '获取资源文件内容        Get #1, , VbArrayRes    Close #1       Ret = UpdateResource(hUpdate, ResTypeX, ResID, 0, VbArrayRes(0), UBound(VbArrayRes) + 1) '添加资源        If Ret <> 0 Then            WriteRes = True        End If    '关闭资源更新    Ret = EndUpdateResource(hUpdate, False)End Function 

热点排行