Forum > Coding >

Bootstapper doesn't work

Iceberg

iceberg#8350

Posts: 19

Threads: 4

Joined: Dec, 2020

Reputation: 0

Posted

Alright, i just got done coding my bootstrapper but it's not working how it should be.

The Problem is that the code is not checking the version and just downloades the files.

Code:

```cs

try

            {

                WebClient wb = new WebClient();

                string versiontxtfile = wb.DownloadString("https://gitlab.com/NoobLancer/7x65assets/-/raw/master/latestversion.txt");

                string versionnow = "penis";

 

                progressindicator.Content = "Checking version";

                SetPercent(progress, 10);

                await Task.Delay(1000);

                if (versionnow.Equals(versiontxtfile) == true)

                {

                    this.Hide();

                }

                else if(versionnow.Equals(versiontxtfile) == false)

                {

                    progressindicator.Content = "Update started";

                    SetPercent(progress, 10);

                    await Task.Delay(2500);

 

                    progressindicator.Content = "Downloading the DLL";

                    SetPercent(progress, 35);

                    await Task.Delay(1500);

                    progressindicator.Content = "Downloading the Exploit";

                    SetPercent(progress, 55);

                    await Task.Delay(1500);

                    progressindicator.Content = "Downloading Assets";

                    SetPercent(progress, 70);

                    await Task.Delay(2500);

                    using (var client = new WebClient())

                    {

                        client.DownloadFile("https://gitlab.com/NoobLancer/7x65assets/-/raw/master/latestversion.txt", "coolfile.txt");

                        progressindicator.Content = "Download complete!";

                        SetPercent(progress, 100);

                        await Task.Delay(2000);

                        this.Hide();

                    }

                }

            }

``` any help?

  • 0

just trying to make an Roblox exploit

NoobDevs

ClasicExploiter

Posts: 11

Threads: 0

Joined: Nov, 2020

Reputation: 0

Replied

what the problem cant download the file?

 

edit : and where the catch?

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

You should break or exit the bootstrapper instead of just using this.Hide(). It only hides the form, it doesn't exit the program. Use something like this.Close(). So when it checks the version is correct, it immediately closes the form. Also, adding "== true" isn't needed. You can use this:

 

if (versionnow.Equals(versiontxtfile))  // Returns a true anyways

{

// Code here

}

else // If it doesn't return a true means it's false

{

// Code here

}

  • 0

TaxiDriver08

JustMarie

Posts: 1188

Threads: 31

Joined: Dec, 2020

Reputation: 6

Replied

Its because when you mention versiontxtfile it uses the code in it aka downloadString

 

Remove DownloadString from versiontxt file.

and add it to the code when you need it 

 

and like the person above me said

use this.Close not this.Hide

  • 0

JustMarie#0709

 

Iceberg

iceberg#8350

Posts: 19

Threads: 4

Joined: Dec, 2020

Reputation: 0

Replied

@TaxiDriver08 but i cant update the latest version then when i dont download the file 

  • 0

just trying to make an Roblox exploit

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@TaxiDriver08 Um sir, it doesn't. I've used it before. If you attempt to write it out the string with Console.WriteLine you will get the contents of the downloaded text file.

  • 0

Added

@Iceberg Yeah you're right

  • 0

TaxiDriver08

JustMarie

Posts: 1188

Threads: 31

Joined: Dec, 2020

Reputation: 6

Replied

@63568

code is confusing when you are on mobile -_-

  • 0

Added

@63568

also im a female

  • 0

JustMarie#0709

 

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@TaxiDriver08 Yes madam

  • 0

TaxiDriver08

JustMarie

Posts: 1188

Threads: 31

Joined: Dec, 2020

Reputation: 6

Replied

@63568

good :)

  • 0

JustMarie#0709

 

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )