Hello Navi

note and sharing

Ranger 快捷键

Ranger 是一个命令行文件管理器

s: 打开 shell

s 键可以直接在当前目录打开一个 shell,非常方便执行一些临时命令。

[ 和 ]: 切换父目录

[ 键可以切换到上一个父目录,按 ] 键则切换到下一个父目录。

使用书签标记目录

  • m + somekey: 添加书签
    • m 键后再按任意一个键(作为书签的标识),即可将当前目录添加到书签中。
  • um + somekey: 删除书签
    • um 键后再按书签标识键,即可删除对应的书签。
  • ` + somekey: 打开书签
    • ` 键(位于 ~ 键下方)后再按书签标识键,即可打开对应的书签目录。

类似 Vim 的快捷键

Ranger 的导航和操作方式与 Vim 类似,以下是几组常用的快捷键:

导航

  • h: 左移(进入上级目录)
  • j: 下移(选择下一个文件/目录)
  • k: 上移(选择上一个文件/目录)
  • l: 右移(进入下级目录)

剪切、删除、粘贴和复制

  • dd: 剪切(移动文件/目录)

    • dD: 删除(删除文件/目录)
  • pp: 粘贴(将剪切/复制的文件/目录粘贴到当前目录)

  • yy: 复制(拷贝文件/目录)

只通过这一小部分快捷键,足够让你可以像在 Vim 中编译文件一样高效地操作目录。

使用 Docker 运行 MySQL

1. 快速启动 MySQL 容器

1
sudo docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
  • 使用 -p 3306:3306 将主机的 3306 端口映射到容器的 3306 端口。
  • 使用 --name mysql 为容器命名为 mysql
  • 使用 -e MYSQL_ROOT_PASSWORD=123456 设置 MySQL 的 root 用户密码为 123456
  • 使用 -d mysql:latest 后台运行最新版本的 MySQL。

2. 使用挂载卷启动

持久化数据和配置

1
2
3
4
5
6
7
sudo docker run --name mysql \
-p 3306:3306 \
-v /usr/local/docker/mysql/conf:/etc/mysql \
-v /usr/local/docker/mysql/logs:/var/log/mysql \
-v /usr/local/docker/mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-d mysql:latest

3. 进入 MySQL 容器

1
2
sudo docker exec -it mysql bash
mysql -uroot -p123456
  • sudo docker exec -it mysql bash 命令进入名为 mysql 的容器的 bash 环境。
  • mysql -uroot -p123456 命令使用 root 用户登录 MySQL,密码为 123456

4. 从本地复制文件到容器

如果需要将本地文件复制到容器中,可以使用以下命令:

1
2
docker cp 本地文件路径 ID全称:容器路径
docker cp /path/to/file.sql mysql:/root

5. 在 MySQL 中创建数据库和导入数据

1
2
3
4
mysql> create database name;
mysql> use name;
mysql> set names utf8;
mysql> source /name.sql;

不同色调的红色

  • 红色 (Red)
  • 粉红 (Pink)
  • 红褐色 (Sorrel)
  • 绯红 (Scarlet)
  • 紫红 (Purplish Red)
  • 酒红 (Wine Red)
  • 土红 (Reddle)
  • 深紫红 (Prune)
  • 淡红 (Pale Red)
  • 朱红色 (Vermilion)
  • 玫瑰红 (Rosy)
  • 橘红 (Jacinth)
  • 血红 (Blood-red)
  • 草莓红 (Strawberry Red)
  • 脸红的 (Blushing)
  • 腥红 (Crimson)
  • 珊瑚红 (Coral)

more

Encycolorpedia一个提供颜色代码和颜色匹配称呼的网站

  • 颜色代码查询:通过输入颜色代码(如 HEX、RGB)来获取详细的颜色信息。
  • 命名颜色:列出了具有特定名称的颜色及其代码。

Match The Colors - Retryables匹配给定的颜色的在线游戏

  • 游戏玩法:使用三个滑块来调整 RGB 颜色值,尽量匹配提供的目标颜色。

IDA Pro 快捷键手册

1. 视图导航 (Navigation)

高效的视图切换与地址跳转是逆向分析的基础。

  • g : Go to address
    跳转到指定地址或符号名。
  • Esc : Navigate Back
    后退,返回上一个视图位置
  • Ctrl + Enter : Navigate Forward
    前进,与 Esc 配合使用。
  • Space : Graph/Text View Switch
    切换图形模式与文本模式(反汇编视图)。
  • Ctrl + 1/2/3... : Quick View
    快速打开 Functions, Strings, Hex View 等子窗口。

