Skip to content

Instantly share code, notes, and snippets.

Last active December 21, 2015 11:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
cmd /c powershell.exe -command "$webClient = New-Object System.Net.WebClient ; $webClient.DownloadFile('', $env:TEMP + '\')"
cd %TEMP%
cmd /c powershell.exe -command "$shell = new-object -com shell.application ; $zip = $shell.NameSpace($env:TEMP + '\') ; foreach($item in $zip.items()) { $shell.Namespace($env:TEMP).copyhere($item) }"
cmd /c copssh_3.1.4_Installer.exe /u=SVCCopSSH /p="user" /S
cmd /c "%PROGRAMFILES(x86)%\icw\bin\copsshadm.exe" --command activateuser --user user --shell /bin/bash
cmd /c netsh advfirewall firewall add rule name="SSH" protocol=TCP dir=in localport=22 action=allow enable=yes
c:\program files(x86)\icw\bin\sh.exe
export PATH=/bin
nano -w /bin/cmd:
if [[ $# -eq 0 ]]; then
exec /cygdrive/c/windows/system32/cmd.exe /Q
exec /cygdrive/c/windows/system32/cmd.exe /Q /C "$@"
(Save with ^X)
nano -w /etc/passwd:
Change your user's shell to /bin/cmd
chmod 755 /bin/cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment