@Ex094 I have found a bug with your morse code.
in the morse.py you're doing
Code:
for item in text.upper():
As a result of which during encryption no bugs are found but during decryption when it will be decrypted then we will get only capitalized letter and as result the next cipher gives wrong results as it depends on some small case letters as well. I hope you understand.
There is an easy solution for this :-
Instead of the below :-
Code:
morse_alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
Do this :-
Code:
morse_alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
and then copy the morse equivalents to the list like below :-
(Please check the list properly I might have done mistake while copying the values)
Code:
morse_encode = ['.-', '-...', '-.-.', '-.', '.', '..-.', '--.', '....', '..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', '--.-', '.-.','...' ,'-' ,'..-' ,'...-' ,'.--' ,'-..-' ,'-.--' ,'--..','.-', '-...', '-.-.', '-.', '.', '..-.', '--.', '....', '..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', '--.-', '.-.','...' ,'-' ,'..-' ,'...-' ,'.--' ,'-..-' ,'-.--' ,'--..' ,'-----' ,'.----','..---','...--','....-','.....','-....','--...','---..','----.']
Then again do this :-
But even fixing this won't solve the problem since when we do the following :-
Code:
megan35 zong22 hex atbash morse base64
the encryption is fine but during decryption we get the error as during decryption we have to reverse the encryption scheme and hence after base64, morse converts the letters to UPPERCASE and thereby atbash maps the uppercase chars with other characters and hence we get stuck at "hex" since the characters might not be in hex form.
I have done several hardcore testing and have found bugs. I am sure that this is the cause.
More updates :-
Many encryption might result in generation of special characters and in your morse you have not given support for special characters and hence again we might get stuck at some points for different encryption schemes.
I have added support for special characters in all of my submissions, I would kindly ask you to please update your submissions with the support for special characters else the decryption process might becomes erroneous for certain enryption schemes, I have already fixed a few.
From here :-
http://morsecode.scphillips.com/morse.html
you can get the morse codes for some sp chars. and if for some you don't find then make up something by your own :epic:
This is a log (Notice carefully):-
Code:
psychocoder@asymptask:~/MultiEncoder-master$ python multiencoder.py
.88b d88. db db db d888888b d888888b d88888b d8b db .o88b. .d88b. d8888b. d88888b d8888b.
88'YbdP`88 88 88 88 `~~88~~' `88' 88' 888o 88 d8P Y8 .8P Y8. 88 `8D 88' 88 `8D
88 88 88 88 88 88 88 88 88ooooo 88V8o 88 8P 88 88 88 88 88ooooo 88oobY'
88 88 88 88 88 88 88 88 88~~~~~ 88 V8o88 8b 88 88 88 88 88~~~~~ 88`8b
88 88 88 88b d88 88booo. 88 .88. 88. 88 V888 Y8b d8 `8b d8' 88 .8D 88. 88 `88.
YP YP YP ~Y8888P' Y88888P YP Y888888P Y88888P VP V8P `Y88P' `Y88P' Y8888D' Y88888P 88 YD
Version 0.2 at Hackcommunity.com
Authors: Ex094, noize, Psycho_Coder, Deque
Available encodings: atom128 zong22 atbash (-i) binary leet (-i) reverse morse base64 hex hazz15 psychosubcipher rot13 megan35
Available encryptions: gronsfeld (-i) shiftcipher xor vigenere (-i)
Encodings/encryptions (type "-i name" to get a description): megan35 zong22 hex atbash morse base64
Encode (e) or decode (d)? e
Text: hello
> megan35: MIH3+IwC
> zong22: dxN0XeJwPrX2
> hex: 64784e3058654a7750725832
> atbash: egdcg6hkfcefg~ddfkdifchi
> morse: . --. -. -.-. --. -.... .... -.- ..-. -.-. . ..-. --. ----. -. -. ..-. -.- -. .. ..-. -.-. .... ..
> base64: LiAtLS4gLS4gLS4tLiAtLS4gLS4uLi4gLi4uLiAtLi0gLi4tLiAtLi0uIC4gLi4tLiAtLS4gLS0tLS4gLS4gLS4gLi4tLiAtLi0gLS4gLi4gLi4tLiAtLi0uIC4uLi4gLi4g
Result: LiAtLS4gLS4gLS4tLiAtLS4gLS4uLi4gLi4uLiAtLi0gLi4tLiAtLi0uIC4gLi4tLiAtLS4gLS0tLS4gLS4gLS4gLi4tLiAtLi0gLS4gLi4gLi4tLiAtLi0uIC4uLi4gLi4g
psychocoder@asymptask:~/MultiEncoder-master$ python multiencoder.py
.88b d88. db db db d888888b d888888b d88888b d8b db .o88b. .d88b. d8888b. d88888b d8888b.
88'YbdP`88 88 88 88 `~~88~~' `88' 88' 888o 88 d8P Y8 .8P Y8. 88 `8D 88' 88 `8D
88 88 88 88 88 88 88 88 88ooooo 88V8o 88 8P 88 88 88 88 88ooooo 88oobY'
88 88 88 88 88 88 88 88 88~~~~~ 88 V8o88 8b 88 88 88 88 88~~~~~ 88`8b
88 88 88 88b d88 88booo. 88 .88. 88. 88 V888 Y8b d8 `8b d8' 88 .8D 88. 88 `88.
YP YP YP ~Y8888P' Y88888P YP Y888888P Y88888P VP V8P `Y88P' `Y88P' Y8888D' Y88888P 88 YD
Version 0.2 at Hackcommunity.com
Authors: Ex094, noize, Psycho_Coder, Deque
Available encodings: atom128 zong22 atbash (-i) binary leet (-i) reverse morse base64 hex hazz15 psychosubcipher rot13 megan35
Available encryptions: gronsfeld (-i) shiftcipher xor vigenere (-i)
Encodings/encryptions (type "-i name" to get a description): base64 morse atbash hex zong22 megan35
Encode (e) or decode (d)? d
Text: LiAtLS4gLS4gLS4tLiAtLS4gLS4uLi4gLi4uLiAtLi0gLi4tLiAtLi0uIC4gLi4tLiAtLS4gLS0tLS4gLS4gLS4gLi4tLiAtLi0gLS4gLi4gLi4tLiAtLi0uIC4uLi4gLi4g
> base64: . --. -. -.-. --. -.... .... -.- ..-. -.-. . ..-. --. ----. -. -. ..-. -.- -. .. ..-. -.-. .... ..
> morse: EGDCG6HKFCEFG9DDFKDIFCHI
> atbash: ;[,.[e=<].;][b,,]<,-].=-
Traceback (most recent call last):
File "multiencoder.py", line 141, in <module>
main()
File "multiencoder.py", line 55, in main
en_de_code(is_decode, text, algorithms)
File "multiencoder.py", line 103, in en_de_code
text = function(text)
File "/home/psychocoder/MultiEncoder-master/hcdev/encodings/hex.py", line 12, in decode
return binascii.unhexlify(ciphertext)
Please try to update these. Give a pull request on github when you're done and me or @Deque will look into it.