Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. $ date >foo
  2. $ sleep 9999 <foo &
  3. [1] 2945
  4. $ rm foo
  5. $
  6. $ l /proc/2945/fd
  7. total 0
  8. lr-x------ 1 ralph ralph 64 2011-07-25 08:10 0 -> /home/tmp/1311577788.728092960/foo (deleted)
  9. lrwx------ 1 ralph ralph 64 2011-07-25 08:10 1 -> /dev/pts/0
  10. lrwx------ 1 ralph ralph 64 2011-07-25 08:10 2 -> /dev/pts/0
  11. $
  12. $ gdb --pid 2945
  13. (gdb) print lseek(0, 0, 0)
  14. $1 = 0
  15. (gdb) print malloc(1024)
  16. $2 = (void *) 0x1410030
  17. (gdb) print read(0, 0x1410030, 1024)
  18. $3 = 30
  19. ...
  20. (gdb) print creat("/tmp/recover", 0666)
  21. $8 = 3
  22. (gdb) print write(3, 0x1410030, 30)
  23. $9 = 30
  24. (gdb) print close(3)
  25. $10 = 0
  26. (gdb) quit
  27. $
  28. $ cat /tmp/recover
  29. 2011-07-25 08:09:53 +0100 Mon
  30. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement