C# - Download String

S

Selyk

Prince Of Darkness
Super Moderator
Joined
Sep 6, 2020
Messages
2,470
Reaction score
1,626
Code:
            string accountName = "";
            bool accFound = false;


            WebClient client = new WebClient();
            client.Headers.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36");
            string[] download = client.DownloadString(getLink()).Split(new string[] { Environment.NewLine, "\n", "\"r" }, StringSplitOptions.None);

            foreach (string user in download)
            {
                if (user.StartsWith("?bakim"))
                {
                    MessageBox.Show("Client şuan bakımda!\nLütfen sonra tekrar deneyin.","Client");
                    this.Close();
                    return;
                }

                if (user.StartsWith("#")) continue;


                if (user.Contains("@"))
                {
                    string cpuId = user.Split('@')[1];
                    if (cpuId == uniqueId)
                    {
                        string username = user.Split('@')[0];
                        accountName = username;
                        accFound = true;

                    }
                }
            }

            if (accFound)
            {
                this.logMessage.Text = "Account Found \n";
                this.logMessage.Left = Width / 2 - logMessage.Width / 2;
                this.accName.Text = accountName;
                this.accName.Left = Width / 2 - accName.Width / 2;

            } else
            {
                accFound = false;

                Clipboard.SetText(uniqueId);
                MessageBox.Show("Hesap bulunamadi. Eğer satın aldıysan bu kodu kişiye gönder. " + uniqueId);
                //test
            }
 
X

xr4zz3rs

Founder
Owner
Joined
Oct 12, 2019
Messages
756
Reaction score
9,269
Location
MmUnmapLockedPages
Diğer örnek (Kolay yol);

C#:
using System.Net;
using System.Threading;

static void Main(string[] args)
{
    if(DownloadString("https://api.ipify.org") != "1.1.1.1") // Eğer DownloadString 1.1.1.1'i geri döndürmezse...
    {
        Console.WriteLine("IP adresiniz 1.1.1.1 olmak zorundadır!");
        Sleep(10000); // 10 saniye bekle...
        Environment.Exit(0); // Çıkış.
    }
    Console.ReadLine();
}

public static string DownloadString(string url)
{
    WebClient webClient = new WebClient();
    return webClient.DownloadString(url);
}
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom