-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAPI.cs
More file actions
53 lines (47 loc) · 2.18 KB
/
API.cs
File metadata and controls
53 lines (47 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
public static void Request()
{
try
{
string hwid = System.Security.Principal.WindowsIdentity.GetCurrent().User.Value;
string name = Environment.UserName;
string api = "// INSERT HERE YOUR PASTEBIN RAW URL //";
var textFromFile = new WebClient().DownloadString("https://pastebin.com/raw/XBqUbHVB");
string[] lines = textFromFile.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
foreach (string line in lines)
{
if (line.Contains(hwid))
{
var auth = line.Split('|');
if (auth[1] == name)
{
var date = auth[2].Split('-');
DateTime currentDate = DateTime.Now;
DateTime expiryDate = new DateTime(Convert.ToInt32(date[2]), Convert.ToInt32(date[1]), Convert.ToInt32(date[0]), 0, 0, 0);
int result = DateTime.Compare(currentDate, expiryDate);
if (result < 0)
{
// If Login Successful
Console.WriteLine($"HWID: {auth[0]}");
Console.WriteLine($"Name: {auth[1]}");
Console.WriteLine($"Expiry: {auth[2]}");
Console.WriteLine($"Discord Tag: {auth[3]}");
}
else
{
// If User Sub Expired
Console.WriteLine("The subscription has expired.");
}
}
else
{
// If PC Name does not match with DB
Console.WriteLine($"The PC name does not match with Database. ({name})");
}
}
}
Console.ReadKey();
} catch
{
}
}
}