Feb 21, 2016 10:58 AM
(This post was last modified: Feb 21, 2016 10:59 AM by .Lynx..)
Hello!
For anyone who does not know how basic builder/stub works in VB.net, here is how to do it....
Here are both Visual Studio projects:
https(:)//drive(.)google.com/open?id=0B6a4KrMeAdDUUWdUcDB6bnBvdUk
I think this is as simple as it gets with Builder/Stub...
Basically builder sets the options for the stub and then the stub loads them..
Dont forget to add stub to builder´s resources.
If anyone has got any questions, feel free to pm me or reply to this thread.
STUB:
BUILDER:
For anyone who does not know how basic builder/stub works in VB.net, here is how to do it....
Here are both Visual Studio projects:
https(:)//drive(.)google.com/open?id=0B6a4KrMeAdDUUWdUcDB6bnBvdUk
I think this is as simple as it gets with Builder/Stub...
Basically builder sets the options for the stub and then the stub loads them..
Dont forget to add stub to builder´s resources.
If anyone has got any questions, feel free to pm me or reply to this thread.
STUB:
Code
Public Class Form1
Const spl = "asdf"
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read)
Dim stub As String = Space(LOF(1))
FileGet(1, stub)
FileClose(1)
Dim Options() As String = Split(stub, spl)
Dim domain As String
domain = Options(1)
MsgBox(domain)
End Sub
End ClassBUILDER:
Code
Private Sub BetaBlueButton1_Click(sender As Object, e As EventArgs) Handles BetaBlueButton1.Click
Dim s As New SaveFileDialog
s.Title = "Save as exe!!!"
Dim stub As String
Dim all As String = ""
Const Filesplit = "FormStub"
Dim temp As String = IO.Path.GetTempPath() & "stub.exe"
s.ShowDialog()
If s.FileName > "" Then
IP = domain.Text
File.WriteAllBytes(temp, My.Resources.stub) ' DONT FORGET TO ADD YOUR STUB TO RESOURCES
FileOpen(1, temp, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(1))
FileGet(1, stub)
FileClose(1)
FileOpen(1, s.FileName & ".exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(1, stub & spl & IP & spl & Port & spl & Startup & spl & Regedit & spl & Melt & spl)
FileClose(1)
MsgBox("Done!", MsgBoxStyle.OkOnly)
End If
End Sub


![[Image: Lymnm1L.jpg]](https://i.imgur.com/Lymnm1L.jpg)
![[Image: rD7TvGj.gif]](https://i.imgur.com/rD7TvGj.gif)

![[Image: dSitUBD.png]](https://i.imgur.com/dSitUBD.png)