mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-08-27 18:30:24 +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
|
```bash
|
||||||
# NAME="UserName" ### <-- Set UserName
|
# NAME="UserName" ### <-- Set UserName
|
||||||
U=$(id -u ${NAME:?}) \
|
U=$(id -u ${NAME:?}) \
|
||||||
|
G=$(id -g ${NAME:?}) \
|
||||||
&& H="$(grep "$U" /etc/passwd | cut -d: -f6)" \
|
&& 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.
|
# change bash to -bash to make this a login shell.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user