Skip to content

Commit

Permalink
Add __main__.py && update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Bearloopher committed Oct 17, 2021
1 parent 878a8e6 commit d6ae15e
Show file tree
Hide file tree
Showing 8 changed files with 441 additions and 7 deletions.
429 changes: 429 additions & 0 deletions androyara/__main__.py

Large diffs are not rendered by default.

Empty file added androyara/core/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion androyara/core/apk_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# 在这里将会读取处APK内的信息,包括 classes.dex 签名信息,签名版本v1 v2 v3 AndroidManifest.xml 包括app的指纹信息
# Here put the import lib

from androyara.core.apk_packer import ApkPackInfo
import io
import json
import codecs
Expand All @@ -28,6 +27,7 @@
from androyara.parser.base_parser import BaserParser
from androyara.dex.dex_vm import DexFileVM
from androyara.core.axml_parser import AndroidManifestXmlParser, ARSCParser, ARSCResTableConfig
from androyara.core.apk_packer import ApkPackInfo

log = logging.getLogger("androyara.apk")

Expand Down
2 changes: 1 addition & 1 deletion androyara/core/axml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import enum
from androyara.utils.utility import echo
from androyara.parser.base_parser import BaserParser
from androyara.types.types import*
from androyara.typeinfo.types import*


NS_ANDROID_URI = 'http://schemas.android.com/apk/res/android'
Expand Down
Empty file added androyara/typeinfo/__init__.py
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion androyara/types/types.py → androyara/typeinfo/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys
import binascii

from androyara.types import publics
from androyara.typeinfo import publics
from androyara.utils.buffer import BuffHandle


Expand Down
13 changes: 9 additions & 4 deletions androyara/vsbox/vsbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import json
from termcolor import colored

root = os.path.abspath(os.path.dirname(__file__))
root = root[:root.rfind(os.sep)]
user = root[:root.rfind(os.sep)]+os.sep+"user"
# root = os.path.abspath(os.path.dirname(__file__))
# root = root[:root.rfind(os.sep)]
# user = root[:root.rfind(os.sep)]+os.sep+"user"

logger = logging.getLogger("androyara.vbox")
logger.setLevel(logging.INFO)
Expand All @@ -35,7 +35,12 @@ def __init__(self, finger_print):

def _init_conf(self, finger_print: str):

config_path = user+os.sep+"user.conf"
if "USR_CONFIG_INI" not in os.environ:
raise Exception("Please USR_CONFIG_INI as env variable.")
user = os.getenv("USR_CONFIG_INI")
if not os.path.isfile(user):
raise FileNotFoundError("%s is not file "%(user))
config_path = user#user+os.sep+"user.conf"
if not os.path.isfile(config_path):
print(colored(
"[error]: Read user.conf error {} is not file !!! ".format(config_path), "red"))
Expand Down

0 comments on commit d6ae15e

Please sign in to comment.