Search
Latest topics
Who is online?
In total there are 4 users online :: 0 Registered, 0 Hidden and 4 Guests None
Most users ever online was 38 on Sun Mar 19, 2023 10:07 pm
Most Viewed Topics
[Tutorial] [VB.Net] Making a Builder and Stub Program
Page 1 of 1
[Tutorial] [VB.Net] Making a Builder and Stub Program
VB.Net Tutorial - Making a Builder and Stub using IO.File operations
Contents:
Introduction
Form Design
Coding
A User-generated application, or a builder and a stub combination is mainly used when you need userinputs in a new PC whose user does not have any idea what that app may do.
There are three names used in Builder-stub system for applications:
Builder
Stub
Server (or Output)
Builder is the application a User operates and inputs his info which is used by Stub.
Stub is the application which should NOT even be touched by the User. Builder uses the Stub to give an Output, a new application commonly known as "Server".
Server is the final output. Ready to spread.
Why should I keep stub?
Your output is >90% Stub
This is how it goes:
Stub Application + User Settings = Server Application
This is the easiest and the shortest part.
What do you need?
Visual Basic .Net Beginner knowledge
Some time.
And of course, Visual Studio for working in Visual Basic .Net
In this Tutorial, we will make 2 Programs: Builder and Stub
Controls needed:
TextBox = 2
Button = 1
Stub:
[Image: stub.png]
No controls needed.
In fact, you don't even need a Form, you can just use a Class Module if you know how to, otherwise don't worry Form will do ok.
Now comes the hardest part, but I would also add, the more interesting part.
In your Builder form enter this code.
Quote:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim theStub As String = CurDir() & "\stub.exe" 'Stub should be in Builder's Directory
If IO.File.Exists(theStub) = False Then 'If it's not then
MsgBox("No Stub Found", MsgBoxStyle.Exclamation) 'display a message
Exit Sub 'and Exit the rest of the Sub
End If
IO.File.Copy(theStub, CurDir() & "\server.exe") 'Copy stub as Server
IO.File.AppendAllText(CurDir() & "\server.exe", "FileSplit" & TextBox1.Text & "FileSplit" & TextBox2.Text) 'Add user-settings to Server with a FileSplit
End Sub
Great you are half-way there!.
Now enter this code in your Stub form:
Quote:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim BinText As String = IO.File.ReadAllText(Application.ExecutablePath) 'Read All Text in Itself and store in variable BinText
If BinText.Contains("FileSplit") = False Then Exit Sub 'If there is the same Builder's FileSplit then
Dim ArrContents() As String = Split(BinText, "FileSplit") 'Store BinText splitted by FileSplit
For num As Integer = 1 To UBound(ArrContents) 'Loop through each element in ArrContents except 0, which is useless for us here
MsgBox(ArrContents(num)) 'Show a MessageBox for the UserInputted Text in Builder
Next
End Sub
Well done, you are done with both.
Now build them, put them in same directories, and test the Builder. Smile
Have a great day. :thumbs:
Contents:
Introduction
Form Design
Coding
Introduction
A User-generated application, or a builder and a stub combination is mainly used when you need userinputs in a new PC whose user does not have any idea what that app may do.
There are three names used in Builder-stub system for applications:
Builder
Stub
Server (or Output)
Builder is the application a User operates and inputs his info which is used by Stub.
Stub is the application which should NOT even be touched by the User. Builder uses the Stub to give an Output, a new application commonly known as "Server".
Server is the final output. Ready to spread.
Why should I keep stub?
Your output is >90% Stub
This is how it goes:
Stub Application + User Settings = Server Application
Form Design
This is the easiest and the shortest part.
What do you need?
Visual Basic .Net Beginner knowledge
Some time.
And of course, Visual Studio for working in Visual Basic .Net
In this Tutorial, we will make 2 Programs: Builder and Stub
Builder:
Controls needed:
TextBox = 2
Button = 1
Stub:
[Image: stub.png]
No controls needed.
In fact, you don't even need a Form, you can just use a Class Module if you know how to, otherwise don't worry Form will do ok.
Coding
Now comes the hardest part, but I would also add, the more interesting part.
In your Builder form enter this code.
Quote:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim theStub As String = CurDir() & "\stub.exe" 'Stub should be in Builder's Directory
If IO.File.Exists(theStub) = False Then 'If it's not then
MsgBox("No Stub Found", MsgBoxStyle.Exclamation) 'display a message
Exit Sub 'and Exit the rest of the Sub
End If
IO.File.Copy(theStub, CurDir() & "\server.exe") 'Copy stub as Server
IO.File.AppendAllText(CurDir() & "\server.exe", "FileSplit" & TextBox1.Text & "FileSplit" & TextBox2.Text) 'Add user-settings to Server with a FileSplit
End Sub
Great you are half-way there!.
Now enter this code in your Stub form:
Quote:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim BinText As String = IO.File.ReadAllText(Application.ExecutablePath) 'Read All Text in Itself and store in variable BinText
If BinText.Contains("FileSplit") = False Then Exit Sub 'If there is the same Builder's FileSplit then
Dim ArrContents() As String = Split(BinText, "FileSplit") 'Store BinText splitted by FileSplit
For num As Integer = 1 To UBound(ArrContents) 'Loop through each element in ArrContents except 0, which is useless for us here
MsgBox(ArrContents(num)) 'Show a MessageBox for the UserInputted Text in Builder
Next
End Sub
Well done, you are done with both.
Now build them, put them in same directories, and test the Builder. Smile
Have a great day. :thumbs:
Similar topics
» [TUTORIAL] Hack any IPhone/Android/Blackberry Phone [TUTORIAL]
» Batch. The Ultimate Tutorial.
» [Tutorial] Cross-Site Scripting [XSS]
» [TUTORIAL] Bypass Windows Password
» Tutorial Cryptography Basics and Algorithmic Attacks
» Batch. The Ultimate Tutorial.
» [Tutorial] Cross-Site Scripting [XSS]
» [TUTORIAL] Bypass Windows Password
» Tutorial Cryptography Basics and Algorithmic Attacks
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Tue Feb 02, 2021 7:12 am by manas41
» SQL injection and Quote escaping
Sun Jun 28, 2015 11:42 am by ADS1
» [TUT] Chmod: Files & Permissions [TUT]
Thu Jun 04, 2015 12:45 pm by Guest
» Reaver pixiewps
Thu Jun 04, 2015 12:23 pm by voidfletcher
» How To Crash Someone's Skype in 10 SECONDS
Thu Jun 04, 2015 12:20 pm by voidfletcher
» Internet Security & IP Security (IPSec)
Mon May 18, 2015 9:00 pm by voidfletcher
» [Python] Infinite / Definite File Generator
Mon May 18, 2015 8:58 pm by ADS1
» [C#] String Case-Inversion
Mon May 18, 2015 8:57 pm by ADS1
» Rekall Memory Forensic Framework
Sat May 16, 2015 8:55 pm by ADS1