Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'string_classifier' #2

Closed
SH1R3F opened this issue Nov 4, 2018 · 7 comments
Closed

No module named 'string_classifier' #2

SH1R3F opened this issue Nov 4, 2018 · 7 comments

Comments

@SH1R3F
Copy link

SH1R3F commented Nov 4, 2018

I installed all requirements but I still get this errors always when I try to run the script
this is the error

Traceback (most recent call last):
File "main.py", line 17, in
import apk_analyzer
File "/media/mahmoud/MyFiles/Programming/Android/apks/apk_api_key_extractor-master/apk_analyzer.py", line 9, in
import string_classifier
ModuleNotFoundError: No module named 'string_classifier'

I tried to install 'string_classifier' by this command

sudo pip3 install string_classifier

But I get this error

Collecting string_classifier
Could not find a version that satisfies the requirement string_classifier (from versions: )
No matching distribution found for string_classifier

Anyone has a solution?

@jottr
Copy link

jottr commented Feb 14, 2019

@alessandrodd ? Could you chip in here?

@alessandrodd
Copy link
Owner

alessandrodd commented Feb 25, 2019

Are you sure you have cloned the git repository with --recursive argument?
$ git clone --recursive https://github.com/alessandrodd/apk_api_key_extractor.git
I've just tried the documented steps on a fresh new Ubuntu 18.04 install with python3.6 without any issue.

@jottr
Copy link

jottr commented Mar 5, 2019

That was probably it. Thx.

@shikhaverma2009
Copy link

Hi !
getting these errors would you be able to help ?

root ERROR Apktool:
S: WARNING: Could not write to (C:\Users\AppData\Local\apktool\framework), using C:\Users\dheeraj\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_progress_disable.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_center_hint_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_progress.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_secondary.9.png". Renaming it to *.png.
S: Could not decode file, replacing by FALSE value: raw/keep.xml
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/play_slow_tips_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/play_slow_tips_background_click.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_secondary_disable.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_background.9.png". Renaming it to *.png.

