The goal here is to provide quick and easy but secure client VPN that can be configured natively without any additional software on:
- Linux
- iOS
- Android
- Windows
- OSX
#!/bin/bash | |
# read from stdin | |
while read line | |
do | |
echo "$line" | |
done < "${1:-/dev/stdin}" | |
# read from file | |
while read line |
@ECHO off | |
:top | |
CLS | |
ECHO Choose a shell: | |
ECHO [1] cmd | |
ECHO [2] bash | |
ECHO [3] PowerShell | |
ECHO [4] Python | |
ECHO. | |
ECHO [5] restart elevated |
If tmux fails with an error terminal open failed: missing or unsuitable terminal: rxvt-unicode-256color
log in to your remote host and create .terminfo/r in your home directory:
mkdir -p ~/.terminfo/r
copy terminal information file to remote machine:
scp /usr/share/terminfo/r/rxvt-unicode* remote.host:~/.terminfo/r/
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
apt-get clean autoclean | |
apt-get autoremove --yes | |
rm -rf /var/lib/{apt,dpkg,cache,log}/ |
Here's a few things I tried to write output to a python subprocess pipe.
from subprocess import Popen, PIPE
p = Popen('less', stdin=PIPE)
for x in xrange(100):
p.communicate('Line number %d.\n' % x)