Last active
December 21, 2015 11:28
-
-
Save gswallow/6298756 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd /c powershell.exe -command "$webClient = New-Object System.Net.WebClient ; $webClient.DownloadFile('https://www.itefix.no/i2/sites/default/files/Copssh_3.1.4_Installer.zip', $env:TEMP + '\Copssh_3.1.4_Installer.zip')" | |
cd %TEMP% | |
cmd /c powershell.exe -command "$shell = new-object -com shell.application ; $zip = $shell.NameSpace($env:TEMP + '\Copssh_3.1.4_Installer.zip') ; 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: | |
#!/bin/bash | |
if [[ $# -eq 0 ]]; then | |
exec /cygdrive/c/windows/system32/cmd.exe /Q | |
else | |
shift | |
exec /cygdrive/c/windows/system32/cmd.exe /Q /C "$@" | |
fi | |
(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