mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-04-29 14:46:06 +02:00
Update README.md
This commit is contained in:
@@ -1821,8 +1821,9 @@ Needed for taking screenshots of X11 sessions (aka `xwd -root -display :0 | conv
|
||||
```bash
|
||||
# NAME="UserName" ### <-- Set UserName
|
||||
U=$(id -u ${NAME:?}) \
|
||||
G=$(id -g ${NAME:?}) \
|
||||
&& H="$(grep "$U" /etc/passwd | cut -d: -f6)" \
|
||||
&& HOME="${H:-/tmp}" python3 -c "import os;os.setuid(${U:?});os.execlp('bash', 'bash')"
|
||||
&& HOME="${H:-/tmp}" python3 -c "import os;os.setgid(${G:?});os.setuid(${U:?});os.execlp('bash', 'bash')"
|
||||
# change bash to -bash to make this a login shell.
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user