Advertisement
xe1phix

Xe1phix-[PMap]-Cheatsheet-[v4.5.48].sh

Oct 6th, 2022
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.63 KB | None | 0 0
  1. ##-===============================================-##
  2. ##   [+] Xe1phix-[PMap]-Cheatsheet-[v4.5.48].sh
  3. ##-===============================================-##
  4. ## ----------------------------------------------- ##
  5. ##   [?] PMap - Display Process Memory Maps
  6. ## ----------------------------------------------- ##
  7.  
  8.  
  9. ##\_________________________________________________________/##
  10. ##    /6/      \6\
  11. ##   /Y/        \Y\
  12. ##  (</__________\>)
  13. ##      |   r-  |           ## readable memory mapping
  14. ##      |   w   |           ## writable memory mapping
  15. ##      |   x   |           ## executable memory mapping
  16. ##      |   s   |           ## shared memory mapping or
  17. ##      |   p   |           ## private mapping.
  18. ##    <#---------#>
  19.  
  20.  
  21.  
  22. ## ----------------------------------------------- ##
  23. ##   [?] PMap - Provide Memory Map libraries
  24. ##              Loaded by a running process
  25. ## ----------------------------------------------- ##
  26.  
  27.  
  28. ## ------------------------------------------------------------------------------ ##
  29.      pmap -d $PID                ## Show the device format
  30. ## ------------------------------------------------------------------------------ ##
  31.      pmap --extended $PID        ## Show the extended format
  32. ## ------------------------------------------------------------------------------ ##
  33.      pmap -x $(pgrep java)       ## Show memory maps of processes running java
  34. ## ------------------------------------------------------------------------------ ##
  35.      pmap -X $PID                ## Show  even  more  details
  36. ## ------------------------------------------------------------------------------ ##
  37.      pmap -XX $PID               ## Show everything the kernel provides
  38. ## ------------------------------------------------------------------------------ ##
  39.      pmap --show-path $PID       ## Show full path in the mapping column
  40. ## ------------------------------------------------------------------------------ ##
  41.  
  42.  
  43.  
  44. ##-================================-##
  45. ##   [+] A processes memory maps
  46. ##-================================-##
  47. cat /proc/$PID/maps
  48.  
  49.  
  50. ##-===================================-##
  51. ##   [+] process memory mapped files
  52. ##-===================================-##
  53. ## ------------------------------------------------------------------------------ ##
  54. ##     [?] the process’s memory mapped (shared) files
  55. ## ------------------------------------------------------------------------------ ##
  56. pmap -x 6 | grep "[r-][w-][x-][s][R-]"
  57.  
  58.  
  59. ## ---------------------------------------------------------------------------------- ##
  60. ##   [?] PCat - Display the location of memory regions that have been copied
  61. ## ---------------------------------------------------------------------------------- ##
  62. pcat -v $PID
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement