Skip to content

Commit 4abd0a8

Browse files
Fixed bug in temporaryy file not being written as binary, causing false negatives for protoc.
Signed-off-by: Three Planets Software <[email protected]>
1 parent ad20d9c commit 4abd0a8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In addition, while this script attempts to cut down on memory usage, for large f
2222
### Protobufs
2323
If you want to try to find protobufs, use the `--protobufs` switch on the command line. This is somewhat experimental code and is not optimal for large databases as it literally tries to parse every blob as a protobuf and records when a blob correctly parses. It requires you to have the `protoc` [package](https://github.com/protocolbuffers/protobuf) installed. This may have false positives for binary data which appears to start like a protobuf.
2424

25-
If you are on Windows, the easiest way to install protoc is to download [this package](https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-win64.zip) and put the file `bin/protoc.exe` into `C:\Windows\system32`. However, as a **warning**, in testing it seems that the same version of protoc on Windows finds significantly less protobufs in the same test file as on Linux and MacOS. You are advised to use a differnt operating system, if you can. Linux distributions can be found [for free](https://linuxmint.com/download.php) in LiveCD form which would not require you to make any permenant changes to your computer.
25+
If you are on Windows, the easiest way to install protoc is to download [this package](https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-win64.zip) and put the file `bin/protoc.exe` into `C:\Windows\system32`.
2626

2727
### Options
2828
The required options that are currently supported are (one of):

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 1.2.4 (September 19 2020)
2+
------------
3+
Bug Fixes
4+
- Changed temporary file handle for protoc check to use binmode.
5+
16
Version 1.2.3 (September 17 2020)
27
------------
38
New Features

sqlite_miner.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use POSIX qw(strftime);
2727
use Time::HiRes qw(time);
2828

29-
my $version = "1.2.3";
29+
my $version = "1.2.4";
3030

3131
# Set up initial variables
3232
my $start_time = time;
@@ -592,6 +592,7 @@ sub check_column_for_fun {
592592

593593
# Create a file to hold the results of this
594594
open(TMP_OUTPUT, ">tmp_output.txt");
595+
binmode TMP_OUTPUT;
595596
print TMP_OUTPUT "$tmp_data_blob";
596597
close(TMP_OUTPUT);
597598

0 commit comments

Comments
 (0)