Last active
July 23, 2019 04:04
-
-
Save caramelchocolate/d9750cf6eac7b8a8bec22423ae6f7075 to your computer and use it in GitHub Desktop.
collect /etc/hosts in jail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
jls | awk 'NR>1 {print $4}' | awk -F'/' '{print $NF}' | xargs -I@ sh -c 'j=@; c=$(jexec ${j} cat /etc/hosts); echo "${c}" > "${j}.txt"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment