-
Notifications
You must be signed in to change notification settings - Fork 238
103 offsets in printable strings plugin #109
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
==========================================
+ Coverage 94.3% 94.33% +0.03%
==========================================
Files 294 294
Lines 14439 14498 +59
==========================================
+ Hits 13617 13677 +60
+ Misses 822 821 -1
Continue to review full report at Codecov.
|
weidenba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crashes on some firmware images:
[2018-05-15 08:12:16][PluginBase][WARNING]: Worker 0: Timeout printable_strings analysis on 801afaa74a2ae951e4f4fb261885342608b521d173a2bc8027f78c1a6713615f_26481084
Process ExceptionSafeProcess-28:4:
Traceback (most recent call last):
File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/weidenba/git/FACT_core_github/src/helperFunctions/process.py", line 59, in run
raise exception
File "/home/weidenba/git/FACT_core_github/src/helperFunctions/process.py", line 54, in run
Process.run(self)
File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/weidenba/git/FACT_core_github/src/analysis/PluginBase.py", line 125, in process_next_object
finished_task = self.analyze_file(task)
File "/home/weidenba/git/FACT_core_github/src/analysis/PluginBase.py", line 74, in analyze_file
fo = self.process_object(file_object)
File "/home/weidenba/git/FACT_core_github/src/plugins/analysis/string_evaluation/code/string_eval.py", line 30, in process_object
list_of_printable_strings = file_object.processed_analysis['printable_strings']['strings']
KeyError: 'strings'
| fo = FileObject(file_path=os.path.join(TEST_DATA_DIR, 'string_find_test_file2')) | ||
| fo = self.analysis_plugin.process_object(fo) | ||
| results = fo.processed_analysis[self.PLUGIN_NAME] | ||
| print(results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug message that should be removed?
| @@ -1,3 +1,4 @@ | |||
| import pytest | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
| ] | ||
|
|
||
| super().__init__(plugin_administrator, config=config, recursive=recursive, plugin_path=__file__) | ||
| def _get_min_length_from_config(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why we do not use the get function with Fallback Value:
https://docs.python.org/3/library/configparser.html
src/web_interface/filter.py
Outdated
| def filter_format_string_list_with_offset(offset_tuples): | ||
| max_offset_len = len(str(max(list(zip(*offset_tuples))[0]))) if offset_tuples else 0 | ||
| lines = [ | ||
| "{0: >{width}}: {1}".format(offset, repr(string), width=max_offset_len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use single quotes
…s-plugin 103 offsets in printable strings plugin
closes #103