Gistrec

Access to private value [shift]

Jan 11th, 2018
430
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.49 KB | None | 0 0
  1. /*
  2. struct Cls {
  3.     Cls(char c, double d, int i);
  4. private:
  5.     char c;
  6.     double d;
  7.     int i;
  8. };
  9.  
  10. Как видно, все поля этого класса закрытые, ваша задача реализовать несколько функций, которые дают полный доступ к этим полям (см. шаблон кода), несмотря на то, что они закрытые.
  11. */
  12.  
  13. // Эта функция должна предоставить доступ к полю c объекта cls.
  14. // Обратите внимание, что возвращается ссылка на char, т. е.
  15. // доступ предоставляется на чтение и запись.
  16. char &get_c(Cls &cls) {
  17.     return *(char*)(&cls);
  18. }
  19.  
  20. // Эта функция должна предоставить доступ к полю d объекта cls.
  21. // Обратите внимание, что возвращается ссылка на double, т. е.
  22. // доступ предоставляется на чтение и запись.
  23. double &get_d(Cls &cls) {
  24.     return *(double*)((char*)(&cls)+8);
  25. }
  26.  
  27. // Эта функция должна предоставить доступ к полю i объекта cls.
  28. // Обратите внимание, что возвращается ссылка на int, т. е.
  29. // доступ предоставляется на чтение и запись.
  30. int &get_i(Cls &cls) {
  31.     return *(int*)((char*)(&cls)+16);
  32. }
Advertisement
Comments
  • Izleo
    97 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without any verification from Swapzone — instant swap).
Add Comment
Please, Sign In to add comment