Skip to content

Instantly share code, notes, and snippets.

View cc_s5_03.java
private void measureLine(String line) {
lineCount++;
int lineSize = line.length();
totalChars += lineSize;
lineWidthHistogram.addLine(lineSize, lineCount);
recordWidestLine(lineSize);
}
View cc_s5_02.java
package fitnesse.wikitext.widgets;
import java.util.regex.*;
public class BoldWidget extends ParentWidget {
public static final String REGEXP = "'''.+?'''";
private static final Pattern pattern = Pattern.compile("'''(.+?)'''",
Pattern.MULTILINE + Pattern.DOTALL);
public BoldWidget(ParentWidget parent, String text) throws Exception {
super(parent);
Matcher match = pattern.matcher(text); match.find(); addChildWidgets(match.group(1));
}
View cc_s5_01.java
package fitnesse.wikitext.widgets;
import java.util.regex.*;
public class BoldWidget extends ParentWidget {
public static final String REGEXP = "'''.+?'''";
private static final Pattern pattern = Pattern.compile("'''(.+?)'''",
Pattern.MULTILINE + Pattern.DOTALL );
public BoldWidget(ParentWidget parent, String text) throws Exception {
View updateprof.java
String str = Utils.usern;
String str2 = Utils.enkey;
StringBuilder sb = new StringBuilder();
sb.append("{\"username\": \"");
sb.append(UpdateProfileActivity.this.name.getText().toString());
sb.append("\"}");
sb.append(str2);
String md5 = CryptoHandler.md5(sb.toString());
UpdateReq updateReq = new UpdateReq();
updateReq.username = UpdateProfileActivity.this.name.getText().toString();
View updateResponse.json
{
"code":200,
"data":
{
"blc_currency":1,
"id":37,
"role_id":"RID5EF655B2-60C0-4F32-9AF3-BCB8A47CCF63",
"username":"asdsdad",
"uuid":"d15466f0-40ef-4194-bbca-6ca306acd819"
}
View hook.js
Java.perform(function x(){
var my_class = Java.use("com.asisctf.Andex.ConfigurationActivity");
my_class.getDex1.implementation = function(x){
var someClass = Java.use("com.asisctf.Andex.Utils");
someClass.user_profile_url.value="/api/userClass/me";
someClass.shop_order_url.value="/api/shop/order/";
someClass.shop_item_url.value="/api/shop/items/get_data";
var intent=Java.use("android.content.Intent");
var c=Java.use("com.asisctf.Andex.MenuActivity");
var result = intent.$new(this, c.class);
View elseConfAct.java
Utils.config = strArr;
Utils.shop_item_url = strArr[0];
Utils.shop_order_url = strArr[1];
Utils.user_profile_url = strArr[2];
View confAct.java
public void getDex1(String str) {
....
sb.append(externalStoragePublicDirectory.getAbsolutePath());
sb.append("/conf/1plain.dex");
sb3.append("/conf/1.dex");
CryptoHandler.decrypt(sb2, sb3.toString(), Utils.enkey);
Class classFromDex = DexJob.getClassFromDex(sb2, "com.asisctf.config.SayHelloToYourLittleFriend", ConfigurationActivity.this.getApplicationContext());
String[] strArr = (String[]) classFromDex.getMethod("config", new Class[]{Context.class}).invoke(classFromDex.newInstance(), new Object[]{ConfigurationActivity.this.getApplicationContext()});
if (strArr.length == 0) {
ConfigurationActivity.this.state.setText("can't load configuration, review your registeriation");
View first-dex.java
public class SayHelloToYourLittleFriend {
public String[] config(Context context) {
String shop_item = "/api/shop/items/get_data";
String shop_order = " /api/shop/order/";
String user_profile = "/api/userClass/me";
String[] config = new String[0];
if (new RootBeer(context).isRooted() || isEmulator()) {
return config;
}
return new String[]{shop_item, shop_order, user_profile};
View regResponse.json
{
"code":200,
"data":
{
"encryption_key":"TXlEaWZmaWN1bHRQYXNzdw==",
"role_id":"RID5EF655B2-60C0-4F32-9AF3-BCB8A47CCF63",
"uuid":"99591d8b-460e-4b17-aeb2-a2e9395d61c7"
}
}