这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jstucke
Copy link
Collaborator

@jstucke jstucke commented May 2, 2018

closes #103

@jstucke jstucke requested a review from weidenba May 2, 2018 11:07
@codecov-io
Copy link

codecov-io commented May 2, 2018

Codecov Report

Merging #109 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/plugins/analysis/strings/code/strings.py 100% <100%> (+5.26%) ⬆️
src/web_interface/filter.py 88.94% <100%> (+0.2%) ⬆️
...ugins/analysis/strings/test/test_plugin_strings.py 100% <100%> (ø) ⬆️
src/web_interface/components/jinja_filter.py 88.34% <100%> (+0.11%) ⬆️
src/test/unit/web_interface/test_filter.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f46bd5...6def263. Read the comment docs.

Copy link
Contributor

@weidenba weidenba left a 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)
Copy link
Contributor

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
Copy link
Contributor

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):
Copy link
Contributor

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

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use single quotes

@weidenba weidenba merged commit 639ad36 into master May 22, 2018
@weidenba weidenba deleted the 103-offsets-in-printable-strings-plugin branch May 22, 2018 13:25
weidenba added a commit that referenced this pull request Oct 22, 2018
…s-plugin

103 offsets in printable strings plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Printable Strings Plug-In should provide offsets

4 participants