07-24 10:24 root ERROR Magic number does not match
{'name': 'v0', 'value': '115_{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/a/d', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/a/l', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '306d195ab748c753ac2701799d5a3129', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/database/CommonDB_Impl', 'method_name': 'b', 'in_array': False, 'parameter_of': 'Landroid/a/b/b/h.', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '4067d0eca511b41d17767aa24e30f671', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '4067d0eca511b41d17767aa24e30f671', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '18a469d5124057754188d669ea2ea941', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': 'f7c81df3ba970e4b4b661db3169b09f2', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '51a5eb6e85033f42271535aad119a2f4', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': 'e600ec04b1c20ee84d830ed14af7cbfc', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': 'ee43c43dfd14e668188e2561178fb3f2', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '3fad024f2dcbe3ee693c96f350f8e376', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': '339b464f54e1aa211b968bfda89a70e5', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/biz/e/a', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/util/HashMap.put', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'a', 'value': 'b316230fc5008d27ad', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/common/a/e', 'method_name': '', 'in_array': False, 'parameter_of': None, 'string_type': 'TYPE_STATIC_VAR', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '\u9a8c\u8bc1\u7ed3\u679c\uff1asize\u5c0f\u4e8e\u9600\u503c', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/i/ak', 'method_name': 'a', 'in_array': False, 'parameter_of': 'Lcom/mobile/indiapp/utils/ag.b', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/i/am', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/i/ao', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/k/a', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/k/f', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/k/h', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v3', 'value': '\u4e0b\u8f7d\u4efb\u52a1 \u52a8\u4f5c\uff1a\u91cd\u542f\u4efb\u52a1-> \u975ewifi\uff0c\u6682\u4e0d\u91cd\u542f', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/manager/a$2', 'method_name': 'run', 'in_array': False, 'parameter_of': 'Ljava/lang/StringBuilder.append', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '9apps \u5904\u4e8e\u524d\u53f0 \u6682\u505c \u4e0b\u8f7d\u7ebf\u7a0b', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/manager/a$4', 'method_name': 'handleMessage', 'in_array': False, 'parameter_of': 'Lcom/mobile/indiapp/utils/ag.a', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v5', 'value': '\u672a\u83b7\u53d6\u5230 wifi \u81ea\u52a8\u66f4\u65b0\u914d\u7f6e\uff0c\u6682\u4e0d\u5f00\u59cb', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/manager/a', 'method_name': 'i', 'in_array': False, 'parameter_of': 'Lcom/mobile/indiapp/utils/ag.a', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '9Apps\u5728\u540e\u53f05mins\uff0c\u89e6\u53d1\u6346\u7ed1\u4e0b\u8f7d\u903b\u8f91', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/manager/g$1', 'method_name': 'run', 'in_array': False, 'parameter_of': 'Lcom/mobile/indiapp/utils/ag.b', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v5', 'value': '--\u6ee1\u8db3\u4e0b\u8f7d\u6761\u4ef6\uff0c\u8bf7\u6c42\u63a5\u53e3', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/manager/g', 'method_name': 'c', 'in_array': False, 'parameter_of': 'Ljava/lang/StringBuilder.append', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '36c411b7e4401f3afb132e85c30e2ea8', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/message/agoo/c', 'method_name': 'a', 'in_array': False, 'parameter_of': 'Lcom/taobao/accs/AccsClientConfig$Builder.setAppSecret', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v3', 'value': '36c411b7e4401f3afb132e85c30e2ea8', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/message/agoo/c', 'method_name': 'c', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': 'b268a05645a114f0ff4cce5af6ee18ab', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/p/a/a', 'method_name': 'a', 'in_array': False, 'parameter_of': 'Lcom/google/gson/JsonArray.toString', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '0614c6f98c0872c1fc0eb7f3cec0b925', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/p/a/a', 'method_name': 'b', 'in_array': False, 'parameter_of': 'Ljava/lang/System.currentTimeMillis', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': 'b268a05645a114f0ff4cce5af6ee18ab', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/p/a/a', 'method_name': 'c', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v1', 'value': '\u8d44\u6e90\u4fe1\u606f\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u653e\u5f03\u4e0b\u8f7d', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/story/c/a', 'method_name': 'a', 'in_array': False, 'parameter_of': 'Lcom/mobile/indiapp/utils/ag.a', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v2', 'value': 'aabcff5158b30a848ceed70e9f7a7978', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/track/database/TrackInfoDatabase_Impl', 'method_name': 'b', 'in_array': False, 'parameter_of': 'Landroid/a/b/b/h.', 'string_type': 'TYPE_METHOD_PARAMETER', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'a', 'value': 'b316230fc5008d27ad', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/utils/t', 'method_name': '', 'in_array': False, 'parameter_of': None, 'string_type': 'TYPE_STATIC_VAR', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/widget/HomeSimpleTabLayout', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'v0', 'value': '115
{\u5165\u53e3ID}{\u4f4d\u7f6e}{\u8d44\u6e90\u6a21\u5757}_0', 'source': 'TYPE_LOCAL_VAR', 'class_name': 'Lcom/mobile/indiapp/widget/HomeTabLayout', 'method_name': 'a', 'in_array': False, 'parameter_of': None, 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}
{'name': 'libppapkpatchso.so', 'value': 'Z6getZFFP13_CDFHLISTHeadiPPcS1', 'source': 'TYPE_LIB_STRING', 'package': 'com.mobile.indiapp', 'versionCode': 175, 'versionName': '3.3.4.900'}

@alessandrodd
Copy link
Owner

Hello shikhaverma2009, there is something wrong either in the APK or in apktool. You can try asking there.

@shikhaverma2009
Copy link

Thanks for you reply !

@shikhaverma2009
Copy link

If i directly decompiling using apktool its working fine , please see the below results:

java -jar apktool.jar d r.apk -o apks_decoded -f
I: Using Apktool 2.4.0 on abc.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
S: WARNING: Could not write to (C:\Users\dheeraj\AppData\Local\apktool\framework), using C:\Users\dheeraj\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Loading resource table from file: C:\Users\dheeraj\AppData\Local\Temp\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_progress_disable.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_center_hint_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_progress.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_secondary.9.png". Renaming it to *.png.
S: Could not decode file, replacing by FALSE value: raw/keep.xml
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/play_slow_tips_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/play_slow_tips_background_click.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_secondary_disable.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/player_seekbar_background.9.png". Renaming it to *.png.
I: Decoding values / XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

But with below command
py main.py --analyze-apk abc.apk
its gives an error ERROR Magic number does not match

Would you be able to help me ?

Thanks,
Shikha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants