Skip to content

Commit

Permalink
Merge pull request #341 from simsong/hotfix-338
Browse files Browse the repository at this point in the history
Hotfix 338
  • Loading branch information
simsong authored Feb 12, 2022
2 parents 738911d + 90ad256 commit 17c2a0d
Show file tree
Hide file tree
Showing 78 changed files with 210 additions and 194 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# 2020-06-27 - slg - expanded to G++ for MacOS
# 2020-07-03 - slg - ported to be13_api; removed python (be13_api doesn't use python)
# 2021-05-07 - slg - Started work again
# 2022-02-10 - slg - renamed be20_api. Our work here is done.

name: BE2 CI (c++17)
on: [push]
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
cd src
gcov-9 -o . *.cpp be13_api/*.cpp
gcov-9 -o . *.cpp be20_api/*.cpp
bash <(curl -s https://codecov.io/bash)
#
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "src/be13_api"]
path = src/be13_api
path = src/be20_api
url = https://github.com/simsong/be20_api.git
[submodule "dfxml_schema"]
path = dfxml_schema
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

mkdir -p build-aux

for sub in be13_api be13_api/dfxml_cpp
for sub in be20_api be20_api/dfxml_cpp
do
if [ ! -r src/$sub/.git ] ; then
echo submodule $sub is not present.
Expand Down
6 changes: 3 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ coverage:


ignore:
- "be13_api/catch.hpp"
- "be13_api/utf8.h"
- "be13_api/utf8/*"
- "be20_api/catch.hpp"
- "be20_api/utf8.h"
- "be20_api/utf8/*"
- "rar/*"
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
# and http://www.bioinf.uni-freiburg.de/~mmann/HowTo/automake.html

AC_PREREQ([2.69])
AC_INIT([BULK_EXTRACTOR],[2.0.0-beta5],[[email protected]])
AC_INIT([BULK_EXTRACTOR],[2.0.0],[[email protected]])
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_AUX_DIR([build-aux])
################################################################
## Includes

m4_include([m4/slg_mingw_support.m4])
m4_include([m4/slg_searchdirs.m4])
m4_include([src/be13_api/dfxml_cpp/src/dfxml_configure.m4])
m4_include([src/be13_api/be13_configure.m4])
m4_include([src/be20_api/dfxml_cpp/src/dfxml_configure.m4])
m4_include([src/be20_api/be20_configure.m4])

AC_CONFIG_FILES([Makefile doc/Makefile doc/latex_manuals/Makefile src/Makefile src/tests/Makefile man/Makefile \
python/Makefile specfiles/Makefile specfiles/bulk_extractor.spec.m4 tests/Makefile ])
Expand Down Expand Up @@ -47,7 +47,7 @@ AC_LANG_POP()


# Turn on all warnings
m4_include([src/be13_api/m4/slg_gcc_all_warnings.m4])
m4_include([src/be20_api/m4/slg_gcc_all_warnings.m4])

# These are needed for bulk_extractor. They are not needed for tcpflow
AC_DEFINE([BULK_EXTRACTOR],1,[We are compiling bulk_extractor])
Expand Down Expand Up @@ -296,8 +296,8 @@ else
CXXFLAGS="$CXXFLAGS -fPIC"
fi

m4_include([src/be13_api/m4/slg_address_sanitizer.m4])
m4_include([src/be13_api/m4/slg_noopt.m4])
m4_include([src/be20_api/m4/slg_address_sanitizer.m4])
m4_include([src/be20_api/m4/slg_noopt.m4])



Expand Down
2 changes: 1 addition & 1 deletion etc/CONFIGURE_CENTOS7.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
LIBEWF_URL=https://github.com/libyal/libewf/releases/download/20171104/libewf-experimental-20171104.tar.gz
cat <<EOF
*******************************************************************
Configuring Amazon Linux for compiling bulk_extractor
Expand Down Expand Up @@ -29,6 +28,7 @@ else
changed_dir="false"
fi
cd $DIR
source paths.bash

MPKGS="autoconf automake flex gcc gcc-c++ git libtool "
MPKGS+="md5deep wget zlib-devel "
Expand Down
1 change: 1 addition & 0 deletions etc/paths.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LIBEWF_URL=https://github.com/libyal/libewf-legacy/releases/download/20140812/libewf-20140812.tar.gz
16 changes: 8 additions & 8 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
bin_PROGRAMS = bulk_extractor test_be

CLEANFILES = scan_accts.cpp scan_base16.cpp scan_email.cpp scan_gps.cpp \
be13_api/config.h be13_api/dfxml/src/config.h config.h *.d *~
be20_api/config.h be20_api/dfxml/src/config.h config.h *.d *~

TESTS = test_be
check_PROGRAMS = test_be

# bring in defs from two included projects
# note: don't be clever and use the $variable on the Include line. it doesn't work

BE13_API_DIR= be13_api
include be13_api/Makefile.defs
BE20_API_DIR= be20_api
include be20_api/Makefile.defs
include rar/Makefile.defs

# So that relative imports from be13_api work
AM_CPPFLAGS = -I${top_srcdir}/src/be13_api
# So that relative imports from be20_api work
AM_CPPFLAGS = -I${top_srcdir}/src/be20_api
AUTOMAKE_OPTIONS = subdir-objects
EXTRA_DIST = .gitignore $(BE13_API_EXTRA_DIST)
EXTRA_DIST = .gitignore $(BE20_API_EXTRA_DIST)

TSK3INCS = \
tsk3_fatdirs.h\
Expand Down Expand Up @@ -106,7 +106,7 @@ endif

bulk_extractor_parts = \
$(TSK3INCS) \
$(BE13_API_SRC) \
$(BE20_API_SRC) \
bulk_extractor_restarter.h \
bulk_extractor_scanners.h \
base64_forensic.cpp \
Expand All @@ -125,7 +125,7 @@ bulk_extractor_parts = \


bulk_extractor_SOURCES = $(bulk_extractor_parts) $(scanners_builtin) main.cpp
test_be_SOURCES = $(bulk_extractor_parts) $(scanners_builtin) be13_api/catch.hpp test_be.h test_be1.cpp test_be2.cpp test_be3.cpp
test_be_SOURCES = $(bulk_extractor_parts) $(scanners_builtin) be20_api/catch.hpp test_be.h test_be1.cpp test_be2.cpp test_be3.cpp


runs.txt: test_be tests/run_each.sh
Expand Down
1 change: 0 additions & 1 deletion src/be13_api
Submodule be13_api deleted from 447b2e
1 change: 1 addition & 0 deletions src/be20_api
Submodule be20_api added at 29f4f6
14 changes: 7 additions & 7 deletions src/bulk_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ int _CRT_fmode = _O_BINARY;
#include "dfxml_cpp/src/dfxml_writer.h"
#include "dfxml_cpp/src/hash_t.h" // needs config.h

#include "be13_api/aftimer.h"
#include "be13_api/scanner_params.h"
#include "be13_api/scanner_set.h"
#include "be13_api/utils.h" // needs config.h
#include "be13_api/word_and_context_list.h"
#include "be13_api/path_printer.h"
#include "be20_api/aftimer.h"
#include "be20_api/scanner_params.h"
#include "be20_api/scanner_set.h"
#include "be20_api/utils.h" // needs config.h
#include "be20_api/word_and_context_list.h"
#include "be20_api/path_printer.h"

#include "bulk_extractor.h"
#include "image_process.h"
Expand Down Expand Up @@ -211,7 +211,7 @@ int bulk_extractor_main( std::ostream &cout, std::ostream &cerr, int argc,char *
bulk_extractor_help += " (Includes LightGrep support)";
#endif

scanner_config sc; // config for be13_api
scanner_config sc; // config for be20_api
cxxopts::Options options( "bulk_extractor", bulk_extractor_help.c_str());
options.set_width( notify_thread::terminal_width( 80 ));
options.add_options()
Expand Down
4 changes: 2 additions & 2 deletions src/bulk_extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef _BULK_EXTRACTOR_H_
#define _BULK_EXTRACTOR_H_

#include "be13_api/scanner_set.h"
#include "be13_api/aftimer.h"
#include "be20_api/scanner_set.h"
#include "be20_api/aftimer.h"
#include "notify_thread.h"

#include <ostream>
Expand Down
2 changes: 1 addition & 1 deletion src/bulk_extractor_restarter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <exception>
#include <filesystem>

#include "be13_api/formatter.h"
#include "be20_api/formatter.h"

#ifdef HAVE_EXPAT_H
#include <expat.h>
Expand Down
2 changes: 1 addition & 1 deletion src/bulk_extractor_scanners.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#ifndef BULK_EXTRACTOR_SCANNERS_H_FIRST_INCLUDE
#define BULK_EXTRACTOR_SCANNERS_H_FIRST_INCLUDE
#include "be13_api/scanner_set.h"
#include "be20_api/scanner_set.h"
extern "C" scanner_t *scanners_builtin[];
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/exif_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <algorithm>
#include "config.h"

#include "be13_api/utf8.h" // for reading UTF16 and UTF32
#include "be13_api/utils.h"
#include "be13_api/unicode_escape.h" // for validating or escaping UTF8
#include "be20_api/utf8.h" // for reading UTF16 and UTF32
#include "be20_api/utils.h"
#include "be20_api/unicode_escape.h" // for validating or escaping UTF8
#include "exif_entry.h"
#include "exif_reader.h"

Expand Down
2 changes: 1 addition & 1 deletion src/exif_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define EXIF_READER_H

#include "exif_entry.h"
#include "be13_api/sbuf.h"
#include "be20_api/sbuf.h"

/**
* Handle to the beginning of the tiff structure.
Expand Down
8 changes: 4 additions & 4 deletions src/image_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
#include <string>
#include <vector>

#include "be13_api/utf8.h"
#include "be13_api/utils.h"
#include "be13_api/aftimer.h"
#include "be13_api/formatter.h"
#include "be20_api/utf8.h"
#include "be20_api/utils.h"
#include "be20_api/aftimer.h"
#include "be20_api/formatter.h"
#include "image_process.h"

/****************************************************************
Expand Down
4 changes: 2 additions & 2 deletions src/image_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
* seek_block(block_number) - seeks to a block number n where 0 <= n < max_blocks()
*/

