sarsta

Untitled

Nov 12th, 2020
666
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 9.29 KB | None | 0 0
  1. /**************************************************************************
  2. * Copyright (C) 2008-2012, Senselock Software Technology Co.,Ltd
  3. * All rights reserved.
  4. *
  5. * Description:  API library interface declaration and the error code
  6. *
  7. * History:
  8. * 08/05/2008   zhaock  R&D   create
  9. **************************************************************************/
  10.  
  11. #ifndef _LC_H_
  12. #define _LC_H_
  13.  
  14. #ifdef  _MSC_VER
  15. #pragma comment(linker, "/defaultlib:setupapi.lib")
  16. #endif
  17.  
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. #ifndef LCAPI
  24. #if defined WIN32 || defined _WIN32
  25. #define LCAPI __stdcall
  26. #else
  27. #define LCAPI
  28. #endif
  29. #endif
  30.  
  31.  
  32.  
  33. // Error Code
  34. #define LC_SUCCESS                            0  // Successful
  35. #define LC_OPEN_DEVICE_FAILED                 1  // Open device failed
  36. #define LC_FIND_DEVICE_FAILED                 2  // No matching device was found
  37. #define LC_INVALID_PARAMETER                  3  // Parameter Error
  38. #define LC_INVALID_BLOCK_NUMBER               4  // Block Error
  39. #define LC_HARDWARE_COMMUNICATE_ERROR         5  // Communication error with hardware
  40. #define LC_INVALID_PASSWORD                   6  // Invalid Password
  41. #define LC_ACCESS_DENIED                      7  // No privileges
  42. #define LC_ALREADY_OPENED                     8  // Device is open
  43. #define LC_ALLOCATE_MEMORY_FAILED             9  // Allocate memory failed
  44. #define LC_INVALID_UPDATE_PACKAGE             10 // Invalid update package
  45. #define LC_SYN_ERROR                          11 // thread Synchronization error
  46. #define LC_OTHER_ERROR                        12 // Other unknown exceptions
  47.  
  48.  
  49.  
  50. // LC Handle
  51. #if defined _X64_ || defined __x86_64__
  52.     typedef void* lc_handle_t;
  53. #else
  54.     typedef int lc_handle_t;
  55. #endif
  56.  
  57. typedef lc_handle_t reservation_t;
  58.  
  59.  
  60. #if defined _MSC_VER || defined __BORLANDC__
  61.     //for ms & bcb ide
  62.     #pragma pack(push, 8)
  63. #else
  64.     // for gcc
  65.     #ifdef __x86_64__
  66.         #pragma pack(push, 8)
  67.     #else
  68.         #pragma pack(push, 4)
  69.     #endif//__x86_64__
  70. #endif//_MSC_VER
  71.  
  72. // Hardware information structure
  73. typedef struct {
  74.     int    developerNumber; // Developer ID
  75.     char   serialNumber[8]; // Unique Device Serial Number
  76.     int    setDate;         // Manufacturing date
  77.     reservation_t    reservation;     // Reserve
  78. }LC_hardware_info;
  79.  
  80. // Software information structure
  81. typedef struct {
  82.     int    version;        // Software edition
  83.     reservation_t    reservation;    // Reserve
  84. } LC_software_info;
  85.  
  86. #pragma pack(pop)
  87. // @{
  88. /**
  89.     @LC API function interface
  90. */
  91.  
  92. /**
  93.     Open matching device according to Developer ID and Index
  94.  
  95.     @parameter vendor           [in]  Developer ID (0=All)
  96.     @parameter index            [in]  Device Index (0=1st, and so on)
  97.     @parameter handle           [out] Device handle returned
  98.  
  99.     @return value
  100.     Successful, 0 returned; failed, predefined error code returned
  101. */
  102. int LCAPI LC_open(int vendor, int index, lc_handle_t *handle);
  103.  
  104. /**
  105.     Close an open device
  106.  
  107.     @parameter handle           [in]  Device handle opened
  108.  
  109.     @return value
  110.     Successful, 0 returned; failed, predefined error code returned
  111. */
  112. int LCAPI LC_close(lc_handle_t handle);
  113.  
  114. /**
  115.     Verify device password
  116.  
  117.     @parameter handle           [in]  Device handle opened
  118.     @parameter type             [in]  Password Type(Admin 0, Generic 1, Authentication 2)
  119.     @parameter passwd           [in]  Password(8 bytes)
  120.  
  121.     @return value
  122.     Successful, 0 returned; failed, predefined error code returned
  123. */
  124. int LCAPI LC_passwd(lc_handle_t handle, int type, unsigned char *passwd);
  125.  
  126. /**
  127.     Read data from specified block
  128.  
  129.     @parameter handle           [in]  Device handle opened
  130.     @parameter block            [in]  Number of block to be read
  131.     @parameter buffer           [out] Read data buffer (greater than 512 bytes)
  132.  
  133.     @return value
  134.     Successful, 0 returned; failed, predefined error code returned
  135. */
  136. int LCAPI LC_read(lc_handle_t handle, int block, unsigned char *buffer);
  137.  
  138. /**
  139.     Write data to specified block
  140.  
  141.     @parameter handle           [in]  Device handle opened
  142.     @parameter block            [in]  Number of block to be written
  143.     @parameter buffer           [in]  Write data buffer (greater than 512 bytes)
  144.  
  145.     @return value
  146.     Successful, 0 returned; failed, predefined error code returned
  147. */
  148. int LCAPI LC_write(lc_handle_t handle, int block, unsigned char *buffer);
  149.  
  150. /**
  151.     Encrypt data by AES algorithm
  152.  
  153.     @parameter handle           [in]  Device handle opened
  154.     @parameter plaintext        [in]  Plain text to be encrypted (16 bytes)
  155.     @parameter ciphertext       [out] Cipher text after being encrypted (16 bytes)
  156.  
  157.     @return value
  158.     Successful, 0 returned; failed, predefined error code returned
  159. */
  160. int LCAPI LC_encrypt(lc_handle_t handle, unsigned char *plaintext,  unsigned char *ciphertext);
  161.  
  162. /**
  163.     Decrypt data by AES algorithm
  164.  
  165.     @parameter handle           [in]  Device handle opened
  166.     @parameter ciphertext       [in]  Cipher text to be decrypted (16 bytes)
  167.     @parameter plaintext        [out] Plain text after being decrypted (16 bytes)
  168.  
  169.     @return value
  170.     Successful, 0 returned; failed, predefined error code returned
  171. */
  172. int LCAPI LC_decrypt(lc_handle_t handle, unsigned char *ciphertext, unsigned char *plaintext);
  173.  
  174. /**
  175.     Setting new password requires developer privileges.
  176.  
  177.     @parameter handle           [in]  Device handle opened
  178.     @parameter type             [in]  Password Type(Admin 0, Generic 1, Authentication 2)
  179.     @parameter newpasswd        [in]  Password(8 bytes)
  180.     @parameter retries          [in]  Error Count (1~15), -1 disables error count
  181.  
  182.     @return value
  183.     Successful, 0 returned; failed, predefined error code returned
  184. */
  185. int LCAPI LC_set_passwd(lc_handle_t handle, int type, unsigned char *newpasswd, int retries);
  186.  
  187. /**
  188.     Change password
  189.  
  190.     @parameter handle           [in]  Device handle opened
  191.     @parameter type             [in]  Password type (Authentication 2)
  192.     @parameter oldpasswd        [in]  Old Password (8 bytes)
  193.     @parameter newpasswd        [in]  New Password (8 bytes)
  194.  
  195.     @return value
  196.     Successful, 0 returned; failed, predefined error code returned
  197. */
  198. int LCAPI LC_change_passwd(lc_handle_t handle, int type, unsigned char *oldpasswd, unsigned char *newpasswd);
  199.  
  200. /**
  201.     Retrieve hardware information
  202.  
  203.     @parameter handle           [in]  Device handle opened
  204.     @parameter info             [out] Hardware information
  205.  
  206.     @return value
  207.     Successful, 0 returned; failed, predefined error code returned
  208. */
  209. int LCAPI LC_get_hardware_info(lc_handle_t handle, LC_hardware_info *info);
  210.  
  211. /**
  212.     Retrieve software information
  213.  
  214.     @parameter info             [out] Software information
  215.  
  216.     @return value
  217.     Successful, 0 returned; failed, predefined error code returned
  218. */
  219. int LCAPI LC_get_software_info(LC_software_info *info);
  220.  
  221. /**
  222.     Calculate hmac value by hardware
  223.  
  224.     @parameter handle           [in]  Device handle opened
  225.     @parameter text             [in]  Data to be used in calculating hmac value
  226.     @parameter textlen          [in]  Data length (>=0)
  227.     @parameter digest           [out] Hmac value (20 bytes)
  228.  
  229.     @return value
  230.     Successful, 0 returned; failed, predefined error code returned
  231. */
  232. int LCAPI LC_hmac(lc_handle_t handle, unsigned char *text, int textlen, unsigned char *digest);
  233.  
  234. /**
  235.     Calculate hmac value by software
  236.  
  237.     @parameter text            [in]  Data to be used in calculating hmac value
  238.     @parameter textlen           [in]  Data length (>=0)
  239.     @parameter key               [in]  key to be used in calculating hmac value(20 bytes)
  240.     @parameter digest              [out] hmac value(20 bytes)
  241.  
  242.     @return value
  243.     Successful, 0 returned; failed, predefined error code returned
  244. */
  245. int LCAPI LC_hmac_software(unsigned char *text, int textlen, unsigned char * key, unsigned char *digest);
  246.  
  247. /**
  248.     Update block remotely
  249.  
  250.     @parameter handle           [in]  Device handle opened
  251.     @parameter buffer           [in]  Update the buffer area of data package
  252.  
  253.     @return value
  254.     Successful, 0 returned; failed, predefined error code returned
  255. */
  256. int LCAPI LC_update(lc_handle_t handle, unsigned char *buffer);
  257.  
  258. /**
  259.     Set  key
  260.  
  261.     @parameter handle           [in]  Device handle opened
  262.     @parameter type             [in]  Key type (0-Remote update key, 1-Authentication key)
  263.     @parameter key              [in]  key (20 bytes)
  264.  
  265.     @return value
  266.     Successful, 0 returned; failed, predefined error code returned
  267. */
  268. int LCAPI LC_set_key(lc_handle_t handle, int type, unsigned char *key);
  269.  
  270. /**
  271.     Generate update package
  272.    
  273.     @parameter serial           [in]  Serial Number of dongle to be updated
  274.     @parameter block            [in]  Number of block to be updated
  275.     @parameter buffer           [in]  Update content (384 bytes for Block 3, 512 bytes for Block 0~2)
  276.     @parameter key              [in]  Remote update key(20 bytes)
  277.     @parameter uptPkg           [out] Update Package(549 bytes)
  278.  
  279.     @return value
  280.     Successful, 0 returned; failed, predefined error code returned
  281. */
  282. int LCAPI LC_gen_update_pkg(unsigned char * serial, int block, unsigned char *buffer, unsigned char *key, unsigned char *uptPkg);
  283.  
  284. #ifdef __cplusplus
  285. }
  286. #endif
  287.  
  288. #endif /* end of "#ifndef _LC_H_" */
  289.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Sinmirin
    193 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 25% — 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 verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment