Guest User

modify helloworld

a guest
Feb 8th, 2018
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. beet:/tmp$ cat helloworld.c
  2. #include <stdio.h>
  3. int main()
  4. {
  5. char * hw = "Hello, World!\n";
  6. printf("%s",hw);
  7. return 0;
  8. }
  9.  
  10. beet:/tmp$ gcc helloworld.c -o helloworld_variable
  11. beet:/tmp$ ./helloworld_variable
  12. Hello, World!
  13.  
  14. beet:/tmp$ cp helloworld_variable modified_helloworld_variable
  15.  
  16. beet:/tmp$ ./modified_helloworld_variable
  17. Hello, World!
  18.  
  19. beet:/tmp$ r2 -w modified_helloworld_variable
  20. -- Remember to maintain your ~/.radare_history
  21. [0x00400430]> iz
  22. vaddr=0x004005e4 paddr=0x000005e4 ordinal=000 sz=15 len=14 section=.rodata type=ascii string=Hello, World!\n
  23.  
  24. [0x00400430]> s 0x4005e4
  25.  
  26. [0x004005e4]> w Good, Bye!!!!
  27.  
  28. [0x004005e4]> q
  29. beet:/tmp$
  30. beet:/tmp$ ./modified_helloworld_variable
  31. Good, Bye!!!!
RAW Paste Data