2. 分析与反汇编 (Analysis & Decompilation)

逆向核心环节,处理反汇编质量与伪代码逻辑。

  • F5 : Decompile
    调用 Hex-Rays 反汇编器生成伪代码。
  • Tab : Sync Pseudocode
    在反汇编视图与伪代码视图之间同步光标位置,便于对照阅读。
  • n : Rename
    重命名函数、变量或标签。良好的命名是理解逻辑的第一步。
  • y : Set Type
    修改函数原型或变量类型。这是修正伪代码(如修复结构体、修正指针类型)最强大的工具。
  • / : Inline Comment
    在伪代码视图中添加注释。
  • ; : Assembly Comment
    在反汇编视图中为选定行添加注释。

3. 数据定义 (Data Definition)

当 IDA 自动分析失准或遇到混淆时,需要手动定义数据类型。

  • u : Undefine
    取消定义。将当前位置的代码或数据还原为原始字节。
  • c : Code disassembly 强制将当前字节序列解析为指令代码。
  • d : Data
    在 Byte/Word/Dword/Qword 之间循环切换数据定义大小。
  • a : ASCII String
    将选定区域定义为 ASCII 字符串。
  • * : Array
    创建数组。定义数据后再按此键可指定数组长度。

4. 操作数格式化 (Operands & Formatting)

调整操作数的显示格式,让常量显露原型。

  • h : Hex/Decimal Toggle
    在十六进制与十进制之间切换。
  • r : Char/String
    将立即数转换为字符(例如 0x41 -> 'A')。
  • b : Binary
    切换为二进制显示,在分析位运算(Bitmask)时非常有用。
  • o : Offset
    将立即数标记为数据段的偏移量(符号引用)。
  • m : Enum Member
    将数字转换为已定义的枚举成员。
  • k : Stack Variable
    将操作数转换为栈变量,用于修复栈帧分析。

5. 搜索与交叉引用 (Search & Cross-Ref)

追踪调用链与数据流向。

  • x : Cross-references (Xrefs)
    查看交叉引用。追踪谁调用了这个函数或谁引用了这个字符串。
  • Shift + F12 : Strings Window
    打开字符串窗口,CTF 选手的常用起手式。
  • Alt + t : Text Search
    全文文本搜索。
  • Alt + b : Binary Search
    十六进制字节搜索,寻找特征码或 Shellcode。
  • Ctrl + f : Quick Filter
    在当前的列表(如函数列表、字符串窗口)中快速过滤。

参考资源

  • Lesser-known keyboard shortcuts in IDA
  • 先知社区:IDA Pro 使用技巧总结

OSINT

  • https://www.google.com/advanced_search
  • https://yandex.com/
  • https://tineye.com/

fakenamegenerator

  • https://www.fakenamegenerator.com/

exiftool

  • https://onlineexifviewer.com/

satellite image

https://www.google.com/maps/@37.4219999,-122.0840575,3a,75y,35.56h,90t/data=!3m6!1e1!3m4!1sAFQjCNGR9Z5wZj4Y6h8q8zQ5hZ1Zl7q6Q!2e0!7i13312!8i6656

geoguessr tips

  • https://somerandomstuff1.wordpress.com/2019/02/08/geoguessr-the-top-tips-tricks-and-techniques/

email

  • https://phonebook.cz
  • https://www.voilanorbert.com/
  • clearbit connect
  • email checker
    • https://email-checker.net/check

domain

  • https://www.whois.com/whois/

data breach

  • https://dehashed.com/
  • https://weleakinfo.io/
  • https://namechk.com
  • https://whatsmyname.app/?trk=article-ssr-frontend-pulse_little-text-block
  • https://www.whitepages.com/
  • https://www.truepeoplesearch.com/
  • https://webmii.com/
  • https://thatsthem.com/
  • https://www.spokeo.com/
  • https://voterrecords.com/

hash decrypt

  • https://hashes.com/en/decrypt/hash

phone

  • https://www.truecaller.com/
  • https://calleridtest.com/

