Hack Forums
[.NET] ~ ★ VB.NET File Pumper Tutorial ★ ~ - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] ~ ★ VB.NET File Pumper Tutorial ★ ~ (/showthread.php?tid=1777457)



~ ★ VB.NET File Pumper Tutorial ★ ~ - SIM-888979 - Sep 30, 2011

~ ★ VB.NET File Pumper Tutorial ★ ~
Written by Unipire & Soul Collector for layout

==


Step 1:

Open Visual Basic:

Click File > Then New Project > Choose Windows Application> Write name: File Pumper > Click Ok button.

Insert two Text Boxes, and two Buttons.

Double click on the Button and rename it to Browse then paste this code into it.

Code
Dim ofd As New OpenFileDialog
ofd.Filter = "Exe Files|*.exe"
ofd.ShowDialog()
TextBox1.Text = ofd.FileName

Explanation:

What the button Browse does is that when clicked upon, an Open File Dialog would pop up, and the user of the program must choose an executable file they want to pump megabytes into.

Step 2:

Double click on the second Button and rename it to Pump and then paste this code into it.

Code
If TextBox2.Text = "" Then
    MsgBox("Please put in the amount of megabytes you want to pump.")
  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 * 100
    While siza < bite
    siza += 1
    file1.WriteByte(0)
    End While
    file1.Close()
    MessageBox.Show("Your file has been pumped.")

Explanation:

When the second button named Pump is clicked upon, the program would pump megabytes into the program, if no number is placed in Text Box 2, the program doesn't know how many megabytes does it need to pump, so if TextBox2.Text is blank, also known as "", a message would pop up telling them to put in a number.

And you're done.


==



* - Sapientia - Sep 30, 2011

Wtf? I thought this was a downloader tutorial, not a file pumper?


* - SIM-888979 - Sep 30, 2011

(Sep 30, 2011 11:29 PM)¢aявøn ғιвєя Wrote:  Wtf? I thought this was a downloader tutorial, not a file pumper?

Woops, mixed up my third tutorial. Changing it now.


* - Modestep - Oct 1, 2011

Good job, its such easy code to pump a file.


* - Diabolic - Oct 1, 2011

This looks simple yet effective, thanks for posting!


* - SIM-888979 - Oct 1, 2011

(Oct 1, 2011 08:52 AM)Diabolic Wrote:  This looks simple yet effective, thanks for posting!

Thanks for the support. It means alot to get a compliment from a wonderful coder like you.



* - RAF97 - Dec 22, 2011

Hey,

Good tut! ;)

I've tested a lot of file pumper and only the Vaxqine'one can pump a jpeg file...How is it possible ?

Raƒ97


* - g00n - Dec 22, 2011

Hey correct the source do you miss a end if :)
I have tested on a hello world and nothing happen to the file!
This don't work for me


* - TheNeutron - Dec 22, 2011

Thank you bro, I find it very useful and helpful as well, because I'm learning VB. (:


* - W33DY - Dec 22, 2011

Just use that https://hackforums.net/showthread.php?tid=1847891&highlight=file+pumper
from Nathan


* - SIM-888979 - Dec 23, 2011

(Dec 22, 2011 09:25 PM)W33DY Wrote:  Just use that https://hackforums.net/showthread.php?tid=1847891&highlight=file+pumper
from Nathan

Wow aren't you so cool.

Look at the date I posted the thread please.


* - W33DY - Dec 23, 2011

(Dec 23, 2011 03:22 AM)Zombot Wrote:  Wow aren't you so cool.

Look at the date I posted the thread please.

Think before you Write Shit
See what g00n say,it doesent work for him,so i posted the Method from Nathan...