Skip to content

Commit

Permalink
v1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Colum Paget committed Jan 15, 2024
1 parent b9ad7f9 commit 360ab86
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.18 (2024-01-15)
* Fix base32 issue

v1.17 (2024-01-15)
* Fix build with compilers where library order matters
* Update manpage
Expand Down
4 changes: 2 additions & 2 deletions command-line-args.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ HashratCtx *CommandLineParseArg0()
SetVar(Ctx->Vars, "OTP:Digits", "6");
SetVar(Ctx->Vars, "OTP:Period", "30");
SetVar(Ctx->Vars,"DialogTypes","yad,zenity,qarma");
SetVar(Ctx->Vars, "clipboard_commands", "xsel -i -p -b,xclip -selection clipboard,pbcopy");
SetVar(Ctx->Vars, "image_viewers", "imlib2_view,fim,feh,display,xv,phototonic,qimageviewer,pix,sxiv,qimgv,qview,nomacs,geeqie,ristretto,mirage,fotowall,links -g");
SetVar(Ctx->Vars, "clipboard_commands", "xsel -i -p -b,xclip -selection clipboard,pbcopy");
SetVar(Ctx->Vars, "image_viewers", "imlib2_view,fim,feh,display,xv,phototonic,qimageviewer,pix,sxiv,qimgv,qview,nomacs,geeqie,ristretto,mirage,fotowall,links -g");
Ctx->SegmentChar='-';


Expand Down
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "libUseful-5/libUseful.h"
#include "glob.h"

#define VERSION "1.17"
#define VERSION "1.18"

#define ACT_NONE 0
#define ACT_HASH 1
Expand Down
2 changes: 1 addition & 1 deletion hashrat.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hashrat "1" "Jan 2015" "HASHRAT 1.17" "hashing tool supporting several hashes and recursivity"
.TH hashrat "1" "Jan 2015" "HASHRAT 1.18" "hashing tool supporting several hashes and recursivity"
.\"Text automatically generated by txt2man
.SH NAME
\fBhashrat \fP- hashing tool supporting several hashes and recursivity
Expand Down
2 changes: 1 addition & 1 deletion hashrat.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: hashrat
Version: 1.17
Version: 1.18
Release: 1%{?dist}
Summary: A hash-generation utility

Expand Down
1 change: 0 additions & 1 deletion libUseful-5/base32.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ for (ptr=Tempstr; ptr < Tempstr+StrLen(Tempstr); ptr+=8)
}

val=p_Out - Out;
if (val > 0) val=val-1;

Destroy(Tempstr);

Expand Down
26 changes: 13 additions & 13 deletions otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ void OTPParse(HashratCtx *Ctx, const char *Input)

Ctx->Action=ACT_OTP;

if (strncmp(Input, "otpauth:", 8)==0)
{
ParseURL(Input, &Proto, &Host, NULL, NULL, NULL, &Path, &Args);

ptr=GetNameValuePair(Args, "&", "=", &Name, &Value);
while (ptr)
if (strncmp(Input, "otpauth:", 8)==0)
{
if (strcasecmp(Name, "algorithm")==0) SetVar(Ctx->Vars, "HashType", Value);
if (strcasecmp(Name, "secret")==0) SetVar(Ctx->Vars, "EncryptionKey", Value);
if (strcasecmp(Name, "digits")==0) SetVar(Ctx->Vars, "OTP:Digits", Value);
if (strcasecmp(Name, "period")==0) SetVar(Ctx->Vars, "OTP:Period", Value);
ptr=GetNameValuePair(ptr, "&", "=", &Name, &Value);
ParseURL(Input, &Proto, &Host, NULL, NULL, NULL, &Path, &Args);

ptr=GetNameValuePair(Args, "&", "=", &Name, &Value);
while (ptr)
{
if (strcasecmp(Name, "algorithm")==0) SetVar(Ctx->Vars, "HashType", Value);
if (strcasecmp(Name, "secret")==0) SetVar(Ctx->Vars, "EncryptionKey", Value);
if (strcasecmp(Name, "digits")==0) SetVar(Ctx->Vars, "OTP:Digits", Value);
if (strcasecmp(Name, "period")==0) SetVar(Ctx->Vars, "OTP:Period", Value);
ptr=GetNameValuePair(ptr, "&", "=", &Name, &Value);
}
}
}
else SetVar(Ctx->Vars, "EncryptionKey", Input);
else SetVar(Ctx->Vars, "EncryptionKey", Input);

Destroy(Proto);
Destroy(Host);
Expand Down
2 changes: 1 addition & 1 deletion output.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void OutputQRCode(HashratCtx *Ctx, const char *Text)
STREAM *S;


waitpid(-1, NULL, WNOHANG);
waitpid(-1, NULL, WNOHANG);
if (fork() ==0)
{
PNGPath=FormatStr(PNGPath, "/tmp/%d.png", getpid());
Expand Down

0 comments on commit 360ab86

Please sign in to comment.