Skip to content

Instantly share code, notes, and snippets.

@alibo
Last active August 18, 2016 09:36
Show Gist options
  • Save alibo/0fc4dc7d8d6bb9d0b9c53a3c59d2430f to your computer and use it in GitHub Desktop.
Save alibo/0fc4dc7d8d6bb9d0b9c53a3c59d2430f to your computer and use it in GitHub Desktop.
Check sms receiver in multiple versions of cafebazaar. How to run: sh bazaar_diff.sh 7.5.0 7.5.1
#!/bin/bash
oldVersion=$1;
newVersion=$2;
smsReceiverPath="com/farsitel/bazaar/receiver/SmsAuthenticationReceiver.java";
echo "Downloading ...";
wget "https://cafebazaar.ir/static/download/Bazaar-$oldVersion.apk";
wget "https://cafebazaar.ir/static/download/Bazaar-$newVersion.apk";
echo "Decompiling ...";
d2j-dex2jar "Bazaar-$oldVersion.apk";
cfr-decompiler "Bazaar-$oldVersion-dex2jar.jar" --silent true --outputdir "Bazaar-$oldVersion";
d2j-dex2jar "Bazaar-$newVersion.apk";
cfr-decompiler "Bazaar-$newVersion-dex2jar.jar" --silent true --outputdir "Bazaar-$newVersion";
echo "Diff:";
diff "Bazaar-$newVersion/$smsReceiverPath" "Bazaar-$oldVersion/$smsReceiverPath";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment