Skip to content

Instantly share code, notes, and snippets.

@Saket-Upadhyay
Last active August 18, 2020 11:35
Show Gist options
  • Save Saket-Upadhyay/cf35dc56364676c6995328c89cd0cefd to your computer and use it in GitHub Desktop.
Save Saket-Upadhyay/cf35dc56364676c6995328c89cd0cefd to your computer and use it in GitHub Desktop.
SCTF ANDROID CHALLENGE
public interface b extends IInterface {
public static abstract class a extends Binder implements b {
public static b b(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.sctf2020.vault101.IVault");
return (queryLocalInterface == null || !(queryLocalInterface instanceof b)) ? new C0039a(iBinder) : (b) queryLocalInterface;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
String str = "com.sctf2020.vault101.IVault";
if (i == 1) {
parcel.enforceInterface(str);
boolean a2 = a(parcel.readString());
parcel2.writeNoException();
parcel2.writeInt(a2 ? 1 : 0);
return true;
} else if (i != 1598968902) {
return super.onTransact(i, parcel, parcel2, i2);
} else {
parcel2.writeString(str);
return true;
}
}
}
boolean a(String str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment