Xen0ph0n / VirusTotal_API_Tool

A Tool To Leverage Virus Total's Private API Key
235 stars 115 forks source link

Python 3.5 Incompatibility #10

Open jonatversprite opened 7 years ago

jonatversprite commented 7 years ago

Mac OS X 10.12.6, Python 2.7 works

$ python vtlite.py -s -j /path/to/file

Results for MD5:  68dc616527fc1b7d94774806a9cf9b1e 

Detected by:  0 / 55 

Sophos Detection: None 

Kaspersky Detection: None 

ESET Detection: None 

Scanned on: 2017-02-24 14:37:01

JSON Written to File -- VTDL68DC616527FC1B7D94774806A9CF9B1E.json

Python3.5 fails

$ python3 vtlite.py -s -j /path/to/file File "vtlite.py", line 29 print "\n\tVirus Total Rescan Initiated for -- " + md5 + " (Requery in 10 Mins)"

justNik101 commented 7 years ago

no issue, just little modification in code like, using parenthesis along with print, using urllib.request, urllib.parse instead of urllib2 and just bit decoding and encoding to utf 8 can address all issues in python 3.5

apinto2343 commented 4 years ago

What do you mean by just bit decoding and encoding to utf 8 can address all issues in python 3.5

apinto2343 commented 4 years ago

Any chance you can post that code,

Anthony Pinto Cybersecurity Program Coordinator CAE Faculty Fellow Computer Science Department University of West Florida Bldg 4 Rm 228 850-474-2974 apinto@uwf.edu

Explore Cybersecurity at UWF: http://uwf.edu/cybersecurity/ *The NSA-DHS National Center of Academic Excellence (CAE) Regional Resource Center for the Southeast US *and an NSA-DHS CAE in Cyber Defense Education

On Fri, Jan 3, 2020 at 10:55 PM Nikhil Sharma notifications@github.com wrote:

When I tried to run this project on windows 10 - python 3.5, I faced many compilation errors, By doing this I was able to run the file.

On Sat, Jan 4, 2020, 02:44 Anthony Pinto notifications@github.com wrote:

What do you mean by just bit decoding and encoding to utf 8 can address all issues in python 3.5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AD52PWXH6HFTRUHXQPE3ZALQ36TDZA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICDC2I#issuecomment-570700137 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AD52PWWEOI5IXLNM4PZYWB3Q36TDZANCNFSM4D4E4LIQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AFZGCLNG3EATA67WYNB6EODQ4AJFHA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICQ6HI#issuecomment-570756893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFZGCLINWDLVIA2EEKKA4QTQ4AJFHANCNFSM4D4E4LIQ .

justNik101 commented 4 years ago

Hi Anthony,

After making some tweak I was able to make this code work Like changing print "" to print(""), Handling import error of urllib for python3, Encoding request body in utf-8, Decoding utf-8 API response etc

PFA / https://github.com/GREEKYnikhilsharma/Xen0ph0n-VirusTotal_API_Tool-Python3 ,

In case you face any concern with respect to attached scripts do let me know.

On Sat, Jan 4, 2020, 16:27 Anthony Pinto notifications@github.com wrote:

Any chance you can post that code,

Anthony Pinto Cybersecurity Program Coordinator CAE Faculty Fellow Computer Science Department University of West Florida Bldg 4 Rm 228 850-474-2974 apinto@uwf.edu

Explore Cybersecurity at UWF: http://uwf.edu/cybersecurity/ *The NSA-DHS National Center of Academic Excellence (CAE) Regional Resource Center for the Southeast US *and an NSA-DHS CAE in Cyber Defense Education

On Fri, Jan 3, 2020 at 10:55 PM Nikhil Sharma notifications@github.com wrote:

When I tried to run this project on windows 10 - python 3.5, I faced many compilation errors, By doing this I was able to run the file.

On Sat, Jan 4, 2020, 02:44 Anthony Pinto notifications@github.com wrote:

What do you mean by just bit decoding and encoding to utf 8 can address all issues in python 3.5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AD52PWXH6HFTRUHXQPE3ZALQ36TDZA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICDC2I#issuecomment-570700137

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AD52PWWEOI5IXLNM4PZYWB3Q36TDZANCNFSM4D4E4LIQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AFZGCLNG3EATA67WYNB6EODQ4AJFHA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICQ6HI#issuecomment-570756893 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AFZGCLINWDLVIA2EEKKA4QTQ4AJFHANCNFSM4D4E4LIQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AD52PWREZVOMCGLWBTP5UFLQ4BTSXA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICVRSY#issuecomment-570775755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD52PWQK4W74XOIN6P3JFCTQ4BTSXANCNFSM4D4E4LIQ .

justNik101 commented 4 years ago

https://github.com/GREEKYnikhilsharma/Xen0ph0n-VirusTotal_API_Tool-Python3

On Sat, Jan 4, 2020, 19:27 Nikhil Sharma nkhl681@gmail.com wrote:

Hi Anthony,

After making some tweak I was able to make this code work Like changing print "" to print(""), Handling import error of urllib for python3, Encoding request body in utf-8, Decoding utf-8 API response etc

PFA,

In case you face any concern with respect to attached scripts do let me know.

On Sat, Jan 4, 2020, 16:27 Anthony Pinto notifications@github.com wrote:

Any chance you can post that code,

Anthony Pinto Cybersecurity Program Coordinator CAE Faculty Fellow Computer Science Department University of West Florida Bldg 4 Rm 228 850-474-2974 apinto@uwf.edu

Explore Cybersecurity at UWF: http://uwf.edu/cybersecurity/ *The NSA-DHS National Center of Academic Excellence (CAE) Regional Resource Center for the Southeast US *and an NSA-DHS CAE in Cyber Defense Education

On Fri, Jan 3, 2020 at 10:55 PM Nikhil Sharma notifications@github.com wrote:

When I tried to run this project on windows 10 - python 3.5, I faced many compilation errors, By doing this I was able to run the file.

On Sat, Jan 4, 2020, 02:44 Anthony Pinto notifications@github.com wrote:

What do you mean by just bit decoding and encoding to utf 8 can address all issues in python 3.5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AD52PWXH6HFTRUHXQPE3ZALQ36TDZA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICDC2I#issuecomment-570700137

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AD52PWWEOI5IXLNM4PZYWB3Q36TDZANCNFSM4D4E4LIQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AFZGCLNG3EATA67WYNB6EODQ4AJFHA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICQ6HI#issuecomment-570756893 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AFZGCLINWDLVIA2EEKKA4QTQ4AJFHANCNFSM4D4E4LIQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Xen0ph0n/VirusTotal_API_Tool/issues/10?email_source=notifications&email_token=AD52PWREZVOMCGLWBTP5UFLQ4BTSXA5CNFSM4D4E4LI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICVRSY#issuecomment-570775755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD52PWQK4W74XOIN6P3JFCTQ4BTSXANCNFSM4D4E4LIQ .