一、SSH over http
Corkscrew是专门为ssh提供http代理的软件,要使用corkscrew需要http代理支持HTTP CONNECT方法,建议使用squid或者ATS这类专业的代理软件,代理不建议设置认证
1.1 Corkscrew安装
下载:
wget http://agroman.net/corkscrew/corkscrew-2.0.tar.gz 编译安装:
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #include <fcntl.h> | |
| char* get_local_addr(char* buf, size_t len); |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <errno.h> | |
| #include <sys/time.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <sys/mman.h> |
| <?php | |
| /* | |
| -- SQL | |
| DROP TABLE IF EXISTS `t_logs`; | |
| CREATE TABLE IF NOT EXISTS `t_logs` ( | |
| `f_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
| `f_level` tinyint(4) NOT NULL, | |
| `f_module` varchar(128) NOT NULL, | |
| `f_time` int(10) unsigned NOT NULL, | |
| `f_path` varchar(256) NOT NULL, |
| #!/usr/bin/expect -f | |
| set type [lindex $argv 0 ] | |
| set ip [lindex $argv 1 ] | |
| set cmd [lindex $argv 2 ] | |
| set timeout 10 | |
| if { $ip == "" } { | |
| puts "Usage: go web 1.2.3.4" | |
| puts "Usage: go app 1.2.3.4 dev" | |
| puts "Usage: go tws 10.137.15.150,10.198.133.45 'uptime'" |
| 1) Generate RSA key: | |
| $ openssl genrsa -out key.pem 1024 | |
| $ openssl rsa -in key.pem -text -noout | |
| 2) Save public key in pub.pem file: | |
| $ openssl rsa -in key.pem -pubout -out pub.pem | |
| $ openssl rsa -in pub.pem -pubin -text -noout | |
| 3) Encrypt some data: |
| #!/bin/bash | |
| i=1 | |
| while(($i>0)) | |
| do | |
| pid='' | |
| PSPID='' | |
| GOTED=`ss -natp|grep ESTAB|grep -E ":9003 "` |
| #!/usr/bin/perl | |
| # write by jorbenzhu, 2016-08-19 | |
| use warnings; | |
| use strict; | |
| open (FILE, "passwd") or die ("Can't open the passwd file!"); | |
| open (OUT_FILE, ">webpasswd") or die ("Can't open the webpasswd file!"); |
| @echo off | |
| IF [%1]==[] GOTO USAGE | |
| if NOT exist "%1" (ECHO "%1" path not exist & GOTO END) | |
| :DIR_PATH | |
| dir /ad /b %1 > 1.txt |
| #!/bin/bash | |
| if [ $# -lt 1 ]; then | |
| echo "usage: " $0 " shmid ..." | |
| exit 0 | |
| fi | |
| tmpfile=/tmp/shm$$ | |
| for x ; do |
一、SSH over http
Corkscrew是专门为ssh提供http代理的软件,要使用corkscrew需要http代理支持HTTP CONNECT方法,建议使用squid或者ATS这类专业的代理软件,代理不建议设置认证
1.1 Corkscrew安装
下载:
wget http://agroman.net/corkscrew/corkscrew-2.0.tar.gz 编译安装: