Server IP : 127.0.0.2 / Your IP : 3.145.201.156 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/netcat-openbsd/examples/ |
Upload File : |
#! /bin/sh ## web relay -- a degenerate version of webproxy, usable with browsers that ## don't understand proxies. This just forwards connections to a given server. ## No query logging, no access control [although you can add it to XNC for ## your own run], and full-URL links will undoubtedly confuse the browser ## if it can't reach the server directly. This was actually written before ## the full proxy was, and it shows. ## The arguments in this case are the destination server and optional port. ## Please flame pinheads who use self-referential absolute links. # set these as you wish: proxy port... PORT=8000 # any extra args to the listening "nc", for instance "-s inside-net-addr" XNC='' # functionality switch, which has to be done fast to start the next listener case "${1}${RDEST}" in "") echo needs hostname exit 1 ;; esac case "${1}" in "") # no args: fire off new relayer process NOW. Will hang around for 10 minutes nc -w 600 -l -n -p $PORT -e "$0" $XNC < /dev/null > /dev/null 2>&1 & # and handle this request, which will simply fail if vars not set yet. exec nc -w 15 $RDEST $RPORT ;; esac # Fall here for setup; this can now be slower. RDEST="$1" RPORT="$2" test "$RPORT" || RPORT=80 export RDEST RPORT # Launch the first relayer same as above, but let its error msgs show up # will hang around for a minute, and exit if no new connections arrive. nc -v -w 600 -l -p $PORT -e "$0" $XNC < /dev/null > /dev/null & echo \ "Relay to ${RDEST}:${RPORT} running -- point your browser here on port $PORT" exit 0