Commit 52cf4db9 by devttys0

Updated modules comments/docs

parent feb1cce5
# Generates 3D visualizations of input files.
import os
from binwalk.core.compat import *
from binwalk.core.common import BlockFile
......@@ -135,7 +137,9 @@ class Plotter(Module):
for point in sorted(data_points, key=data_points.get, reverse=True):
plot_points[point] = data_points[point]
self.result(point=point)
# Register this as a result in case future modules need access to the raw point information,
# but mark plot as False to prevent the entropy module from attempting to overlay this data on its graph.
self.result(point=point, plot=False)
total += 1
if total >= self.max_points:
break
......
#!/usr/bin/env python
# Performs raw decompression of various compression algorithms (currently, only deflate).
import os
import binwalk.core.C
......
# Calculates and optionally plots the entropy of input files.
import os
import math
import binwalk.core.common
......
# Performs extraction of data that matches extraction rules.
# This is automatically invoked by core.module code if extraction has been
# enabled by the user; other modules need not reference this module directly.
import os
import re
import sys
......
# Module to process general user input options (scan length, starting offset, etc).
import os
import sys
import argparse
......
# Performs fuzzy hashing against files/directories.
# Unlike other scans, this doesn't produce any file offsets, so its results are not applicable to
# some other scans, such as the entropy scan.
# Additionally, this module currently doesn't support certian general options (length, offset, swap, etc),
# as the libfuzzy C library is responsible for opening and scanning the specified files.
import os
import re
import ctypes
......@@ -110,7 +116,7 @@ class HashMatch(Module):
if match < 10:
fname = ' ' + fname
self.result(percentage=match, description=fname)
self.result(percentage=match, description=fname, plot=False)
def _compare_files(self, file1, file2):
'''
......
#!/usr/bin/env python
# Routines to perform Monte Carlo Pi approximation and Chi Squared tests.
# Routines to perform Chi Squared tests.
# Used for fingerprinting unknown areas of high entropy (e.g., is this block of high entropy data compressed or encrypted?).
# Inspired by people who actually know what they're doing: http://www.fourmilab.ch/random/
......
# Basic signature scan module. This is the default (and primary) feature of binwalk.
import binwalk.core.magic
import binwalk.core.smart
import binwalk.core.parser
......
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