fork(5) download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. const char* _user = "FOO";
  8. const char* _password = "BAR";
  9.  
  10. char login[21];
  11. sprintf(login,
  12. "\x15\x00\x01%-8s%-10s",
  13. _user,
  14. _password);
  15.  
  16. for (int i = 0; i < 21; i++) {
  17. printf(" %02x", login[i] & 0xff);
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
 15 00 56 43 b7 d0 10 71 b7 00 00 00 00 6b 86 04 08 f4 df 5a b7