Advertisement
Guest User

Untitled

a guest
Apr 26th, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. #include <bits/stdc++.h> //макоебы соснули
  2. int main(int argc, char **argv) {
  3.     srand((unsigned long long int)argv[0]);
  4.     std::ofstream of("zalupa.bin", std::ios::binary);
  5.     for (int blocks = 10; blocks --> 0; ) {
  6.         int len = 100 + rand() % 1000;
  7.         of << 0x5b << 0x5d << (len & 0xFF) << ((len&0xFF00)>>8) << 0x0d << 0x0a;
  8.         char pseudo_random[12];
  9.         of.write(pseudo_random, 12);
  10.         of << (0x08 + (rand() % 2)) << (rand() % 2);
  11.         char pseudo_random[12];
  12.         of.write(pseudo_random, 12);
  13.         int a = htons(rand()), b = htons(rand());
  14.         of << ((a&0xFF000000)>>24);
  15.         of << ((a&0xFF0000)>>16);
  16.         of << ((a&0xFF00)>>8);
  17.         of << ((a&0xFF)>>0);
  18.           // ХУЙ \\
  19.         of << ((b&0xFF)>>0);
  20.         of << ((b&0xFF00)>>8);
  21.         of << ((b&0xFF0000)>>16);
  22.         of << ((b&0xFF000000)>>24);
  23.         char pseudo_random[len - 40];
  24.         of.write(pseudo_random, len - 40);
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement