MBPentest,自己的MBP配置手册
- 新建文件
选中文字 -> 拖出去
- 新建标签
Command + T
- 新建窗口
Command + N
- 切换标签
Command + Num
- 关闭标签
Command + W
- 全屏
Command + Control + F
- 设置
Command + ,
- 删除文件
Command + Delete
- 清空垃圾桶
Shift + Command + Delete
- 锁屏
Control + Command + Q
- 截整个屏幕
Command + Shift + 3
- 截取选择区域
Command + Shift + 4
- 截取bar
Command + Shift + 5
- 最小化窗口
Command + M
command + tab 然后按option来恢复最小化的窗口
- 快速隐藏窗口
Command + H
- 打开便签,快速记录
复制-> Command + Shift + Y
- 在当前文件夹进入终端(自定义)
Command + ;
- finder 进入目录
Shift + Command + G
- home
Control + a
- end
Control + e
- page down
fn + down
- page up
fn + up
- 显示桌面
F11 or 四🈯️分开
- 显示控制台
四🈯️🈴️拢
- 查看字典
三🈯️点击
- 前进\后退
双🈯️左右滑
- option+单击dock图标
最小化
快捷键 | 功能 |
---|---|
长按Space | 显示快捷列表 |
Space + S | 打开Sublime应用 |
Space + I | 打开Iterm2应用 |
Space + W | 打开微信应用 |
Space + G | 打开Google页面 |
Space + F then D | 打开下载文件夹 |
Space + F then T | 打开🔧文件夹 |
brew install m-cli
- m help
- m battery status 显示电量
- m wifi showpassword 显示当前wifi密码
- m firewall disable 关闭防火墙
- m trash clean 清理垃圾箱
- 其他见github
使用Iterm2配合zsh
- Iterm2
- zsh
sh -c $(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)
输入命令时可提示自动补全,然后按键盘 → 即可补全.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
配置.zshrc
plugins=(zsh-autosuggestions)
日常用的命令会高亮显示
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
配置.zshrc
plugins=(zsh-syntax-highlighting)
实现目录间快速跳转,想去哪个目录直接 j + 目录名
brew install autojump
配置.zshrc
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
选的字体Roboto Mono Medium for Powerline 14pt
-
Keys -> Hotkey 设置
command + l
快速显示和隐藏 iTerm
配置profile文件,进行ssh管理
配置快捷键,启动不同的窗口,或command+o打开profiles界面
ZSH_THEME=ys
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
配置alias
alias proxy_ss="export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;"
alias proxy_burp="export http_proxy=http://127.0.0.1:8080"
alias proxy_reset="unset http_proxy;unset https_proxy"
快捷键 | 功能 |
---|---|
command + l | 热键启动 |
command + shift + d | 横切 |
command + d | 竖切 |
command + [] | 切屏 |
command + shift + i | 多窗口同步命令执行 |
command + o | 打开profiles界面 |
command + t | 打开标签 |
command + 1 | 切换标签 |
Homebrew, OS X 系统中最受欢迎的包管理工具
ruby -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
安装完成后,Homebrew 会将本地 /usr/local 初始化为 git 的工作树,并将目录所有者变更为当前所操作的用户,将来 brew 的相关操作不需要 sudo
brew install
brew cask install
brew update
brew upgrade <package_name>
brew info <package_name>
brew list --versions
brew cask list --versions
brew doctor
brew uninstall
brew cleanup
brew services list
brew services start mysql
curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm install 2.5.3
rvm use 2.5.3 --default
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
git clone https://github.com/rapid7/metasploit-framework.git
brew install libxml2
brew install sqlite3
brew install postgresql
gem install bundle
bundle install
解决pg安装失败
sudo env ARCHFLAGS=-arch x86_64 gem install pg -v '0.20.0'
解决sqlite3安装失败
sudo gem install sqlite3 -v '1.3.13' -- --with-sqlite3-dir=/usr/local/opt 指定sqlite3的路径
alias pg_start=pg_ctl -D /usr/local/var/[email protected] -l /usr/local/var/[email protected]/server.log start
alias pg_start=pg_ctl -D /usr/local/var/[email protected] -l /usr/local/var/[email protected]/server.log stop
createuser msf -P
createdb -p 5432 msfdb
psql -U msf msfdb
0x01
解压 cobaltstrike.jar
0x02
jad common\License.class
得到 License.java
0x03
vim License.java
private static long life = 65535L
0x04
javac进行编译得到 License.class
javac common\License.java
0x05
将License.class 放入cobaltstrike.jar原来的位置替换
brew install proxychains-ng
无法全部程序代理,只能在homebrew bin目录下的程序可代理
brew link curl --force
proxychains curl ipconfig.io
内网穿透常用
- L6Z8A-XY2J4-BTZ3P-ZZ7DF-A2Q9C(携带版)
- 5EZ8G-C3WL5-B56YG-SCXM9-6QZAP(标准版)
- P427L-9Y552-5433E-8DSR3-58Z68(MAC)
{
"server":"0.0.0.0",
"server_port":9999,
"local_port":1080,
"password":"pass",
"timeout":600,
"method":"aes-256-cfb"
}
更加棒的代理工具
Mac下最好用的虚拟机
mount -o exec /dev/cdrom /media/cdrom
cd /media/cdrom/
sudo ./install
linux最新内核安装pdtools需要使用最新的Parallels
快捷键 | 功能 |
---|---|
Ctrl + ` | 打开控制台 |
Command+Shift+P | 打開控制面板 |
Ctrl+P | 文件切换面板 |
Ctrl+Command+F | 全屏 |
Opt+Commad+num | 分屏 |
Ctrl+Num | 跳转到分屏页 |
Ctrl+j | 选中的行合并为一行 |
Reveal in Finder | 在finder中打开 |
长按Command | 向下多行选择 |
{
"color_scheme": "Packages/ayu/ayu-mirage.sublime-color-scheme",
"dpi_scale": 1.0,
"font_face": "source code pro for Powerline",
"font_size": 15,
"highlight_line": true,
"ignored_packages":
[
],
"open_files_in_new_window": false,
"theme": "ayu-mirage.sublime-theme",
"word_wrap": true,
"draw_minimap_border": false,
"always_show_minimap_viewport": false,
}
- brew 安装程序目录
/usr/local/Cellar
- brew 配置程序目录
/usr/local/etc
- /usr/local/Cellar里程序的软连接
/usr/local/opt
- dmg安装的应用
/Applications
- Xcode command line tools
/Library/Developer/CommandLineTools/usr/bin
- iBooks书目录
~/Library/containers/com.apple.BKAgentService/Data/Documents/iBooks/Books
- pip
/usr/local/lib/python2.7/site-packages
- pip3
/usr/local/lib/python3.7/site-packages
- 开机启动
~/Library/LaunchAgents
- 驱动目录
/System/Library/Extensions
- say 将文本转为语音
say 你好
say -v '?' | grep zh
say -v mei-jia 你好
say -f test.txt -o test.aif #将文本转换为音频
- 显示监听端口
lsof -nP -iTCP -sTCP:LISTE
netstat -an | grep LISTEN
- 开机启动命令
launchctl list
launchctl stop com.philandro.anydesk
launchctl unload com.philandro.anydesk
- open命令
open . > 打开当前目录
open -e > 打开编辑器
- 索引
mds_stores
mdutil -a -i off
mdutil -a -i on
- 休眠时断网
sudo pmset -b tcpkeepalive 0
- Mojave中开启深色菜单栏和dock栏
1. 使用浅色主题
2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
3. 退出账号重新登录,选择暗色主题
> 完全恢复暗色主题
> defaults delete -g NSRequiresAquaSystemAppearance
火狐打不开问题
defaults write org.mozilla.firefox NSRequiresAquaSystemAppearance 1
- Termius键盘长安问题
defaults write -g ApplePressAndHoldEnabled -bool false
重启
- Finder 标题显示路径
defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE;killall Finder
恢复
defaults delete com.apple.finder _FXShowPosixPathInTitle;killall Finder
- 命令工具中文变英文
sudo languagesetup
- chrome使用浅色模式
defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool YES
defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool NO