Closed nigleweber closed 1 year ago
Additions:
URL for VT File API: https://developers.virustotal.com/reference/file-info
Suggestions for "UI":
Improvements:
if file_arg:
and its corresponding else
statementwrite_file_reputation_report
file_reputation = False
onwards and split into new functionPriority 1 improvements so that I can review faster:
@v3r1t4s You missed a couple of the previous action items:
Missed:
To do for next iteration:
[x] Reduce calls to append_file
[x] Split parse_json
function into two. End parse_json
at analysis_stat = res_dic
and return analysis_stat
data_processing
for now, we can improve it later[x] Please post the output (the txt/json file) of a successful run
[x] For logic_func let's de-duplicate bunch of code. Line 227-236 are/should be identical to 239-247. Let's split this off to a separate function
Looking better and better! 👍
Comments/Questions:
parse_json
To do for next iteration:
parse_json
a generic/helper function. Pass in (potential json string) and a key to search for/parse outparse_filename
to reference user inputparse_filename
generic/helperappend_report
a generic/helpertrue/false
for errors, return an error message or "" to denote no errorBonus:
read_api_key
, check_if_filepath_exists
and exception_handler
to the Helper module (file)verify_at_least_one_command_line_argument
more generic, to check if we have X minimum arguments, where X is an argument to the function also rename the function as appropriate
Let's build a VirusTotal search tool that can be used to search for arbitrary things using the vtapi.
To Do:
[ ] Plan program structure
[x] Setup editor of choice (VSCode and Atom are popular)
[x] Install packages for formatting
[x] Add a python linter
[x] Obtain Virustotal account + key <- this is free
[x] SHA-256 to test with
c4556a383a40a97900e110fdb0e24ac01868ea9accaed6e9b76bc9b0d0b55d85
[x] Create api key loading function
[x] Accept cmdline input for a SHA to search for
[x] Create function to make api request
https://developers.virustotal.com/reference/search-1
[x] Return the JSON output and pass it to a JSON parser function
[x] Let's get a count on the number of detections and a listing of each detecting engine
Protips
#MAGIC NUMBER
so you can easily find it#TESTING CODE
so you can easily (un)comment it in the future