This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // message sent to nil: redirect to nil receiver, if any | |
| LMsgSendNilSelf: | |
| call 1f // load new receiver | |
| 1: popl %edx | |
| movl __objc_nilReceiver-1b(%edx),%eax | |
| testl %eax, %eax // return nil if no new receiver | |
| je LMsgSendReturnZero | |
| movl %eax, self(%esp) // send to new receiver | |
| jmp LMsgSendReceiverOk // receiver must be in %eax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Foundation/Foundation.h> | |
| extern id _objc_setNilReceiver(id newNilReceiver); | |
| @interface Foo:NSObject{} | |
| @end | |
| @implementation Foo | |
| - (void) some { | |
| NSLog(@"Some"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| perl -pe "s/some/some2/g" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ c++filt __ZNKSs16find_last_not_ofEcm | |
| std::string::find_last_not_of(char, unsigned long) const |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def a(addr): | |
| ... print "0x%x"%(addr-0x1000+0x51000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "HEAD / HTTP/1.0\n Host: example.com:443\n\n EOT\n" | openssl s_client -prexit -connect example.com:443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clang -framework Foundation -fobjc-arc test.m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo /usr/sbin/DevToolsSecurity --enable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export DEVELOPER_DIR="/Users/johann/XcodesFolder/Xcode_4_6_3/Xcode.app/Contents/Developer"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. extract old entitlements | |
| codesign -d --entitlements :entitlements.plist Payload/PathToApp.app/ | |
| 2. fix entitlements, or just copy from provisioning profile | |
| 3. copy new provprofile to Payload/PathToApp.app/embedded.mobileprovision | |
| 4. fix bundle id in info.plist | |
| 4.1 /usr/libexec/PlistBuddy Info.plist | |
| 4.2 set CFBundleIdentifier new.app.bundle.id.with.no.team.id | |
| 4.3 save |