diogo-fernan / malsub

A Python RESTful API framework for online malware analysis and threat intelligence services.
Other
368 stars 80 forks source link

Error from Python 3 #2

Closed azfayel closed 7 years ago

azfayel commented 7 years ago

Hello, i install malsub and met the requirements but i have an error
python3 malsub.py -vva vt -su yahoo.fr Traceback (most recent call last): File "malsub.py", line 56, in from malsub.core import main File "/var/tmp/malsub-master/malsub/core/main.py", line 25 out.error(f"input service(s) \"{','.join(inv)}\" unknown") ^ SyntaxError: invalid syntax Could you help me ?

Regards,

Richard

diogo-fernan commented 7 years ago

Hi Richard,

What Python version are you running? malsub is a Python 3.6.x framework, reason for which it seems to be the cause of the error due to the usage of f-strings (new in Python 3.6).

Diogo

azfayel commented 7 years ago

Hello Diego Il use the version 3.6.I will updated and check. Thank you for your promptness. Richard Le 28 mars 2017 2:21 PM, Diogo Fernandes notifications@github.com a écrit :Hi Richard, What Python version are you running? malsub is a Python 3.6.x framework, reason for which it seems to be the cause of the error due to the usage of f-strings (new in Python 3.6). Diogo

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

diogo-fernan commented 7 years ago

I cannot reproduce your error. The output should be the following when selecting unknown services:

$ python3 malsub.py -a unrecognized_service
[!]   error Wed 29 Mar 2017 06:55:50.130189 +0000 UTC: input service(s) "unrecognized_service" unknown

However, it seems like line 25 in your main.py is missing escaped double quotes, as follows (https://github.com/diogo-fernan/malsub/blob/master/malsub/core/main.py#L25):

out.error(f"input service(s) \"{','.join(inv)}\" unknown")

Can you check that line?

Also make sure that Python outputs the following version:

 $ python3 -V
Python 3.6.0
azfayel commented 7 years ago

Hello Diego I add python 3.6 to kali and it works fine now. Thank your for your attention. Regards Richard Le 29 mars 2017 9:05 AM, Diogo Fernandes notifications@github.com a écrit :I cannot reproduce your error. The output should be the following when selecting unknown services: $ python3 malsub.py -a unrecognized_service [!] error Wed 29 Mar 2017 06:55:50.130189 +0000 UTC: input service(s) "unrecognized_service" unknown

However, it seems like line 25 in your main.py is missing escaped double quotes, as follows (https://github.com/diogo-fernan/malsub/blob/master/malsub/core/main.py#L25): out.error(f"input service(s) \"{','.join(inv)}\" unknown") Can you check that line? Also make sure that Python outputs the following version: $ python3 -V Python 3.6.0

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

diogo-fernan commented 7 years ago

Good that you sorted it out!