Hey guys
I'm trying to make a simple keylogger builder but I keep having the same problem. In the builder, I put a txtbox that the user can have how many digits he wants. When I build file, things look ok but when I run the built file I get an error when I press the generate key button.
Heres a picture of the builder:
[img]http://i913.photobucket.com/albums/ac334/trezz101/builder.jpg?t=1289860344[/img]
And heres a picture of the Stub(Output file)
[img]http://i913.photobucket.com/albums/ac334/trezz101/builderstub.jpg?t=1289860426[/img]
Source code for builder:
Code Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FileSplit As String = "@trezz101@"
If TextBox1.Text = "" Then MessageBox.Show("Please enter a number") : Exit Sub
Dim Sfd As New SaveFileDialog
Dim SaveFileName As String
Sfd.Filter = "*.Exe | *.Exe"
If Sfd.ShowDialog = Windows.Forms.DialogResult.OK Then SaveFileName = Sfd.FileName _
Else Exit Sub
Try
FileOpen(1, Application.StartupPath & "\Stub.exe", OpenMode.Binary, _
OpenAccess.Read, OpenShare.Default)
Dim Stub As String = Space(LOF(1))
FileGet(1, Stub)
FileClose(1)
FileOpen(2, SaveFileName, OpenMode.Binary, OpenAccess.Write, OpenShare.Default)
FilePut(2, Stub & FileSplit & TextBox1.Text)
FileClose(2)
MessageBox.Show("File was built!")
Catch ex As Exception
MessageBox.Show("There was an error!" & vbNewLine & ex.ToString)
End Try
End Sub
End Class
Source code for Stub:
Code Public Class Form1
Dim intNameLengthresult As Object
Public Function GenerateCode() As Object
Dim intRnd As Object 'Here we make the declares
Dim intStep As Object
Dim strName As Object
Dim intNameLength As Object
Dim intLength As Object
Dim strInputString As Object
strInputString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" 'Here's the string inputs you can change this to what ever you want
intLength = Len(strInputString)
intNameLength = intNameLengthresult '5 'Here is the what the length of the output I have it set to 5 because I used it to generate fake keys
Randomize() 'Here this randomizes the output string
strName = ""
For intStep = 1 To intNameLength 'Here down is where the generating happens
intRnd = Int((intLength * Rnd()) + 1)
strName = strName & Mid(strInputString, intRnd, 1)
Next
GenerateCode = strName
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FileSplit As String = "@trezz101@"
Dim Options() As String
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
Dim F As String = Space(LOF(1))
FileGet(1, F)
FileClose(1)
Options = Split(F, FileSplit)
intNameLengthresult = Options(1)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As String = Nothing
'In my function I have my output length set to 5 because when I get here I can put the - in the textbox thats why it calls the function then the dash and so on.
a = GenerateCode() & "-" & GenerateCode() & "-" & GenerateCode() & "-" & GenerateCode() & "-" & GenerateCode()
TextBox1.Text = a
MessageBox.Show("Blah")
End Sub
End Class
I hope somebody can help me. I'm just learning. Will definitely add more options and stuff when I get this straitened out.
Thank you
Sorry, here's the error code
Code See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
** Exception Text **
System.ArgumentException: Cannot convert start value of type 'Integer', limit value of type 'String', and step value of type 'Integer' to a common numeric type.
at Microsoft.VisualBasic.CompilerServices.ObjectFlowControl.ForLoopControl.ForLoopInitObj(Object Counter, Object Start, Object Limit, Object StepValue, Object& LoopForResult, Object& CounterResult)
at Keygen_builder_1_stub.Form1.GenerateCode()
at Keygen_builder_1_stub.Form1.Button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
** Loaded Assemblies **
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
--
Keygen builder 1 stub
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Xtinct%2064/Desktop/BuilderTest/gfhfghtdghdf.Exe
--
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
--
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
--
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
--
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
--
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
--
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
--
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
--
** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Dim Stub As String = Space(CInt(LOF(1)))
(Nov 15, 2010 04:03 PM)ident Wrote: Dim Stub As String = Space(CInt(LOF(1)))
I replaced it with "Dim Stub As String = Space(LOF(1))" in the builder but still get the same error.
|