twitter search advanced

  • https://twitter.com/search-advanced
  • https://www.tweetbinder.com/blog/twitter-geocode/
  • https://thoughtfaucet.com/search-twitter-by-location/examples/
    • From the url
    • Entering the search string below let’s you use twitter location search to see their tweets:
    • geocode:38.890550,-77.009017,.02km
    • The above string will give you Tweets in a 0.02km radius around the Capitol. You can expand or shrink the geofence however you like however you like. But if you want to search Twitter for a specific date range, for example, 1/6/2021, you’ll need to add that as well:
    • geocode:38.890550,-77.009017,.02km
    • since:2021-01-05 until:2021-01-07

twitter tool

  • xPro pay to use
  • api change

maybe useful

OSINT Framework

  • https://osintframework.com/ ### integration tool
  • https://www.aware-online.com/en/ ### long-tail keyword
  • https://keywordtool.io/

网络分层模型

OSI模型(Open Systems Interconnection model),该模型分为7层:

  1. 物理层(Physical Layer)
  2. 数据链路层(Data Link Layer)
  3. 网络层(Network Layer)
  4. 传输层(Transport Layer)
  5. 会话层(Session Layer)
  6. 表示层(Presentation Layer)
  7. 应用层(Application Layer)
  • tap: 属于数据链路层(第2层)。tap设备用于在以太网帧级别操作。

  • tun, vpn: 属于网络层(第3层)。tun设备用于IP包级别操作,VPN通常工作在第3层(网络层)。

  • icmp: 属于网络层(第3层)。ICMP(Internet Control Message Protocol)用于网络设备间的控制信息传递,如ping命令。

in short

1
2
3
4
5
6
7
8
9
- **tap**: 2层(数据链路层)
- **tun, vpn**: 3层(网络层)
- **icmp**: 3层(网络层)
- **TCP/UDP**: 4层(传输层)
- **socks**: 7层(应用层)建立连接和传输数据时也涉及传输层(第4层)
- **system proxy (clash default)**: 7层(应用层)no ICMP
- **proxychains**: 7层(应用层)no ICMP
- **HTTP/HTTPS、FTP、SMTP**: 7层(应用层)
- **SSH**: 7层(应用层)使用传输层协议(通常是 TCP)22 port

tips:

  • SOCKS4:支持基本的 TCP 流量转发,不支持 UDP。
  • SOCKS5:扩展了 SOCKS4 的功能,增加了对 UDP 流量的支持,并且提供了更强的认证和安全特性。
  • proxychains 是一个工具,它会拦截应用程序的网络连接,并通过代理服务器转发这些连接。它通常用于让应用程序通过 SOCKS 或 HTTP 代理连接到网络。由于 proxychains 操作的是应用程序层的流量,并且修改传输层的连接请求,它应归类为应用层(第7层),尽管操作涉及传输层(第4层)的连接。

Configuring Proxy Settings

In the development world, setting up a proxy is a common task, especially when working behind a corporate firewall or when you want to ensure secure and private browsing. Proxies act as intermediaries between your computer and the internet, helping in filtering requests, improving security, and managing network traffic more efficiently.

NPM

Setting up Proxy in NPM

To configure npm to use a proxy, you can use the npm config set command as follows:

1
2
npm config set proxy "http://localhost:7890"
npm config set https-proxy "http://localhost:7890"

Here, http://localhost:7890 is the address of your proxy server. Change it according to your proxy server's IP address and port number.

Removing Proxy Configuration

If you need to remove the proxy configuration, for instance, when you're not behind a proxy anymore, you can use the npm config delete command:

1
2
npm config delete proxy
npm config delete https-proxy

Linux Shell Proxy Configuration

Setting up Proxy

You can set proxy environment variables in the shell as follows:

1
2
export http_proxy="http://localhost:7890"
export https_proxy="https://localhost:7890"

Replace localhost:7890 with your proxy server's IP address and port. Note the difference in the protocol (http vs. https) for http_proxy and https_proxy.

Removing Proxy Configuration

To revert the changes or to disable the use of a proxy, you can unset these environment variables:

1
2
unset http_proxy
unset https_proxy

Pip Proxy Configuration

Using Proxy with Pip

1
pip --proxy http://localhost:7890 install somepackage

Replace http://localhost:7890 with your proxy's URL. Append the name of the package you wish to install instead of somepackage.

git

1
2
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
1
2
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy https://127.0.0.1:7890
1
2
3
git config --global --unset http.proxy
git config --global --unset https.proxy

unfinished