Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into peid-client-change
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Jul 1, 2014
2 parents f8c9e50 + 1c81035 commit a9f5704
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 13 deletions.
24 changes: 23 additions & 1 deletion docs/_themes/mozilla/static/mozilla.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,26 @@ div.viewcode-block:target {
@media screen and (max-width: 480px) {
#workbench-server-reference .sidebar {width:100%}
}
span[id*='MathJax-Span'] {color:#404040}
span[id*='MathJax-Span'] {color:#404040}

#workers-reference dl {margin-bottom:24px}
#workers-reference dl dt {font-weight:bold}
#workers-reference dl p,#workers-reference dl table,#workers-reference dl ul,#workers-reference dl ol {margin-bottom:12px !important}
#workers-reference dl dd {margin:0 0 12px 24px}
#workers-reference dl:not(.docutils) {margin-bottom:24px}
#workers-reference dl:not(.docutils) dt {display:inline-block;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:solid 3px #6ab0de;padding:6px;position:relative}
#workers-reference dl:not(.docutils) dt:before {color:#6ab0de}
#workers-reference dl:not(.docutils) dt .headerlink {color:#404040;font-size:100% !important}
#workers-reference dl:not(.docutils) dl dt {margin-bottom:6px;border:none;border-left:solid 3px #ccc;background:#f0f0f0;color:gray}
#workers-reference dl:not(.docutils) dl dt .headerlink {color:#404040;font-size:100% !important}
#workers-reference dl:not(.docutils) dt:first-child {margin-top:0}
#workers-reference dl:not(.docutils) tt {font-weight:bold}
#workers-reference dl:not(.docutils) tt.descname,#workers-reference dl:not(.docutils) tt.descclassname {background-color:transparent;border:none;padding:0;font-size:100% !important}
#workers-reference dl:not(.docutils) tt.descname {font-weight:bold}
#workers-reference dl:not(.docutils) .optional {display:inline-block;padding:0 4px;color:#000;font-weight:bold}
#workers-reference dl:not(.docutils) .property {display:inline-block;padding-right:8px}
#workers-reference .viewcode-link,#workers-reference .viewcode-back {display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}
#workers-reference .viewcode-back {display:block;float:right}
@media screen and (max-width: 480px) {
#workers-reference .sidebar {width:100%}
}
1 change: 0 additions & 1 deletion workbench/clients/pe_sim_graph.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
''' This client generates a similarity graph from features in PE Files '''
import zerorpc
import argparse
import os
import ConfigParser

Expand Down
5 changes: 2 additions & 3 deletions workbench/clients/upload_dir.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
''' This client pushes a big directory of different files into Workbench '''
import zerorpc
import os
import argparse
import ConfigParser
import hashlib

Expand Down Expand Up @@ -37,8 +36,8 @@ def main():
print 'Workbench already has this sample %s' % md5
else:
# Store the sample into workbench
md5 = workbench.store_sample(filename, raw_bytes, args.tag)
print 'Filename %s uploaded: type_tag %s, md5 %s' % (filename, args.tag, md5)
md5 = workbench.store_sample(filename, raw_bytes, 'unknown')
print 'Filename %s uploaded: type_tag %s, md5 %s' % (filename, 'unknown', md5)

def test():
''' file_upload test '''
Expand Down
1 change: 0 additions & 1 deletion workbench/clients/upload_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import zerorpc
import os
import pprint
import argparse
import ConfigParser

# We're not using this but it might be handy to someone
Expand Down
1 change: 0 additions & 1 deletion workbench/clients/zip_file_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import zerorpc
import os
import pprint
import argparse
import ConfigParser

def main():
Expand Down
4 changes: 2 additions & 2 deletions workbench/server/bro/bro_log_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ def _cast_value(self, value):

# Create a BRO log file reader and pull from the logfile
BRO_LOG = BroLogReader()
RECORDS = BRO_LOG.read_log(open(OPTIONS.logfile, 'rb'), max_rows=10)
RECORDS = BRO_LOG.read_log(open(OPTIONS.logfile, 'rb'))
for row in RECORDS:
print row
print row
2 changes: 1 addition & 1 deletion workbench/server/workbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def help_worker(self, worker):
''' Returns a specific Workbench worker and docstring '''
try:
plugin = self.plugin_meta[worker]
return '\n Worker: %s %s\n\t%s' % (name, str(plugin['class'].dependencies), plugin['class'].__doc__)
return '\n Worker: %s %s\n\t%s' % (worker, str(plugin['class'].dependencies), plugin['class'].__doc__)
except KeyError:
return '%s worker not found.. misspelled?' % worker

Expand Down
2 changes: 1 addition & 1 deletion workbench/workers/pe_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def open_using_pefile(input_name, input_bytes):
''' Open the PE File using the Python pefile module. '''
try:
pef = pefile.PE(data=input_bytes, fast_load=False)
except pefile.PEFormatError, error:
except (AttributeError, pefile.PEFormatError), error:
print 'warning: pe_fail (with exception from pefile module) on file: %s' % input_name
error_str = '(Exception):, %s' % (str(error))
return None, error_str
Expand Down
2 changes: 1 addition & 1 deletion workbench/workers/pe_indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def execute(self, input_data):
# Have the PE File module process the file
try:
self.pefile_handle = pefile.PE(data=raw_bytes, fast_load=False)
except pefile.PEFormatError, error:
except (AttributeError, pefile.PEFormatError), error:
return {'error': str(error), 'indicator_list': [{'Error': 'PE module failed!'}]}

indicators = []
Expand Down
2 changes: 1 addition & 1 deletion workbench/workers/pe_peid.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def execute(self, input_data):
# Have the PE File module process the file
try:
pefile_handle = pefile.PE(data=raw_bytes, fast_load=False)
except pefile.PEFormatError, error:
except (AttributeError, pefile.PEFormatError), error:
return {'error': str(error), 'match_list': []}

# Now get information from PEID module
Expand Down

0 comments on commit a9f5704

Please sign in to comment.