Results 1 to 7 of 7

Thread: SRL Public/Open-Dev Downloader

  1. #1
    Join Date
    Aug 2007
    Location
    irc://irc.rizon.net:6667/srl
    Posts
    1,566
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default SRL Public/Open-Dev Downloader

    Widget's was removed for some reason so I whipped this together.


    Click the text box for the folder-browser dialog to appear (so you can choose where to download the files)
    Doesn't require subversion.

    Source:
    Code:
    Imports System.Net
    Imports System.IO
    
    Public Class Form1
        Dim Revision As String = Nothing
        Dim directories As ArrayList = New ArrayList()
        Dim newarray As ArrayList = New ArrayList()
        Dim newarray2 As ArrayList = New ArrayList()
        Dim PublicSVN = "http://www.villavu.com/repositories/srl-pub/"
        Dim OpenDev = "http://www.villavu.com/repositories/srl-opendev/"
    
        Private Sub TextBox1_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextSavePath.Click
            FolderBrowserDialog1.ShowDialog()
            TextSavePath.Text = FolderBrowserDialog1.SelectedPath
        End Sub
    
        Private Sub btnDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDownload.Click
            If TextSavePath.Text = Nothing And (Not RadioOpenDev.Checked Or Not RadioPublicSVN.Checked) Then
                MsgBox("Pick a Directory/Download option")
                Exit Sub
            End If
    
            If RadioOpenDev.Checked Then
                DownloadSVN("", OpenDev)
                DownloadSVN("SRL/", OpenDev)
                DownloadSVN("SRL/core/", OpenDev)
                DownloadSVN("SRL/misc/", OpenDev)
                DownloadSVN("SRL/skill/", OpenDev)
                DownloadSVN("AutoColor Files/", OpenDev)
                DownloadSVN("Scripting Tools/", OpenDev)
                DownloadSVN("SRL/core/AntiRandoms/", OpenDev)
                DownloadSVN("place inside plugins folder/", OpenDev)
    
                MsgBox("SRL Open-Dev Revision " & Revision & " Downloaded.")
    
            ElseIf RadioPublicSVN.Checked Then
                DownloadSVN("", PublicSVN)
                DownloadSVN("SRL/", PublicSVN)
                DownloadSVN("SRL/core/", PublicSVN)
                DownloadSVN("SRL/misc/", PublicSVN)
                DownloadSVN("SRL/skill/", PublicSVN)
                DownloadSVN("SRL/core/AntiRandoms/", PublicSVN)
                DownloadSVN("Scripting Tools/", PublicSVN)
                DownloadSVN("place inside plugins folder/", PublicSVN)
                MsgBox("SRL Public Revision " & Revision & " Downloaded.")
            End If
        End Sub
    
        Private Sub DownloadSVN(ByVal Directory As String, ByVal URL As String)
            Try
                directories.Clear()
                newarray.Clear()
                newarray2.Clear()
                Dim OpenDevURL = PublicSVN & Directory
                Dim SavePath = TextSavePath.Text & "\" & Directory
                Dim client As New WebClient
                Dim result As String = client.DownloadString(URL)
                Dim Rev() = System.Text.RegularExpressions.Regex.Split(result, "<index rev=""")
                Revision = Rev(1).Split("""")(0)
    
    
                Dim splitarray2() As String = System.Text.RegularExpressions.Regex.Split(result, "<dir name=""") 'Handle directories
                For i = 1 To splitarray2.Length - 1
                    newarray2.Add(splitarray2(i).Split("""")(0))
                Next
                For i = 0 To splitarray2.Length - 2
                    directories.Add(newarray2(i))
                    IO.Directory.CreateDirectory(SavePath & directories(i))
                Next
    
    
                Dim splitarray() As String = System.Text.RegularExpressions.Regex.Split(result, "<file name=""") 'Handle files in the current directory
                For i = 1 To splitarray.Length - 1
                    newarray.Add(splitarray(i).Split("""")(0))
                Next
                For i = 0 To splitarray.Length - 2
                    client.DownloadFile(URL & newarray(i), SavePath & newarray(i))
                Next
    
    
    
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    End Class
    Last edited by [-jesus-]; 11-11-2009 at 06:25 AM.

    "Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much because they live in the gray twilight that knows neither victory nor defeat."
    — Theodore Roosevelt

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Maybe because it was .exe? And just chuz you post source doesnt mean thats whats in the file, I trust you though of course.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Awesome story bro

    Now learn a language that isn't OS-strict :_)


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    <noidea`> [-jesus-], is a hcker. he will steel yo accounts
    <[-jesus-]> thats correct

    its malicious!
    Proof
    jk?

  5. #5
    Join Date
    Aug 2007
    Location
    irc://irc.rizon.net:6667/srl
    Posts
    1,566
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Maybe because it was .exe? And just chuz you post source doesnt mean thats whats in the file, I trust you though of course.
    It's not obfuscated, you can view the source with Reflector
    Quote Originally Posted by noidea View Post
    <noidea`> [-jesus-], is a hcker. he will steel yo accounts
    <[-jesus-]> thats correct

    its malicious!
    Proof
    jk?
    wat

    "Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much because they live in the gray twilight that knows neither victory nor defeat."
    — Theodore Roosevelt

  6. #6
    Join Date
    Nov 2007
    Location
    lol
    Posts
    176
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its safe and works perfect

  7. #7
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Harry View Post
    Now learn a language that isn't OS-strict :_)
    http://www.mono-project.com/VisualBasic.NET_support

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •