|
You last visited: Today at 21:14
Advertisement
[Release] Archero's items hack source code
Discussion on [Release] Archero's items hack source code within the Mobile Games forum part of the Other Online Games category.
09/09/2019, 21:07
|
#1
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
[Release] Archero's items hack source code
Hi, i was bored the other day and made a hack for archero, but since this hack allows u to get any item u want in the game i won't play anymore so i can share with someone that is interested in sth like this.
Requeriments
Node.js
Memu and termux emulator apk.
Open memu multi instance manager and make sure u have root rights when u launch one emulator.
How does it works?
When u enter in a fight, the game generates a file that u are in battle, so that when u close the game you can reenter that fight. This code, decrypts that file and add new loot to the file, then it encrypts it again and done!.
When you open the game you re-enter in the fight, and when u loose u obtain the loot added, then when the game syncs with server u keep your stuff  .
How to?
Short: Copy generated battle file to folder where u have index.js, run it and replace the one in the game folder.
Steps:
Code:
1) First enter in a battle, then close the game.
2) Open termux and type:
su
cp -r /data/data/com.habby.archero/files/Save /sdcard/Download
3) Open memu shared download folder in your current OS, and copy xxxxxxxxx-battle.txt to where u have the source code
4) execute in that folder node index
5) rename xxxxxxx-battle.txtb to match the same name as original
6) go back to termux,and execute
rm /data/data/com.habby.archero/files/Save/xxxxxxx-battle.txt -> your edited battle file name
cp /sdcard/Download/Save/xxxxxxx-battle.txt /data/data/com.habby.archero/files/Save/xxxxxxx-battle.txt
7) If you follow all the steps, now you can open archero, continue the fight and when u loose u will get your random item (you can change the src as u want), make sure to connect wifi, so that when you loose and syncs with server u get your item for ever.
Cheat src:
cryptutils.js
Code:
//decryption and encryption utils
const crypto = require("crypto");
var algorithm = 'aes-128-cbc';
const key=new Buffer("NHB0AMVYBGTNAMXR")
const iv=new Buffer("NHB0AMVYBGTNAMXR")
module.exports.encrypt=function(text){
var cipher = crypto.createCipheriv(algorithm,key,iv)
text=new Buffer(text)
var crypted = cipher.update(text,'utf-8','base64')
crypted += cipher.final('base64');
return crypted;
}
module.exports.decrypt=function(text){
var decipher = crypto.createDecipheriv(algorithm,key,iv)
dec = decipher.update(text,'base64','utf-8');
dec += decipher.final();
return dec;
}
equiptable.js
Code:
//definition of equips
const equips = {
"types":{
"weapon": [{id:1010101},{id:1010201},{id:1010301},{id:1010401}],
"armor" : [{id:1020101},{id:1020201},{id:1020301},{id:1020401}],
"ring" : [{id:1030101},{id:1030201},{id:1030301},{id:1030401}],
"pet" : [{id:1040101},{id:1040201},{id:1040301},{id:1040401}],
},
"scrolls":[{id:30101},{id:30102},{id:30103},{id:30104}],
"quality" : [0,1,2,3,4,5]
}
module.exports = equips;
index.js
Code:
const {encrypt,decrypt} = require('./cryptutils')
const fs = require("fs");
const equiptable = require("./equiptable");
const pattern = /(?:.*)-battle/
function findbattlefile(){
let fileExist = new Promise((resolve,reject)=>{
fs.readdir(__dirname, (err, files) => {
for(var i=0;i<files.length;i++){
let file = files[i];
if(pattern.exec(file)){
resolve(file);
}
}
reject("Couldn't found battle file in folder exiting...");
});
});
fileExist.then(file => {
console.log("Searching for battle files in folder");
let fileRead = new Promise((reject,resolve)=>{
fs.readFile(file,"utf-8",(data,err)=>{
if(err)
reject(err);
console.log(`Found file ${file}`);
resolve(data);
});
});
console.log("Parsing battle file");
fileRead.then(data=>{
let js = JSON.parse(decrypt(data));
js.equips = [];
console.log("Getting random equipment");
js.equips.push(getRandomEquipment());
console.log("Getting random scrolls");
let scrolls = getRandomScroll();
for(let s of scrolls)
js.equips.push(s);
//unencrypted pretty file
console.log("Writing unencrypted file");
fs.writeFile(file+"u",JSON.stringify(js,null,2),err=>{
if(err){
throw("Couldn't write to file");
}
console.log(`Done writing ${file}u `);
});
//encrypted file
console.log("Writing encrypted file");
fs.writeFile(file+"b",encrypt(JSON.stringify(js)),err=>{
if(err){
throw("Couldn't write to file");
}
console.log(`Done writing ${file}b `);
console.log(`Please delete original file and rename \x1b[31m${file}b \x1b[0m to \x1b[32m${file}\x1b[0m`)
});
}).catch(e => {throw(e)});
}).catch(e=>{throw(e)});
}
function getRandomScroll(){
let scrolls = [];
let r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30101,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30102,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30103,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30104,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
return scrolls;
}
//returns random equipment with random quality or specified equipment with quality
//Ex: getRandomEquipment("weapon",5)
function getRandomEquipment(type,qualityID){
let types = Object.keys(equiptable.types);
let equip = null;
if(type !== undefined){
let exist = types.find(function(e){return e == type});
if(exist !== undefined){
let equips = equiptable.types[type];
let r = Math.floor(Math.random() * equips.length);
equip = equips[r].id;
}else{
throw(`Equip ${type} does not exists`);
}
}else{
let r = Math.floor(Math.random() * types.length);
let type = types[r];
let equips = equiptable.types[type];
r = Math.floor(Math.random() * equips.length);
equip = equips[r].id;
}
if(qualityID === undefined)
qualityID = Math.floor(Math.random() * equiptable.quality.length);
if(qualityID >= equiptable.quality.length || qualityID < 0) throw("Quality should be between 0 - 5")
return {"RowID":0,"EquipID":(equip + equiptable.quality[qualityID]),"Level":1,"Count":1,"WearIndex":-1,"bNew":true};
}
findbattlefile();
|
|
|
10/25/2019, 06:19
|
#2
|
elite*gold: 0
Join Date: Dec 2017
Posts: 68
Received Thanks: 9
|
still work? help me discord: Dude#5555
|
|
|
11/10/2019, 03:49
|
#3
|
elite*gold: 0
Join Date: Apr 2009
Posts: 99
Received Thanks: 76
|
Sadly when you change the file, the game does not ask if you want to re-enter the fight so I guess this method is not working anymore.
|
|
|
11/11/2019, 12:20
|
#4
|
elite*gold: 0
Join Date: Nov 2012
Posts: 31,683
Received Thanks: 2,368
|
does it still work? give us an update, chief.
|
|
|
11/11/2019, 22:03
|
#5
|
elite*gold: 0
Join Date: Apr 2009
Posts: 99
Received Thanks: 76
|
Quote:
Originally Posted by Hawkk
does it still work? give us an update, chief.
|
I tried, did every step right but it does not work.
|
|
|
01/09/2020, 08:08
|
#6
|
elite*gold: 0
Join Date: Oct 2018
Posts: 7
Received Thanks: 0
|
Outdated already maybe?
|
|
|
01/11/2020, 04:26
|
#7
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1
Received Thanks: 0
|
Quote:
Originally Posted by elmarcia
Hi, i was bored the other day and made a hack for archero, but since this hack allows u to get any item u want in the game i won't play anymore so i can share with someone that is interested in sth like this.
Requeriments
Node.js
Memu and termux emulator apk.
Open memu multi instance manager and make sure u have root rights when u launch one emulator.
How does it works?
When u enter in a fight, the game generates a file that u are in battle, so that when u close the game you can reenter that fight. This code, decrypts that file and add new loot to the file, then it encrypts it again and done!.
When you open the game you re-enter in the fight, and when u loose u obtain the loot added, then when the game syncs with server u keep your stuff  .
How to?
Short: Copy generated battle file to folder where u have index.js, run it and replace the one in the game folder.
Steps:
Code:
1) First enter in a battle, then close the game.
2) Open termux and type:
su
cp -r /data/data/com.habby.archero/files/Save /sdcard/Download
3) Open memu shared download folder in your current OS, and copy xxxxxxxxx-battle.txt to where u have the source code
4) execute in that folder node index
5) rename xxxxxxx-battle.txtb to match the same name as original
6) go back to termux,and execute
rm /data/data/com.habby.archero/files/Save/xxxxxxx-battle.txt -> your edited battle file name
cp /sdcard/Download/Save/xxxxxxx-battle.txt /data/data/com.habby.archero/files/Save/xxxxxxx-battle.txt
7) If you follow all the steps, now you can open archero, continue the fight and when u loose u will get your random item (you can change the src as u want), make sure to connect wifi, so that when you loose and syncs with server u get your item for ever.
Cheat src:
cryptutils.js
Code:
//decryption and encryption utils
const crypto = require("crypto");
var algorithm = 'aes-128-cbc';
const key=new Buffer("NHB0AMVYBGTNAMXR")
const iv=new Buffer("NHB0AMVYBGTNAMXR")
module.exports.encrypt=function(text){
var cipher = crypto.createCipheriv(algorithm,key,iv)
text=new Buffer(text)
var crypted = cipher.update(text,'utf-8','base64')
crypted += cipher.final('base64');
return crypted;
}
module.exports.decrypt=function(text){
var decipher = crypto.createDecipheriv(algorithm,key,iv)
dec = decipher.update(text,'base64','utf-8');
dec += decipher.final();
return dec;
}
equiptable.js
Code:
//definition of equips
const equips = {
"types":{
"weapon": [{id:1010101},{id:1010201},{id:1010301},{id:1010401}],
"armor" : [{id:1020101},{id:1020201},{id:1020301},{id:1020401}],
"ring" : [{id:1030101},{id:1030201},{id:1030301},{id:1030401}],
"pet" : [{id:1040101},{id:1040201},{id:1040301},{id:1040401}],
},
"scrolls":[{id:30101},{id:30102},{id:30103},{id:30104}],
"quality" : [0,1,2,3,4,5]
}
module.exports = equips;
index.js
Code:
const {encrypt,decrypt} = require('./cryptutils')
const fs = require("fs");
const equiptable = require("./equiptable");
const pattern = /(?:.*)-battle/
function findbattlefile(){
let fileExist = new Promise((resolve,reject)=>{
fs.readdir(__dirname, (err, files) => {
for(var i=0;i<files.length;i++){
let file = files[i];
if(pattern.exec(file)){
resolve(file);
}
}
reject("Couldn't found battle file in folder exiting...");
});
});
fileExist.then(file => {
console.log("Searching for battle files in folder");
let fileRead = new Promise((reject,resolve)=>{
fs.readFile(file,"utf-8",(data,err)=>{
if(err)
reject(err);
console.log(`Found file ${file}`);
resolve(data);
});
});
console.log("Parsing battle file");
fileRead.then(data=>{
let js = JSON.parse(decrypt(data));
js.equips = [];
console.log("Getting random equipment");
js.equips.push(getRandomEquipment());
console.log("Getting random scrolls");
let scrolls = getRandomScroll();
for(let s of scrolls)
js.equips.push(s);
//unencrypted pretty file
console.log("Writing unencrypted file");
fs.writeFile(file+"u",JSON.stringify(js,null,2),err=>{
if(err){
throw("Couldn't write to file");
}
console.log(`Done writing ${file}u `);
});
//encrypted file
console.log("Writing encrypted file");
fs.writeFile(file+"b",encrypt(JSON.stringify(js)),err=>{
if(err){
throw("Couldn't write to file");
}
console.log(`Done writing ${file}b `);
console.log(`Please delete original file and rename \x1b[31m${file}b \x1b[0m to \x1b[32m${file}\x1b[0m`)
});
}).catch(e => {throw(e)});
}).catch(e=>{throw(e)});
}
function getRandomScroll(){
let scrolls = [];
let r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30101,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30102,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30103,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
r = Math.floor(Math.random()*3)
if(Math.random() < 0.5)
scrolls.push({"RowID":0,"EquipID":30104,"Level":1,"Count":r,"WearIndex":-1,"bNew":true});
return scrolls;
}
//returns random equipment with random quality or specified equipment with quality
//Ex: getRandomEquipment("weapon",5)
function getRandomEquipment(type,qualityID){
let types = Object.keys(equiptable.types);
let equip = null;
if(type !== undefined){
let exist = types.find(function(e){return e == type});
if(exist !== undefined){
let equips = equiptable.types[type];
let r = Math.floor(Math.random() * equips.length);
equip = equips[r].id;
}else{
throw(`Equip ${type} does not exists`);
}
}else{
let r = Math.floor(Math.random() * types.length);
let type = types[r];
let equips = equiptable.types[type];
r = Math.floor(Math.random() * equips.length);
equip = equips[r].id;
}
if(qualityID === undefined)
qualityID = Math.floor(Math.random() * equiptable.quality.length);
if(qualityID >= equiptable.quality.length || qualityID < 0) throw("Quality should be between 0 - 5")
return {"RowID":0,"EquipID":(equip + equiptable.quality[qualityID]),"Level":1,"Count":1,"WearIndex":-1,"bNew":true};
}
findbattlefile();
|
how did you manage to reverse the app to figure out the crypto algo, key and iv?
|
|
|
01/16/2020, 12:42
|
#8
|
elite*gold: 0
Join Date: Oct 2018
Posts: 7
Received Thanks: 0
|
Has anyone else successfully done this?
|
|
|
All times are GMT +1. The time now is 21:16.
|
|