These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.
Modern operating systems, booted inside Real
mode,
public void nativeGenerate2() { | |
System.out.println("start call nativeGenerate2"); | |
DvmClass SecureNative_cls = vm.resolveClass("com/xunmeng/pinduoduo/secure/SecureNative"); | |
DvmObject<?> context = vm.resolveClass("android/content/Context").newObject(null); | |
int context_ptr = vm.addLocalObject(context); | |
int str1_ptr = vm.addLocalObject(new StringObject(vm, "")); | |
int str2_ptr = vm.addLocalObject(new StringObject(vm, "Ck5UqWFzreofeABcWvkAAg==")); | |
int str3_ptr = vm.addLocalObject(new StringObject(vm, "1Hdy4cQW")); | |
int str4_ptr = vm.addLocalObject(new StringObject(vm, "/storage/emulated/0")); | |
int str5_ptr = vm.addLocalObject(new StringObject(vm, "version=134&info=g6iUSuzNlWeDi%2FxPng%2FN%2B8ZyQEP%2FnQuHC42hkmSWvCOg79IqfkRW5Lu3jsAh0QwizbgZZSg1FOEI%0Ao4R%2F6pw6XXsv%2FxH%2FzUDXzxJ5UXUYGMSYhF%2BULFIhbWMihyiUWSRA%2FamuTFPOOd17oppNLL6QvlSp%0A9rC2BHcgOMfMaYgq0uuiVDJB4cXNREX10fgGf20jz56kh%2B6ejh1iHIEYffs3OKbtp9M7FqmSpiQY%0AuAHzn7rCorHuZDP8tyvStvBqpdDxO92eeEt%2BprLDqsM1HfA%2BX3ItGURbaT4%2BQ |
console.log("Loading script..."); | |
var getaddrinfoPtr = Module.findExportByName(null, 'getaddrinfo') | |
var connectPtr = Module.findExportByName(null, 'connect') | |
var sendPtr = Module.findExportByName(null, 'send') | |
var recvPtr = Module.findExportByName(null, 'recv') | |
var getaddrinfoFunction = new NativeFunction(getaddrinfoPtr, 'int', ['pointer', 'pointer', 'pointer', 'pointer']) | |
var connectFunction = new NativeFunction(connectPtr, 'int', ['int', 'pointer', 'int']) | |
var sendFunction = new NativeFunction(sendPtr, 'int', ['int', 'pointer', 'int', 'int']) |
const utils = { | |
colors: { | |
red: function(string) { | |
return '\x1b[31m' + string + '\x1b[0m'; | |
}, | |
green: function(string) { | |
return '\x1b[32m' + string + '\x1b[0m'; | |
}, |
/* Android ssl certificate pinning bypass script for various methods | |
by Maurizio Siddu | |
Run with: | |
frida -U -f [APP_ID] -l frida_multiple_unpinning.js --no-pause | |
*/ | |
setTimeout(function() { | |
Java.perform(function () { | |
console.log(''); |
/** | |
* run the script to a running app: frida -U "appName" -l flutter_ios.js --no-pause | |
* start app direct with the script: frida -Uf bundleIdentifier -l flutter_ios.js --no-pause | |
*/ | |
// ############################################# | |
// HELPER SECTION START | |
var colors = { | |
"resetColor": "\x1b[0m", | |
"green": "\x1b[32m", | |
"yellow": "\x1b[33m", |
/** | |
* run the script to a running app: frida -U "appName" -l flutter_ios.js --no-pause | |
* start app direct with the script: frida -Uf bundleIdentifier -l flutter_ios.js --no-pause | |
*/ | |
// ############################################# | |
// HELPER SECTION START | |
var colors = { | |
"resetColor": "\x1b[0m", | |
"green": "\x1b[32m", | |
"yellow": "\x1b[33m", |
Name | Description | Exceptions |
---|---|---|
Avoid async void | Prefer async Task methods over async void methods | Event handlers |
Async all the way | Don't mix blocking and async code | Console main method |
Configure context | Use ConfigureAwait(false) when you can |
Methods that require context |
Picking the right architecture = Picking the right battles + Managing trade-offs
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers