rainit2006 / Anything

0 stars 0 forks source link

有用的工具 #24

Open rainit2006 opened 4 years ago

rainit2006 commented 4 years ago

////

rainit2006 commented 4 years ago

OpenAPI工具

Swagger

https://editor.swagger.io/

Postman

Postman vs Swagger

https://stackshare.io/stackups/postman-vs-swagger-ui#:~:text=Postman%20is%20the%20only%20complete,that%20dynamically%20generate%20beautiful%20documentation%22

rainit2006 commented 4 years ago

压测工具

JMeter

Locust

https://locust.io

rainit2006 commented 4 years ago

Security工具

DNS劫持

rainit2006 commented 3 years ago

把目录里的MD文件一次性转换成HTML

Gitbook-cli


### 工具名:markdown-folder-to-html
https://github.com/joakin/markdown-folder-to-html
(需要先安装nodejs,参考:https://hirooooo-lab.com/development/nstall-node/)
存在的问题:左侧Menu表示有问题。

## 多个MD文件统合成一个MD
用Visual Studio Code的一个插件:MarkdownCat。(不过这个工具还不是不够效率,无法自动把所有MD,特别是子目录下的MD文件统合起来)
https://poyonshot.hatenablog.com/entry/2019/05/22/223757
rainit2006 commented 3 years ago

Parallel desktop

Parallels Desktop 16 for Mac. 再起動せずに Mac で Windows を実行できる、簡単で高速、そしてパワフルなアプリケーションです。

rainit2006 commented 3 years ago
rainit2006 commented 3 years ago

tbl工具,可以导出E-R图

https://github.com/k1LoW/tbls#quick-start 命令: tbls doc mysql://dbuser:dbpass@hostname:5432/dbname

rainit2006 commented 3 years ago

SSH tunnel

Difference between -L and -D

ssh -L opens a local port. Everything that you send to that port is put through the ssh connection and leaves through the server. If you do, e.g., ssh -L 4444:google.com:80, if you open http://localhost:4444 on your browser, you'll actually see google's page. ssh -D opens a local port, but it doesn't have a specific endpoint like with -L. Instead, it pretends to be a SOCKS proxy. If you open, e.g., ssh -D 7777, when you tell your browser to use localhost:7777 as your SOCKS proxy, everything your browser requests goes through the ssh tunnel. To the public internet, it's as if you were browsing from your ssh server instead of from your computer.

https://note.crohaco.net/2017/ssh-tunnel/ https://www.clear-code.com/blog/2014/9/12.html

例子:ssh www.example.com:22 -L 3307:mysql.example.com:3306
localhost:3307 と mysql.example.com:3306 がトンネルでつながっています。

-L オプション でトンネルは掘ってくれましたが、接続先サーバでシェルが起動してしまいました。トンネルするためなのでシェルは要らないという場合、 -Nオプション を指定します。
$ ssh -N www.example.com:22 -L 3307:mysql.example.com:3306

固まり続けるターミナルなんて私は要りません。今度は同時に -f オプション をつけてみましょう。
$ ssh -fN www.example.com:22 -L 3307:mysql.example.com:3306

多段接続する (Multi stage connection):-tオプション の後ろには SSH接続先のサーバで実行するためのコマンドを記述できます。
$ ssh gateway.example.com -fNL 3307:mysql.example.com:3306 -t ssh www.example.com

-D オプション はアプリケーションレベルの動的なポート転送を指定します。 Socks代理用
$ ssh gateway.example.com -fND localhost:8888
然后设定浏览器的proxy(socket方式),这样就可以浏览器里访问target的web service了。
(需要用firefox设置socks proxy)

Remote forwarding: -R option
ローカルからリモートにトンネルを張ってもらい、 それ以降の通信はリモートからローカルに行われるのでローカルフォワーディングとは逆になります。

~/.ssh/config 设定:

Case1: local forwarding:

Host www.example.com
    HostName www.example.com
    User username
    ProxyCommand ssh -W %h:%p gateway.example.com
    IdentityFile ~/.ssh/id_rsa

Host www.gateway.com
    HostName www.gateway.com
    User username
    ProxyCommand ssh -W %h:%p gateway2.example.com
    IdentityFile ~/.ssh/id_rsa2

Host gateway2.example.com
    HostName gateway2.example.com
    User username
    IdentityFile ~/.ssh/id_rsa3

Case2: With this information the command line

ssh -R 55555:localhost:22 user@host

translates into the following .ssh/config syntax:

Host host
HostName host
User user
RemoteForward 55555 localhost:22

Local forwarding(-L) VS Remote forwarding (-R)

https://www.youtube.com/watch?v=N8f5zv9UUMI

rainit2006 commented 3 years ago

Socks代理 https://dev.classmethod.jp/articles/socks-proxy-and-http-proxy/ Socks属于一个代理协议,可以在一些应用层协议中间工作(比如HTTP(S),FTP等)。SOCKS5是SOCKS协议的最新版本。它通过支持UDP和TCP对SOCKS4进行了改进,增加支持UDP、验证,以及IPv6。Socks5代理协议支持多种协议,理论上应用层协议都可以支持,比如HTTP(S)/WS(S)/SSH等。实际上,HTTP代理是最常用的代理服务器,但SOCKS5的确有它的优点。它们可以处理更多协议并绕过防火墙,从而使它们成为需要隐私而又无需太多工作的人的重要工具。

SOCK4代理协议可以说是对HTTP代理协议的加强,它不仅是对HTTP协议进行代理,而是对所有向外的连接进行代理,是没有协议限制的。也就是说,只要你向外连接,它就给你代理,并不管你用的是什么协议,极大的弥补了HTTP代理协议的不足,使得很多在HTTP代理情况下无法使用的网络软件都可以使用了。(例如:OICQ、MSN等软件 )SOCK5代理协议又对前一版进行了修改,增加了支持UDP代理及身份验证的功能。它不是“协议代理”,所以它会对所有的连接进行代理,而不管用的是什么协议。

rainit2006 commented 3 years ago

Nessus经验总结

Nessus对Vmware里的service进行扫描

需要To scan VMware guest systems, Ping the remote host must be set to Off. 否则Nessus会认为host is dead。 https://docs.tenable.com/nessus/Content/DiscoverySettings.htm

Nessus在Ubuntu上安装失败

注意:要用文件名带 “-amd”的安装包。