Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    hitmen69's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    in croatia?
    Posts
    57
    Reputation
    10
    Thanks
    101
    My Mood
    Amazed

    [HELP] getting information for my downloader in vb2010

    hello there,
    im making downloader and i need help..
    image:

    how to get correct file information every time when i choose another link?

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    How are you downloading the file? Using a WebClient?

    [highlight=vb.net]Private WithEvents wc As New WebClient

    Private Sub downloadFile()
    wc.DownloadFileAsync(New Uri("https://www.somesite.com/file.rar"), "C:\SomeFolder\file.rar")
    End Sub

    Private Sub wc_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wc.DownloadProgressChanged
    MsgBox("Total Size - " & e.TotalBytesToReceive) 'This is going to keep popping up everytime it downloads a part of the file
    MsgBox("Downloaded - " & e.BytesReceived & " bytes")
    MsgBox("Percentage - " & e.ProgressPercentage & "%")
    End Sub[/highlight]
    Last edited by master131; 04-06-2011 at 05:31 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. #3
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    The name depends on the site you are downloading from I think

  4. #4
    hitmen69's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    in croatia?
    Posts
    57
    Reputation
    10
    Thanks
    101
    My Mood
    Amazed
    ok but how to get name of file and size ( that is writing on site from what i m downloading )
    look picture :


  5. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by hitmen69 View Post
    ok but how to get name of file and size ( that is writing on site from what i m downloading )
    look picture :

    Are you always getting mFire links?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    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)

  6. #6
    hitmen69's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    in croatia?
    Posts
    57
    Reputation
    10
    Thanks
    101
    My Mood
    Amazed
    what?

  7. #7
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Quote Originally Posted by hitmen69 View Post
    what?
    The direct link for media fire uploads will change periodically so you will need to find another uploading service.

  8. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by hitmen69 View Post
    what?
    I said, are the links your using ALWAYS from Media Fire?

    EDIT: Here's a fit-all method to get the size of the file in question that I just wrote up.

    [highlight=vb.net]
    Private Function getFileSize(ByVal file As String) As Integer
    Dim retVal As Integer = 0
    Dim webReq As HttpWebRequest = CType(WebRequest.Create(file), HttpWebRequest)
    Using webResp As HttpWebResponse = CType(webReq.GetResponse, HttpWebResponse)
    Dim cLength As String() = webResp.Headers.GetValues("Content-Length")
    If cLength.Length > 0 Then retVal = cLength.Single
    End Using

    Return retVal
    End Function
    [/highlight]

    [highlight=vb.net]
    MsgBox(getFileSize("https://flstudio.image-line.com/documents/DeadMau5Mini.png"))
    [/highlight]

    Let me know if that works.
    Last edited by Jason; 04-06-2011 at 08:06 PM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    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)

  9. #9
    ³²³'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    sef
    Posts
    302
    Reputation
    9
    Thanks
    19
    My Mood
    Angelic
    Code:
    Dim WC as New System.Net.WebClient
    
    WC.DownloadFileAsync(New Uri("https://www.lol.com/dogs.dll"),"c:/dogs.dll")
    Play around with that. I remember getting it to have progressbars a while back, and KBs / Total KBs.

  10. #10
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by ³²³ View Post
    Code:
    Dim WC as New System.Net.WebClient
    
    WC.DownloadFileAsync(New Uri("https://www.lol.com/dogs.dll"),"c:/dogs.dll")
    Play around with that. I remember getting it to have progressbars a while back, and KBs / Total KBs.
    Not really what he wanted. He wants the download info prior to downloading the file. Also, Master131 already illustrated that method, but actually in detail.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    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)

  11. #11
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by Jason View Post


    Not really what he wanted. He wants the download info prior to downloading the file. Also, Master131 already illustrated that method, but actually in detail.
    Not minding that the path is invalid :P.
    Last edited by Blubb1337; 04-07-2011 at 07:27 AM.



  12. #12
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Blubb1337 View Post
    Not minding that the desktoppath is invalid :P.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    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)

  13. #13
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    c:/dogs.dll
    I'm just saying that the path is invalid ^.-.

    Nvm.



  14. #14
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Blubb1337 View Post
    I'm just saying that the path is invalid ^.-.

    Nvm.
    Pseudocode is pseudocode + It's not a desktop path

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    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)

  15. #15
    hitmen69's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    in croatia?
    Posts
    57
    Reputation
    10
    Thanks
    101
    My Mood
    Amazed
    Quote Originally Posted by Jason View Post


    I said, are the links your using ALWAYS from Media Fire?

    EDIT: Here's a fit-all method to get the size of the file in question that I just wrote up.

    [highlight=vb.net]
    Private Function getFileSize(ByVal file As String) As Integer
    Dim retVal As Integer = 0
    Dim webReq As HttpWebRequest = CType(WebRequest.Create(file), HttpWebRequest)
    Using webResp As HttpWebResponse = CType(webReq.GetResponse, HttpWebResponse)
    Dim cLength As String() = webResp.Headers.GetValues("Content-Length")
    If cLength.Length > 0 Then retVal = cLength.Single
    End Using

    Return retVal
    End Function
    [/highlight]

    [highlight=vb.net]
    MsgBox(getFileSize("https://flstudio.image-line.com/documents/DeadMau5Mini.png"))
    [/highlight]

    Let me know if that works.
    i get 2 errors..
    image:

Page 1 of 2 12 LastLast