Commit feb1cce5 by devttys0

Added comments/docs to core code files

parent 0424af6d
......@@ -119,6 +119,7 @@ class Library(object):
lib_path = ctypes.util.find_library(library)
# If ctypes failed to find the library, check the common paths listed in system_paths
if not lib_path:
for path in system_paths[sys.platform]:
if os.path.exists(path):
......
# Code to handle displaying and logging of results.
# Anything in binwalk that prints results to screen should use this class.
import sys
import csv as pycsv
import datetime
......
# Code for filtering of results (e.g., removing invalid results)
import re
import binwalk.core.common as common
from binwalk.core.smart import Signature
......@@ -34,7 +36,6 @@ class FilterExclude(FilterType):
class Filter(object):
'''
Class to filter results based on include/exclude rules and false positive detection.
An instance of this class is available via the Binwalk.filter object.
Note that all filter strings should be in lower case.
'''
......
# Python wrapper for the libmagic library.
# Although libmagic comes with its own wrapper, there are compatibility issues with older libmagic versions
# as well as unofficial libmagic Python wrappers, so it's easier to just have our own wrapper.
import binwalk.core.C
import binwalk.core.common
from binwalk.core.compat import *
......
# Core code relating to binwalk modules and supporting classes.
# In particular, the Module class (base class for all binwalk modules)
# and the Modules class (main class for managing and executing binwalk modules)
# are most critical.
import io
import os
import sys
......
# Code for performing minimal parsing of libmagic-compatible signature files.
# This allows for building a single signature file from multiple other signature files,
# and for parsing out the initial magic signature bytes for each signature (used for
# pre-processing of data to limit the number of actual calls into libmagic).
#
# Also performs splitting/formatting of libmagic result text.
import io
import re
import os.path
......
# Core code for supporting and managing plugins.
import os
import sys
import imp
......
# Code for loading and accessing binwalk settings (extraction rules, signature files, etc).
import os
import binwalk.core.common as common
from binwalk.core.compat import *
......
# "Smart" parser for handling libmagic signature results. Specifically, this implements
# support for binwalk's custom libmagic signature extensions (keyword tags, string processing,
# false positive detection, etc).
import re
import binwalk.core.module
from binwalk.core.compat import *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment