[Forensics-changes] [hashrat] 01/02: Import Upstream version 1.8.9+dfsg
Giovani Augusto Ferreira
giovani at moszumanska.debian.org
Wed Sep 13 20:33:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
giovani pushed a commit to branch debian
in repository hashrat.
commit b843ca54cc6aeb1aefdda49c9f4029d5c49181ce
Author: Giovani Augusto Ferreira <giovani at debian.org>
Date: Wed Sep 13 17:33:02 2017 -0300
Import Upstream version 1.8.9+dfsg
---
Makefile | 2 +-
cgi.c | 20 +++++++++++++-------
common.h | 2 +-
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index cb6b4c7..dfc06b9 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ LIBS =
INSTALL=/bin/install -c
prefix=/usr/local
bindir=$(prefix)${exec_prefix}/bin
-FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_XATTR=1
+FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64
OBJ=common.o command-line-args.o ssh.o fingerprint.o files.o filesigning.o xattr.o cgi.o check-hash.o find.o memcached.o
EXE=hashrat
diff --git a/cgi.c b/cgi.c
index 9e76a41..bf2bb9b 100644
--- a/cgi.c
+++ b/cgi.c
@@ -24,7 +24,7 @@ printf("<select name=%s>\r\n", Name);
Curr=ListGetNext(Items);
while(Curr)
{
- if (StrLen(CurrType) && (strcmp(Curr->Tag,CurrType)==0)) printf("<option selected> %s\r\n",Curr->Tag);
+ if (StrLen(CurrType) && (strcmp(Curr->Tag,CurrType)==0)) printf("<option selected value=%s> %s\r\n",Curr->Tag, Curr->Item);
else printf("<option value=%s> %s\r\n",Curr->Tag, Curr->Item);
Curr=ListGetNext(Curr);
}
@@ -59,7 +59,7 @@ printf("</td>\r\n");
}
-int CGIParseArgs(char **HashType, char **Encoding, char *LineEnding, char **Text)
+int CGIParseArgs(char **HashType, char **Encoding, char **LineEnding, char **Text)
{
char *QName=NULL, *QValue=NULL, *Name=NULL, *Value=NULL, *ptr;
int Flags=0;
@@ -131,7 +131,7 @@ void CGIDisplayPage()
char *HashType=NULL, *Encoding=NULL, *LineEnding=NULL, *Text=NULL, *Hash=NULL;
HashratCtx *Ctx;
ListNode *Items;
-int Flags, val, i;
+int Flags, i;
Items=ListCreate();
@@ -162,12 +162,15 @@ if (Flags & CGI_DOHASH)
Ctx->HashType=CopyStr(Ctx->HashType,HashType);
Ctx->Encoding |=ENCODE_HEX;
- val=MatchTokenFromList(Encoding, EncodingNames, 0);
- if (val > -1) Ctx->Encoding=Encodings[i];
+ i=MatchTokenFromList(Encoding, EncodingNames, 0);
+ if (i > -1) Ctx->Encoding=Encodings[i];
+ if (StrLen(LineEnding))
+ {
if (strcmp(LineEnding, "crlf")==0) Text=CatStr(Text,"\r\n");
if (strcmp(LineEnding, "lf")==0) Text=CatStr(Text,"\n");
if (strcmp(LineEnding, "cr")==0) Text=CatStr(Text,"\r");
+ }
ProcessData(&Hash, Ctx, Text, StrLen(Text));
@@ -190,14 +193,14 @@ printf("</tr>\r\n");
printf("<tr>\r\n");
printf("<td>Encoding:</td>\r\n");
for (i=0; EncodingNames[i] !=NULL; i++) SetVar(Items, EncodingNames[i], EncodingDescriptions[i]);
-CGIPrintSelect("Encoding", HashType, Items);
+CGIPrintSelect("Encoding", Encoding, Items);
ListClear(Items, DestroyString);
printf("</tr>\r\n");
printf("<tr>\r\n");
printf("<td>Line Ending:</td>\r\n");
for (i=0; LineEndingNames[i] !=NULL; i++) SetVar(Items, LineEndingNames[i], LineEndingDescriptions[i]);
-CGIPrintSelect("LineEnding", HashType, Items);
+CGIPrintSelect("LineEnding", LineEnding, Items);
ListClear(Items, DestroyString);
printf("</tr>\r\n");
@@ -209,6 +212,9 @@ printf("</form></html></body>\r\n");
fflush(NULL);
ListDestroy(Items, DestroyString);
+
+DestroyString(LineEnding);
+DestroyString(Encoding);
DestroyString(HashType);
DestroyString(Hash);
DestroyString(Text);
diff --git a/common.h b/common.h
index 0c4b26b..5742348 100644
--- a/common.h
+++ b/common.h
@@ -72,7 +72,7 @@
#define IGNORE -1
-#define VERSION "1.8.7"
+#define VERSION "1.8.9"
typedef struct
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/hashrat.git
More information about the forensics-changes
mailing list