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
| import os | |
| import sys | |
| from pyaxmlparser import APK | |
| def main(argv): | |
| src = argv[0] | |
| apk = APK(src) | |
| new_file = os.path.join(os.path.dirname(src), apk.package + "_" + apk.version_name + "_" + apk.version_code) + ".apk" | |
| apk.zip.close() | |
| os.rename(src, new_file) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.klzgrad.naiveproxy</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/naive</string> | |
| <string>/usr/local/etc/naiveproxy/config.json</string> |
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
| set smoothscroll |
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
| """ | |
| recovery whatsapp ios client _objc_ call. | |
| """ | |
| for func in idautils.Functions(): | |
| flags = idc.get_func_attr(func, FUNCATTR_FLAGS) # skip library & thunk functions | |
| if flags & FUNC_LIB or flags & FUNC_THUNK: | |
| continue | |
| func_name = idc.get_func_name(func) | |
| if func_name.startswith("sub_"): | |
| dism_addr = list(idautils.FuncItems(func)) |
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
| #find all system call in moudle, and and break point on it | |
| form = idaapi.find_tform("Output window") | |
| idaapi.switchto_tform(form, True) | |
| idaapi.process_ui_action("msglist:Clear") | |
| SVC_TABLE = {0: 'io_setup', 1: 'io_destroy', 2: 'io_submit', 3: 'io_cancel', 4: 'io_getevents', 5: 'setxattr', 6: 'lsetxattr', 7: 'fsetxattr', 8: 'getxattr', 9: 'lgetxattr', 10: 'fgetxattr', 11: 'listxattr', 12: 'llistxattr', 13: 'flistxattr', 14: 'removexattr', 15: 'lremovexattr', 16: 'fremovexattr', 17: 'getcwd', 18: 'lookup_dcookie', 19: 'eventfd2', 20: 'epoll_create1', 21: 'epoll_ctl', 22: 'epoll_pwait', 23: 'dup', 24: 'dup3', 25: 'fcntl', 26: 'inotify_init1', 27: 'inotify_add_watch', 28: 'inotify_rm_watch', 29: 'ioctl', 30: 'ioprio_set', 31: 'ioprio_get', 32: 'flock', 33: 'mknodat', 34: 'mkdirat', 35: 'unlinkat', 36: 'symlinkat', 37: 'linkat', 38: 'renameat', 39: 'umount2', 40: 'mount', 41: 'pivot_root', 42: 'nfsservctl', 43: 'statfs', 44: 'fstatfs', 45: 'truncate', 46: 'ftruncate', 47: 'fallocate', 48: 'faccessat', 49: 'chdir', |
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
| set smoothscroll |
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
| iOS Simulator | |
| $ lldb | |
| > process attach -n "AppName" -w | |
| Then start app in iOS Simulator (ioslib can do this from command line). LLDB will connect once it discovers the app process. | |
| iOS Device | |
| Use ios-deploy (ios-deploy -d -W -b path/to/foo.app). It will launch and connect an LLDB session. |
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 off | |
| :::::::::::::::::::::::::::: | |
| set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" | |
| fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges | |
| :: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed | |
| If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit) | |
| cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit | |
| :GotPrivileges | |
| :::::::::::::::::::::::::::: | |
| color 1F |
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
| This can be expanded to include CRC8, CRC16 , etc... | |
| : (Objective-C) | |
| #define DEFAULT_POLYNOMIAL 0xEDB88320L | |
| #define DEFAULT_SEED 0xFFFFFFFFL | |
| @interface NSData (CRC) | |
| -(uint32_t) crc32; | |
| -(uint32_t) crc32WithSeed:(uint32_t)seed; |
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 <assert.h> | |
| #include <stdbool.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <sys/sysctl.h> | |
| static bool AmIBeingDebugged(void) | |
| // Returns true if the current process is being debugged (either | |
| // running under the debugger or has a debugger attached post facto). | |
| { |
NewerOlder