Set up iOS SSH over USB with MacPorts

文档在:http://iphonedevwiki.net/index.php/SSH_Over_USB

提供了homebrew的安装方式。这里给一下MacPorts下的安装方式。

安装过程可能会进入opam的初始化状态,如果没有的化,可以手工执行

慢的时候不要急着回车,中间会有需要输入y确认的选项

gandalf的新版mapping配置用的是json,跟wiki描述的已经不一致了。

手机连上电脑,直接执行gandalf

编辑 mapping.json,内容如下

其中:udid与上边直接执行命令时拿到的结果须一致;name自定义;forwarding里的local_port是本地开的端口,device_port是远程的端口。
按这份配置,我可以直接使用 ssh -p 10022 root@127.0.0.1 连接到iPhone的22端口。

执行下列命令,启动gandalf。

Set up iOS SSH over USB with MacPorts by @sskaje: https://sskaje.me/2017/07/set-up-ios-ssh-over-usb-with-macports/

WireGuard wg-quick PostUp的高级玩法

真的很高级。

wg-quick是WireGuard用来启动网络设备的**脚本**。

注意了,迄今为止,wg-quick是用bash写的一个脚本,不知道未来会不会变,至少目前shebang是

Continue reading “WireGuard wg-quick PostUp的高级玩法” »

WireGuard wg-quick PostUp的高级玩法 by @sskaje: https://sskaje.me/2017/06/wireguard-wg-quick-postup%e7%9a%84%e9%ab%98%e7%ba%a7%e7%8e%a9%e6%b3%95/

EdgeRouter 策略路由实现分析

最近家里的路由规则越来越复杂,而且越来越好用。正好昨天跟朋友讨论他的家用路由改造方案,所以研究了一下EdgeRouter的策略路由(Policy-based Routing,PBR)的实现。

我家里的路由是EdgeRouter Lite,固件1.9.1.1,这个实现跟固件关系不大。

首先,我们可以参考一下官方的文档:EdgeRouter – Policy-based routing (source address based)

Continue reading “EdgeRouter 策略路由实现分析” »

EdgeRouter 策略路由实现分析 by @sskaje: https://sskaje.me/2017/06/edgerouter-policy-based-routing-analysis/

SphinxQL FACET is Awesome

FACET clause. This Sphinx specific extension enables faceted search with subtree optimization. It is capable of returning multiple result sets with a single SQL statement, without the need for complicated multi-queries. FACET clauses should be written at the very end of SELECT statements with spaces between them.

FACET {expr_list} [BY {expr_list}] [ORDER BY {expr | FACET()} {ASC | DESC}] [LIMIT [offset,] count]
SELECT * FROM test FACET brand_id FACET categories;
SELECT * FROM test FACET brand_name BY brand_id ORDER BY brand_name ASC FACET property;

The FACET Feature

SphinxQL FACET is Awesome by @sskaje: https://sskaje.me/2015/06/sphinxql-facet-awesome/

OS X 下采集程序调用:sample

之前在看某个软件,一直没找到注册算法的位置。然后就发现了这个命令行工具:https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sample.1.html

sample — Profile a process during a time interval

sample is a command-line tool for gathering data about the running behavior of a process. It suspends
the process at specified intervals (by default, every 1 millisecond), records the call stacks of all
threads in the process at that time, then resumes the process. The analysis done by sample is called
sampling” because it only checks the state of the program at the sampling points. The analysis may
miss execution of some functions that are not executing during one of the samples, but sample still
provides useful data about commonly executing functions.

Profile的工具,作为逆向调试来说,再好用不过。

OS X 下采集程序调用:sample by @sskaje: https://sskaje.me/2015/04/os-%e4%b8%8b%e9%87%87%e9%9b%86%e7%a8%8b%e5%ba%8f%e8%b0%83%e7%94%a8%ef%bc%9asample/