# 20.Cycript工具

> [cycript](http://www.cycript.org)

## 一、执行可执行文件报错

```
dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib
```

找到当前的ruby的如：`libruby.3.0.dylib`文件，赋值一份到`Cycript.lib`下，改名为`libruby.2.0.0.dylib`。

> control + d 退出

## 二、环境配置

如果配置了MonkeyDev的环境变量的话，因为自带了cycript，所以在任意路径下`cycript`都是有效的。

## 三、玩法

可以通过端口进入当前进程，访问内存环境。

***运行App***

> 方便起见使用Monkey项目运行

***获取设备ip***

***通过命令行链接***

```
cycript -r 192.168.0.102:6666
cy#
```

> 进入了cycript状态，就可以直接输入代码进行调试了


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ryukiedev.gitbook.io/wiki/ni-xiang/20.cycript-gong-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
