using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string url = "https://raw.githubusercontent.com/mangokiwimix/free3day/refs/heads/main/why";
string correctPassword = await FetchPasswordFromUrl(url);
if (string.IsNullOrEmpty(correctPassword))
{
Console.WriteLine("Failed to retrieve the password.");
return;
}
Console.Write("enter password: ");
string enteredPassword = Console.ReadLine();
if (enteredPassword != correctPassword)
{
Console.WriteLine("wrong!");
}
else
{
Console.WriteLine("thanks.");
}
}
static async Task<string> FetchPasswordFromUrl(string url)
{
using (HttpClient client = new HttpClient())
{
try
{
string responseBody = await client.GetStringAsync(url);
return responseBody.Trim();
}
catch
{
return null;
}
}
}
}
nerelerdesin aga )tam source olmasada aşağıdaki gibidir başarılar:
key: shooteshooteati
kod:C#:using System; using System.Net.Http; using System.Threading.Tasks; class Program { static async Task Main(string[] args) { string url = "https://raw.githubusercontent.com/mangokiwimix/free3day/refs/heads/main/why"; string correctPassword = await FetchPasswordFromUrl(url); if (string.IsNullOrEmpty(correctPassword)) { Console.WriteLine("Failed to retrieve the password."); return; } Console.Write("enter password: "); string enteredPassword = Console.ReadLine(); if (enteredPassword != correctPassword) { Console.WriteLine("wrong!"); } else { Console.WriteLine("thanks."); } } static async Task<string> FetchPasswordFromUrl(string url) { using (HttpClient client = new HttpClient()) { try { string responseBody = await client.GetStringAsync(url); return responseBody.Trim(); } catch { return null; } } } }
Eline sağlıktam source olmasada aşağıdaki gibidir başarılar:
key: shooteshooteati
kod:C#:using System; using System.Net.Http; using System.Threading.Tasks; class Program { static async Task Main(string[] args) { string url = "https://raw.githubusercontent.com/mangokiwimix/free3day/refs/heads/main/why"; string correctPassword = await FetchPasswordFromUrl(url); if (string.IsNullOrEmpty(correctPassword)) { Console.WriteLine("Failed to retrieve the password."); return; } Console.Write("enter password: "); string enteredPassword = Console.ReadLine(); if (enteredPassword != correctPassword) { Console.WriteLine("wrong!"); } else { Console.WriteLine("thanks."); } } static async Task<string> FetchPasswordFromUrl(string url) { using (HttpClient client = new HttpClient()) { try { string responseBody = await client.GetStringAsync(url); return responseBody.Trim(); } catch { return null; } } } }