zwo / patch_webinspect Goto Github PK
View Code? Open in Web Editor NEWSmall program to patch webinspect, so that Safari can debug any Mac App's WKWebView.
License: MIT License
Small program to patch webinspect, so that Safari can debug any Mac App's WKWebView.
License: MIT License
有中文版教程么
Looks like the path mentioned in the readme is not correct.
Here's what's actually in /System/Library/PrivateFrameworks/WebInspector.framework/Versions/A:
% ls -l
total 0
drwxr-xr-x 43 root wheel 1376 11 Aug 08:44 Resources
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 _CodeSignature
% ls -l _CodeSignature
total 8
-rw-r--r-- 4418 root wheel 747 11 Aug 08:44 CodeResources
% ls -l Resources
total 16
-rw-r--r-- 1 root wheel 1370 11 Aug 08:44 Info.plist
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 ar.lproj
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 ca.lproj
...
-rw-r--r-- 1 root wheel 523 11 Aug 08:44 version.plist
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 vi.lproj
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 zh_CN.lproj
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 zh_HK.lproj
drwxr-xr-x 3 root wheel 96 11 Aug 08:44 zh_TW.lproj
hi, I'm try to patch web inspect.
but I confuse address.
I found 0x7ff93a06c974 <+69>: testb %al, %al
and modify main.m like this
patch_mem(remoteTask, aslr_offset+0x7ff93a06c974, sizeof(unsigned short), 0xc084, 0xdb84);
webinspectord's pid is 1917
patch memory at address 0xfff274057974
can't read memory
and I'm trying to
patch_mem(remoteTask, aslr_offset+0x000000000006c974, sizeof(unsigned short), 0xc084, 0xdb84);
webinspectord's pid is 1917
patch memory at address 0x7ff93a057974
Incorrect version of process or ASLR Offset
also
patch_mem(remoteTask, 0x7ff93a06c974, sizeof(unsigned short), 0xc084, 0xdb84);
webinspectord's pid is 1917
patch memory at address 0x7ff93a06c974
Already patched
but not working.
please let me know what i did wrong
thx
请教大佬,无法正常运行,报错如下,我应该怎么做呢?
$ sudo ./patchwebinspect
webinspectord's pid is 3607
2023-06-15 16:01:04.764 patchwebinspect[3613:58856] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff39b96b57 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff71dd75bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff39c4559e -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x00007fff39b07846 -[__NSArrayM objectAtIndexedSubscript:] + 142
4 patchwebinspect 0x000000010d356882 main + 1218
5 libdyld.dylib 0x00007fff72f7fcc9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.