#include "be13_api/sbuf.h"
#include "be13_api/abstract_image_reader.h"
#include "be20_api/sbuf.h"
#include "be20_api/abstract_image_reader.h"

#include <filesystem>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/jpeg_validator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef JPEG_VALIDTOR_H
#define JPEG_VALIDTOR_H

#include "be13_api/sbuf.h"
#include "be20_api/sbuf.h"

extern bool exif_debug;

Expand Down
4 changes: 2 additions & 2 deletions src/notify_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <thread>
#include <mutex>
#include <condition_variable>
#include "be13_api/aftimer.h"
#include "be13_api/scanner_set.h"
#include "be20_api/aftimer.h"
#include "be20_api/scanner_set.h"

#include "phase1.h"

Expand Down
4 changes: 2 additions & 2 deletions src/pcap_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <mutex>
#include <ctype.h>

#include "be13_api/formatter.h"
#include "be13_api/utils.h"
#include "be20_api/formatter.h"
#include "be20_api/utils.h"
#include "pcap_writer.h"

/****************************************************************
Expand Down
2 changes: 1 addition & 1 deletion src/pcap_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <filesystem>
#include <iostream>

#include "be13_api/scanner_params.h"
#include "be20_api/scanner_params.h"

/* pcap_writer:
* Encapsulates the logic of writing pcap files.
Expand Down
6 changes: 3 additions & 3 deletions src/phase1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include "config.h"
#include "phase1.h"
#include "be13_api/utils.h" // needs config.h
#include "be13_api/aftimer.h" // needs config.h
#include "be13_api/dfxml_cpp/src/dfxml_writer.h"
#include "be20_api/utils.h" // needs config.h
#include "be20_api/aftimer.h" // needs config.h
#include "be20_api/dfxml_cpp/src/dfxml_writer.h"


/**
Expand Down
6 changes: 3 additions & 3 deletions src/phase1.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <atomic>
#include <ostream>

#include "be13_api/scanner_set.h"
#include "be13_api/dfxml_cpp/src/dfxml_writer.h"
#include "be13_api/dfxml_cpp/src/hash_t.h"
#include "be20_api/scanner_set.h"
#include "be20_api/dfxml_cpp/src/dfxml_writer.h"
#include "be20_api/dfxml_cpp/src/hash_t.h"

#include "image_process.h"

Expand Down
2 changes: 1 addition & 1 deletion src/sbuf_decompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef SBUF_DECOMPRESS_H
#define SBUF_DECOMPRESS_H

#include "be13_api/sbuf.h"
#include "be20_api/sbuf.h"

struct sbuf_decompress {

Expand Down
6 changes: 3 additions & 3 deletions src/sbuf_flex_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#define YY_NO_INPUT

#include "config.h"
#include "be13_api/sbuf.h"
#include "be13_api/scanner_params.h"
#include "be13_api/scanner_set.h"
#include "be20_api/sbuf.h"
#include "be20_api/scanner_params.h"
#include "be20_api/scanner_set.h"

/* should this become a template? */
class sbuf_scanner {
Expand Down
2 changes: 1 addition & 1 deletion src/scan_accts_lg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <algorithm>
#include <string>

#include "be13_api/scanner_params.h"
#include "be20_api/scanner_params.h"
#include "histogram.h"
#include "scan_ccns2.h"
#include "pattern_scanner.h"
Expand Down
4 changes: 2 additions & 2 deletions src/scan_aes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include <string.h>
#include <inttypes.h>

#include "be13_api/scanner_params.h"
#include "be13_api/scanner_set.h"
#include "be20_api/scanner_params.h"
#include "be20_api/scanner_set.h"

/* old aes.h file */

Expand Down
2 changes: 1 addition & 1 deletion src/scan_base16_lg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <string>

#include "be13_api/scanner_params.h"
#include "be20_api/scanner_params.h"
#include "histogram.h"
#include "pattern_scanner.h"

Expand Down
2 changes: 1 addition & 1 deletion src/scan_base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <cstring>

#include "config.h"
#include "be13_api/scanner_params.h"
#include "be20_api/scanner_params.h"

#include "base64_forensic.h"
#include "scan_base64.h"
Expand Down
4 changes: 2 additions & 2 deletions src/scan_ccns2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "config.h"
#include "scan_ccns2.h"

#include "be13_api/utils.h"
#include "be20_api/utils.h"
#include "dfxml_cpp/src/hash_t.h"

#include "be13_api/scanner_params.h"
#include "be20_api/scanner_params.h"

int scan_ccns2_debug=0;

Expand Down
Loading

0 comments on commit 17c2a0d

Please sign in to comment.