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
bool isFridaServerListening() { | |
struct sockaddr_in sa; | |
ssize_t ret; | |
int sock; | |
char res[7]; | |
memset(&sa, 0, sizeof(sa)); | |
sa.sin_family = AF_INET; | |
sa.sin_port = htons(27042); |
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
std::vector<std::string> security_check::HookingSecurityChecker::getJniStackTrace() { | |
jclass jThrowable = env->FindClass("java/lang/Throwable"); | |
jmethodID jThrowableConstructor = env->GetMethodID(jThrowable, "<init>", "()V"); | |
jmethodID jThrowableGetStackTrace = env->GetMethodID(jThrowable, "getStackTrace", | |
"()[Ljava/lang/StackTraceElement;"); | |
jobject jThrowableObject = env->NewObject(jThrowable, jThrowableConstructor); |
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 <main/jni/src/log/log.h> | |
#include <main/jni/src/security/security_support.h> | |
#include "timing.h" | |
void TimingUtil::addSplit(std::string tag) { | |
_vectorTime.push_back(now()); | |
_vectorTags.push_back(tag); | |
} |
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
const char *security_check::IntegrityHashSecurityChecker::getBaseApkAbsolutePath() { | |
jobject jAppInfoObject = getApplicationInfo(); | |
jclass jAppInfoClass = env->FindClass("android/content/pm/ApplicationInfo"); | |
jfieldID jSourceDirField = env->GetFieldID(jAppInfoClass, "sourceDir", "Ljava/lang/String;"); | |
jstring jSourceDirString = (jstring) env->GetObjectField(jAppInfoObject, jSourceDirField); | |
const char *sourceApkPath = env->GetStringUTFChars(jSourceDirString, 0); | |
env->ReleaseStringUTFChars(jSourceDirString, sourceApkPath); | |
return sourceApkPath; | |
} |
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
public class Code128WriterPreprocessor { | |
private static final char ESCAPE_FNC_1 = '\u00f1'; | |
private static final char ESCAPE_FNC_2 = '\u00f2'; | |
private static final char ESCAPE_FNC_3 = '\u00f3'; | |
private static final char ESCAPE_FNC_4 = '\u00f4'; | |
private static final String ENCODING_LATIN_1 = "latin1"; | |
public static String process(String data) { | |
Byte[] dataBytes; |
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
jobject getContext(JNIEnv *env) { | |
jclass jAppAppGlobalsClass = env->FindClass("android/app/AppGlobals"); | |
jmethodID jGetInitialApplication = env->GetStaticMethodID(jAppAppGlobalsClass, "getInitialApplication", | |
"()Landroid/app/Application;"); | |
jobject jApplicationObject = env->CallStaticObjectMethod(jAppAppGlobalsClass, jGetInitialApplication); | |
return jApplicationObject; |
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
jobject getContext(JNIEnv *env) { | |
jclass jAppAppGlobalsClass = env->FindClass("android/app/AppGlobals"); | |
jmethodID jGetInitialApplication = env->GetStaticMethodID(jAppAppGlobalsClass, "getInitialApplication", | |
"()Landroid/app/Application;"); | |
jobject jApplicationObject = env->CallStaticObjectMethod(jAppAppGlobalsClass, jGetInitialApplication); | |
return jApplicationObject; | |
} |
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
public class ActionDialog extends BottomSheetDialogFragment { | |
private final String TAG = getClass().getSimpleName(); | |
@BindView(R.id.recycler_view) | |
public RecyclerView recyclerView; | |
private Builder.ActionAdapter adapter; | |
private FragmentManager fragmentManager; | |
private LinearLayoutManager layoutManager; |