Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyStoneJy committed Jan 29, 2024
1 parent 84d5cee commit f59c41c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
3 changes: 3 additions & 0 deletions bin/android-checker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
'use strict'
import '../dist/index.js';
1 change: 0 additions & 1 deletion bin/checker.mjs

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "hello-cr",
"version": "0.0.1",
"name": "android-checker",
"version": "0.0.2",
"description": "",
"bin": {
"hello-cr": "./bin/checker.mjs"
"android-checker": "./bin/android-checker.mjs"
},
"main": "./bin/checker.mjs",
"main": "./bin/android-checker.mjs",
"files": [
"bin",
"dist"
Expand Down
39 changes: 23 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import { exec } from 'child_process';

const program = new Command();

program.name('hello-cr')
program.name('android-checker')
.description('CLI of check apk is proected whether or not.')
.version(`${require('../package.json').version}`, '-v --version');

// program.command('r')
// .description('reverse apk')
// .option('-o --output <output directory>')
// .argument('<apk file>', 'file of apk')
// .action((apkFile, options) => {
// if (!hasAPKSuffix(apkFile)) {
// return;
// }
// let command_string = `apktool d ${apkFile}`;
// if (options.output) {
// command_string += ` -o ${options.output}`;
// }
// console.log("execute commnad:", command_string);
// execShell(command_string);
// });
program.command('r')
.description('reverse apk')
.option('-o --output <output directory>')
.argument('<apk file>', 'file of apk')
.action((apkFile, options) => {
if (!hasAPKSuffix(apkFile)) {
return;
}
let command_string = `apktool d ${apkFile}`;
if (options.output) {
command_string += ` -o ${options.output}`;
}
console.log("execute commnad:", command_string);
execShell(command_string);
});

program.parse(process.argv);

Expand All @@ -45,3 +45,10 @@ function hasAPKSuffix(fileName: string): boolean {
}
return fileName.endsWith('.apk');
}


function main() {
console.log('main');
}

main();

0 comments on commit f59c41c

Please sign in to comment.