Last active
August 29, 2015 14:07
-
-
Save illnino/4fec36d46d8c1b8b1891 to your computer and use it in GitHub Desktop.
SQLMap Shortcut
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
[SQLMap](http://sqlmap.org/) 是一个 SQL Injection 的工具. 下载到 Mac 中时, 由于 PATH 变量没有这个 path, 我们每次使用的时候都需要进到 sqlmap 的 folder, 才能调用, 这比较费时. | |
笔者使用的是 oh-my-zsh, 需要修改的文件为`~/.zshrc`, | |
**oh-my-zsh** | |
``` | |
"echo 'export PATH=/path/to/sqlmap:$PATH' >> ~/.zshrc" | |
``` | |
此时, 我们就可以在任何路径都能调用`sqlmap.py`了. 如果觉得麻烦, 我们可以再为之创造一个 alias | |
用文本编辑器打开`/Users/Nino/.oh-my-zsh/custom/example.zsh`, 增加以下代码 | |
``` | |
alias sqlmap="sqlmap.py" | |
``` | |
重启 terminal, 我们就可以使用命令 `sqlmap`来运行 sqlmap. | |
>假如阁下是用 bash 的话, 请打开`~/.profile`. | |
> | |
---------- | |
``` | |
"echo 'export PATH=/path/to/sqlmap:$PATH' >> ~/.profile" | |
``` | |
## 参考 | |
1. [How to Make a PATH on a Mac](http://www.ehow.com/how_8403347_make-path-mac.html) | |
2. [OS X: Change your PATH environment variable](http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/) | |
3. [Where to place variable assertions in zsh](http://stackoverflow.com/questions/10574684/where-to-place-path-variable-assertions-in-zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment