Visit Our New Site

Tuesday, 5 July 2011

File Pumper Source Code make your own File Pumper

This is a simple file pumper

What is a pumper?

Pumper is a small software that will add bytes to your software.




Code:
Imports System.IO

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.DefaultExt = "exe"
OpenFileDialog1.Filter = "exe files (*.exe)|*.exe"
OpenFileDialog1.FilterIndex = 1
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then
TextBox1.Text = String.Empty
TextBox1.Text = OpenFileDialog1.FileName
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = "" Then
MsgBox("Enter bytes to add")
Else
Dim file1 = File.OpenWrite(TextBox1.Text)
Dim siza = file1.Seek(0, SeekOrigin.[End])
Dim size = Convert.ToInt32(TextBox2.Text)
Dim bite As Decimal = size * 1048576
While siza < bite
siza += 1
file1.WriteByte(0)
End While
file1.Close()
MessageBox.Show("Done !")
End If
End Sub
End Class

0 comments:

Post a Comment