summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-03-24 14:14:15 +0100
committerHelmut Grohne <helmut@subdivi.de>2013-03-24 14:14:15 +0100
commit2c21b4f1203ba69727c64f1a3bf2fe84cc1565db (patch)
tree64042bdc22b3fc698234178e48041e5e9f3ecdf4
parent2d8089777e978a0029a0a292d4503d01fbc83638 (diff)
downloadssdeep-2c21b4f1203ba69727c64f1a3bf2fe84cc1565db.tar.gz
support stdin mode like original ssdeep
-rw-r--r--fuzzy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fuzzy.c b/fuzzy.c
index 32b19ad..fd36039 100644
--- a/fuzzy.c
+++ b/fuzzy.c
@@ -391,5 +391,10 @@ int main(int argc, char **argv) {
printf("%s,\"%s\"\n", digest, p);
free(p);
}
+ if(argc == 1) {
+ if(fuzzy_hash_stream(stdin, digest) < 0)
+ return 1;
+ printf("%s,\"stdin\"\n", digest);
+ }
return 0;
}