From 9d7dc8d2fe148369179f58cd71a3d741aa46b5e8 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 4 Dec 2017 20:07:01 -0600 Subject: [PATCH] Fixes --- Analysis.csharp | 9 ++++++--- CryptoWorkbench.csharp | 1 + Makefile | 3 --- PKGBUILD | 2 +- Simple.csharp | 2 +- regex-lookup.bash | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Analysis.csharp b/Analysis.csharp index 09e0bff..abb3583 100644 --- a/Analysis.csharp +++ b/Analysis.csharp @@ -293,9 +293,12 @@ namespace AniNIX.Crypto { } // Otherwise add the new relation pairing. } else { - relation.Add(workSpace[i],inputText[i]); - encKey.Append(String.Format("{0}={1} ",inputText[i],workSpace[i])); - subKey.Append(String.Format("{0}={1} ",workSpace[i],inputText[i])); + + if ( workSpace[i] != inputText[i] ) { + relation.Add(workSpace[i],inputText[i]); + encKey.Append(String.Format("{0}={1} ",inputText[i],workSpace[i])); + subKey.Append(String.Format("{0}={1} ",workSpace[i],inputText[i])); + } } } } diff --git a/CryptoWorkbench.csharp b/CryptoWorkbench.csharp index 3e6f93e..2b17887 100644 --- a/CryptoWorkbench.csharp +++ b/CryptoWorkbench.csharp @@ -243,6 +243,7 @@ namespace AniNIX.Crypto { Console.Write(ExecuteCommand.Run(String.Format("bash /usr/local/src/CryptoWorkbench/regex-lookup.bash \"{0}\" \"{1}\"",line[1].Replace("\\","\\\\").Replace("$","\\$"),line[2].Replace("\\","\\\\").Replace("$","\\$")))); } else if (line.Length == 2) { Console.Write(ExecuteCommand.Run(String.Format("bash /usr/local/src/CryptoWorkbench/regex-lookup.bash \"{0}\"",line[1].Replace("\\","\\\\").Replace("$","\\$")))); + Console.WriteLine(); } else { Console.Error.WriteLine("Need at least one search term."); } diff --git a/Makefile b/Makefile index 9307e15..93dc018 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,5 @@ INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash -tester: - echo ${pkgbuild}/opt - compile: clean /usr/bin/mcs CryptoWorkbench.csharp if [ ! -d ../SharedLibraries ]; then git -C /usr/local/src clone https://aninix.net/foundation/SharedLibraries; fi git -C /usr/local/src/SharedLibraries pull diff --git a/PKGBUILD b/PKGBUILD index 002dd74..c00654f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=cryptoworkbench pkgver=0.1 pkgrel=1 epoch= -pkgdesc="Simple cryptography utilities." +pkgdesc="AniNIX::CryptoWorkbench \\\\ Simple Cryptography Utility" arch=("x86_64") url="https://aninix.net/foundation/CryptoWorkbench" license=('custom') diff --git a/Simple.csharp b/Simple.csharp index df33959..d06b270 100644 --- a/Simple.csharp +++ b/Simple.csharp @@ -47,7 +47,7 @@ namespace AniNIX.Crypto { /// This is the incoming line and we use it to get the cipher name public override void GetHelp() { Console.WriteLine(String.Format("Help for the {0} cipher suite.\n{1}\n",Command(),Description())); - Console.WriteLine("shiftup -- Make all uppercase\nshiftdown -- make all lowercase\nstripspace -- strip spaces from String\nreverse -- reverse the string\nhelp -- show this helptext."); + Console.WriteLine("shiftup -- Make all uppercase\nshiftdown -- Make all lowercase\nstripspace -- strip spaces from String\nreverse -- reverse the string\nhelp -- show this helptext."); } diff --git a/regex-lookup.bash b/regex-lookup.bash index 573ce8a..5379baa 100644 --- a/regex-lookup.bash +++ b/regex-lookup.bash @@ -9,6 +9,6 @@ if [ "$1" == "" ]; then echo "Usage: $0 [search] [optional filter]" exit 1 fi -export bashstr="$(printf "curl -s --data 'str=%s&fstr=%s&ifun=if&ccg=all&search=Search' http://www.visca.com/regexdict/" "$1" "$2")" +export bashstr="$(printf "curl -s --data 'str=%s&fstr=%s&ifun=if&ccg=all&search=Search' https://visca.com/regexdict/" "$1" "$2")" bash -c "$bashstr" | egrep 'any matches|yourdictionary' | cut -f 2 -d '>' | cut -f 1 -d '<'