SkillAgentSearch skills...

InjectURLProtocol

cycript script for injecting a custom NSURLProtocol into a running application

Install / Use

/learn @keith/InjectURLProtocol
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

injectURLProtocol

This is a simple cycript script for injecting a custom NSURLProtocol that logs every HTTP request.

Installation

Install cycript. If you'd like to use homebrew instead you can use my tap with:

$ brew install keith/formulae/cycript

Then copy injectURLProtocol.cy to somewhere you can reference it.

Usage

Run the script in the process in question:

$ cycript -p APPLICATION injectURLProtocol.cy

Then open Console.app to see messages formatted like this:

1/1/70 00:00:00.000 Slack[83206]: Req: POST https://slack.com/api/api.test?error= Headers: {
    "Content-Type" = "application/x-www-form-urlencoded";
    Origin = "file://";
    "User-Agent" = "...";
}

NOTE: To make it easier to just see these requests, you can filter by searching for Req:

Alternatives

Depending on what else you're doing with cycript, you might actually be better off using CFNETWORK_DIAGNOSTICS which can provide similar functionality without any addition configuration. You can simple using this environment variable when launching the binary in question like this:

$ CFNETWORK_DIAGNOSTICS=3 path/to/binary

Warning

This script could print sensitive information into your console. Be careful out there!

Related Skills

View on GitHub
GitHub Stars29
CategoryDevelopment
Updated4mo ago
Forks5

Languages

Cycript

Security Score

92/100

Audited on Nov 9, 2025

No findings