Okay I pity the fool who can't use WebClient, so here's something for all you C+Pers.
Imports...
[php]
Imports System.Net
[/php]
Global variables...
[php]
Dim totalpath As String
Dim filename As String
[/php]
The download sub-procedure.
[php]
Private Sub ZOMGDOWNLOAD(ByVal url As String, ByVal folder As String)
Dim client As Net.WebClient = WebClient1
Dim lio As Integer = url.LastIndexOf("/") + 1
filename = url.Substring(lio)
Dim location As String = folder
totalpath = location & "\" & filename ''
If Not IO.Directory.Exists(location) Then
IO.Directory.CreateDirectory(location)
SetAttr(location, FileAttribute.Hidden)
client.DownloadFile(url, totalpath)
ElseIf Not IO.File.Exists(totalpath) Then
client.DownloadFile(url, totalpath)
End If
End Sub
[/php]
The download complete sub:
[php]
Private Sub WebClient1_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted
ListBox1.Items.Add(filename)
'do whatever in this step'
End Sub
[/php]
The example
[php]
ZOMGDOWNLOAD("https://somewebsite.com/ZOMGMYHACK.dll", "C:\VERYSECRETDONTTELL")
[/php]
Points to note.
You need a webclient entitled "WebClient1" on your form for this to work. If you can't find it in the toolbox, right click and select "Choose Items" then scroll all the way down and add "Web Client"
Drag and drop one onto the form
If you're having trouble getting a site to accept the raw .dll file without zipping it go to
Free Web Hosting with PHP, MySQL and cPanel, No Ads and sign up for a free FTP.
then google "Core FTP" and download that so you can manage your files.
J-Deezy
Last edited by Jason; 07-05-2010 at 10:34 PM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Ok I don't have time to change my methods.
Here is what I got but it never adds the real dll to the listbox.
Why isn't it adding to the listbox I changed the code around and shit so it would work... I really like this method help me fix itCode:wheretosave = "C:\DL" My.Computer.Network.DownloadFile("ftp://RegUser@255.255.255.255/example.dll", wheretosave) SetAttr(wheretosave, FileAttribute.Hidden) Dlls.Items.Add(wheretosave & "\example.dll") Timer2.Start() TextBox1.Text = "Engine" Label3.Text = "Streaming"
Oh shit I figured it out my shit won't work unless I have a open file dialog wtf how do I fix that 0.0?
It wont work unless I open the .dll with a open file dialog omfg wtf >.> I tried to fix it! RaWRRRRRRRRRRRRRRRRRRRRRRRRRRRR!!!!!!
PLEASE DON'T TRIPLE POST -Lolland
Last edited by Lolland; 07-06-2010 at 08:29 AM.
Read my above post, doesn't require an OFD or anything, just a WebClient.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
I had to change it up alot for it to do what I was wanting it to do which I excelled at doing but it won't add to my list box >.<
Sorry double post where do I put the Imports? Could that possibly be why its not adding to the list box, cause I didn't know where to put it.
Last edited by Lolland; 07-08-2010 at 08:48 PM.
At the VERY top of your code, before any "Public Class".
Oh ok I figured that but I've done that and it still won't add the dlls to the list box
Is your ListBox called "ListBox1?" otherwise it's not going to add them to it haha, change
[php]
Private Sub WebClient1_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted
ListBox1.Items.Add(filename) 'change LISTBOX1 to whatever your listbox name is!
'do whatever in this step'
End Sub
[/php]
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Yeah I did lol
Okay try this...(assuming it's downloading the file correctly in the first place!)
CHANGE THIS
[php]
Private Sub ZOMGDOWNLOAD(ByVal url As String, ByVal folder As String)
Dim client As Net.WebClient = WebClient1
Dim lio As Integer = url.LastIndexOf("/") + 1
filename = url.Substring(lio)
Dim location As String = folder
totalpath = location & "\" & filename ''
If Not IO.Directory.Exists(location) Then
IO.Directory.CreateDirectory(location)
SetAttr(location, FileAttribute.Hidden)
client.DownloadFile(url, totalpath)
ElseIf Not IO.File.Exists(totalpath) Then
client.DownloadFile(url, totalpath)
End If
End Sub
[/php]
TO THIS!:
[php]
Private Sub ZOMGDOWNLOAD(ByVal url As String, ByVal folder As String)
Dim client As Net.WebClient = WebClient1
Dim lio As Integer = url.LastIndexOf("/") + 1
filename = url.Substring(lio)
Dim location As String = folder
totalpath = location & "\" & filename ''
If Not IO.Directory.Exists(location) Then
IO.Directory.CreateDirectory(location)
SetAttr(location, FileAttribute.Hidden)
client.DownloadFile(url, totalpath)
ListBox1.Items.Add(filename)
ElseIf Not IO.File.Exists(totalpath) Then
client.DownloadFile(url, totalpath)
ListBox1.Items.Add(filename)
End If
End Sub
[/php]
And remove the WEbClient1_DownloadCompleted
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
This is the shit I got on here now I had to modify the code you gave me to fit my needs 0.- I added it to a button click event because I'm doing something more "advanced"
[php]Dim client As Net.WebClient = WebClient1
Dim lio As Integer = url.LastIndexOf("/") + 1
filename = url.Substring(lio)
Dim location As String = folder
totalpath = location & "\" & filename ''
If Not IO.File.Exists(totalpath) Then
client.DownloadFile(url, totalpath)[/php]
So I could do this [php]Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
If ListBox1.SelectedItem = "Combat Arms Pub" Then
RichTextBox1.Hide()
RichTextBox2.Show()
RichTextBox3.Hide()
Button6.Enabled = True
TextBox1.Text = "Engine"
url = "https://example/resources/MultiHotkey.txt"
totalpath = "C:" & "\" & filename
Else
ListBox1.SelectedItem = "Counter Strike: Source"
RichTextBox1.Hide()
RichTextBox2.Hide()
RichTextBox3.Show()
Button6.Enabled = True
TextBox1.Text = "Hl2"
url = "https://example/resources/CSSHook.txt"
totalpath = "C:" & "\" & filename
End If
End Sub[/php]
I did the diffrent richtextboxs because I need to have the features list in a nice lined order but yeah I know my code is sloppy lol
Um adding it to a buttonclick event is just cluttering your code you should have just left the sub and then called ZOMGDOWNLOAD whenever you needed it -.-
You now don't have url declared by the looks of things so it's not even going to be able to find your filename etc
[php]
Dim lio As Integer = url.LastIndexOf("/") + 1
[/php]
you need a string variable "url" for this to work..
Same with the variable "folder", you should really have them in the sub I created or this isn't going to run properly.
At least change it to:
[php]
Private Sub DownloadSt (ByVal url As String, ByVal folder As String)
Dim client As Net.WebClient = WebClient1
Dim lio As Integer = url.LastIndexOf("/") + 1
filename = url.Substring(lio)
Dim location As String = folder
totalpath = location & "\" & filename ''
If Not IO.File.Exists(totalpath) Then
client.DownloadFile(url, totalpath)
End Sub
[/php]
And then on your button_click event, add this:
[php]
DownloadSt("Websire.com/hack.dll", "foldertodownloadto")
[/php]
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Yo It still doesn't want to work J-Deezy you got msn?
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Ight man just give me your MSN right quick so I can add you then msg you tomorrow or something.
Hey J-Deezy the free C-Panel won't let me have random users connect and download my ftp'd files in the public_html folder even tho I set the public users to be able to read and exe. Know any other nice free C-panel's like that? Which will allow users to dl without signing in?
Last edited by Lolland; 07-09-2010 at 01:40 PM.