Skip to content

Commit

Permalink
Added Xmodgames package name, build fixes, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cioccarellia committed Nov 5, 2018
1 parent 9a1bdf4 commit d522d49
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ allprojects {
And the dependency to your module build.gradle file:
```gradle
dependencies {
implementation 'com.github.AndreaCioccarelli:BillingProtector:1.0.1'
implementation 'com.github.AndreaCioccarelli:BillingProtector:1.0.2'
}
```

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.andreacioccarelli.billingprotectorsample"
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0.0"
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 2
versionName "1.0.1"
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
3 changes: 1 addition & 2 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.andreacioccarelli.billingprotector" />
<manifest package="com.andreacioccarelli.billingprotector" />
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,31 @@ package com.andreacioccarelli.billingprotector.data
import android.util.Base64 import android.util.Log

/**
Class representing a pirate app with built-in string sign check */ data class PirateApp(val packageName: String, val encodedPackageName: String, val criteria: SelectionCriteria, val name: String) { init { val check = Base64.encodeToString(packageName.toByteArray(), Base64.DEFAULT)
* Class representing a pirate app with built-in string sign check
* */

if (check.trim() != encodedPackageName.trim()) {
Log.e("BillingProtector", "Package Name=[$packageName], Sign Check String=[$check], Base64 Encoded Package Name=[$encodedPackageName]")
throw SecurityException("Package names mismatch, apk file damaged or corrupted")
}
data class PirateApp(val packageName: String, val encodedPackageName: String, val criteria: SelectionCriteria, val name: String) {
init {
val check = Base64.encodeToString(packageName.toByteArray(), Base64.DEFAULT)
if (check.trim() != encodedPackageName.trim()) {
Log.e("BillingProtector", "Package Name=[$packageName], Sign Check String=[$check], Base64 Encoded Package Name=[$encodedPackageName]")
throw SecurityException("Package names mismatch, apk file damaged or corrupted")
}
}
}



} }

internal fun createPirateAppsList() = listOf( PirateApp("com.chelpus.lackypatch", "Y29tLmNoZWxwdXMubGFja3lwYXRjaA==", SelectionCriteria.MATCH, "Chelpus Lucky Patcher"), PirateApp("com.dimonvideo.luckypatcher", "Y29tLmRpbW9udmlkZW8ubHVja3lwYXRjaGVy", SelectionCriteria.MATCH, "Lucky Patcher"), PirateApp("com.forpda.lp", "Y29tLmZvcnBkYS5scA==", SelectionCriteria.MATCH, "4Pda Lucy Patcher"), PirateApp("com.android.vending.billing.InAppBillingService.", "Y29tLmFuZHJvaWQudmVuZGluZy5iaWxsaW5nLkluQXBwQmlsbGluZ1NlcnZpY2Uu", SelectionCriteria.SLICE, "Lucky Patcher"), PirateApp("jase.freedom", "amFzZS5mcmVlZG9t", SelectionCriteria.SLICE, "Freedom"), PirateApp("madkite.freedom", "bWFka2l0ZS5mcmVlZG9t", SelectionCriteria.SLICE, "Freedom"), PirateApp("uret.jasi2169.patcher", "dXJldC5qYXNpMjE2OS5wYXRjaGVy", SelectionCriteria.MATCH, "Uret Patcher"), PirateApp("org.creeplays.hack", "b3JnLmNyZWVwbGF5cy5oYWNr", SelectionCriteria.MATCH, "Creeplays Patcher"), PirateApp("com.android.vendinc", "Y29tLmFuZHJvaWQudmVuZGluYw==", SelectionCriteria.MATCH, "Fake Google Play Store"), PirateApp("apps.zhasik007.hack", "YXBwcy56aGFzaWswMDcuaGFjaw==", SelectionCriteria.MATCH, "CreeHack"), PirateApp("com.leo.playcard", "Y29tLmxlby5wbGF5Y2FyZA==", SelectionCriteria.MATCH, "Leo Playcard"), PirateApp("com.appsara.app", "Y29tLmFwcHNhcmEuYXBw", SelectionCriteria.MATCH, "AppSara") )
internal fun createPirateAppsList() = listOf(
PirateApp("com.chelpus.lackypatch", "Y29tLmNoZWxwdXMubGFja3lwYXRjaA==", SelectionCriteria.MATCH, "Chelpus Lucky Patcher"),
PirateApp("com.dimonvideo.luckypatcher", "Y29tLmRpbW9udmlkZW8ubHVja3lwYXRjaGVy", SelectionCriteria.MATCH, "Lucky Patcher"),
PirateApp("com.forpda.lp", "Y29tLmZvcnBkYS5scA==", SelectionCriteria.MATCH, "4Pda Lucy Patcher"),
PirateApp("com.android.vending.billing.InAppBillingService.", "Y29tLmFuZHJvaWQudmVuZGluZy5iaWxsaW5nLkluQXBwQmlsbGluZ1NlcnZpY2Uu", SelectionCriteria.SLICE, "Lucky Patcher"),
PirateApp("jase.freedom", "amFzZS5mcmVlZG9t", SelectionCriteria.SLICE, "Freedom"),
PirateApp("madkite.freedom", "bWFka2l0ZS5mcmVlZG9t", SelectionCriteria.SLICE, "Freedom"),
PirateApp("uret.jasi2169.patcher", "dXJldC5qYXNpMjE2OS5wYXRjaGVy", SelectionCriteria.MATCH, "Uret Patcher"),
PirateApp("org.creeplays.hack", "b3JnLmNyZWVwbGF5cy5oYWNr", SelectionCriteria.MATCH, "Creeplays Patcher"),
PirateApp("com.android.vendinc", "Y29tLmFuZHJvaWQudmVuZGluYw==", SelectionCriteria.MATCH, "Fake Google Play Store"),
PirateApp("apps.zhasik007.hack", "YXBwcy56aGFzaWswMDcuaGFjaw==", SelectionCriteria.MATCH, "CreeHack"),
PirateApp("com.leo.playcard", "Y29tLmxlby5wbGF5Y2FyZA==", SelectionCriteria.MATCH, "Leo Playcard"),
PirateApp("com.appsara.app", "Y29tLmFwcHNhcmEuYXBw", SelectionCriteria.MATCH, "AppSara"),
PirateApp("com.xmodgame", "Y29tLnhtb2RnYW1l", SelectionCriteria.MATCH, "Xmod")
)
3 changes: 0 additions & 3 deletions library/src/main/res/values/strings.xml

This file was deleted.

0 comments on commit d522d49

Please sign in to comment.