release 1.10

This commit is contained in:
2024-03-17 16:04:06 +01:00
parent be9e204576
commit 3c40cfb341
14 changed files with 254 additions and 33 deletions

View File

@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="Python 3.10 (Mysteryhelfer_git)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

2
.idea/misc.xml generated
View File

@@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.10 (Mysteryhelfer_pyCharm)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (Mysteryhelfer_pyCharm)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (Mysteryhelfer_git)" project-jdk-type="Python SDK" />
</project>

View File

@@ -0,0 +1,98 @@
#! /usr/bin/python
from tkinter import *
hp=Tk()
button= [
Button(hp, text='X_crusor', cursor='X_cursor'),
Button(hp, text='arrow', cursor='arrow'),
Button(hp, text='based_arrow_down', cursor='based_arrow_down'),
Button(hp, text='based_arrow_up', cursor='based_arrow_up'),
Button(hp, text='boat', cursor='boat'),
Button(hp, text='bogosity', cursor='bogosity'),
Button(hp, text='bottom_left_corner', cursor='bottom_left_corner'),
Button(hp, text='bottom_right_corner', cursor='bottom_right_corner'),
Button(hp, text='bottom_side', cursor='bottom_side'),
Button(hp, text='bottom_tee', cursor='bottom_tee'),
Button(hp, text='box_spiral', cursor='box_spiral'),
Button(hp, text='center_ptr', cursor='center_ptr'),
Button(hp, text='circle', cursor='circle'),
Button(hp, text='clock', cursor='clock'),
Button(hp, text='coffee_mug', cursor='coffee_mug'),
Button(hp, text='cross', cursor='cross'),
Button(hp, text='cross_reverse', cursor='cross_reverse'),
Button(hp, text='crosshair', cursor='crosshair'),
Button(hp, text='diamond_cross', cursor='diamond_cross'),
Button(hp, text='dot', cursor='dot'),
Button(hp, text='dotbox', cursor='dotbox'),
Button(hp, text='double_arrow', cursor='double_arrow'),
Button(hp, text='draft_larg', cursor='draft_large'),
Button(hp, text='draft_small', cursor='draft_small'),
Button(hp, text='draped_box', cursor='draped_box'),
Button(hp, text='exchange', cursor='exchange'),
Button(hp, text='fleur', cursor='fleur'),
Button(hp, text='gobbler', cursor='gobbler'),
Button(hp, text='gumby', cursor='gumby'),
Button(hp, text='hand1', cursor='hand1'),
Button(hp, text='hand2', cursor='hand2'),
Button(hp, text='heart', cursor='heart'),
Button(hp, text='icon', cursor='icon'),
Button(hp, text='iron_corss', cursor='iron_cross'),
Button(hp, text='left_ptr', cursor='left_ptr'),
Button(hp, text='left_side', cursor='left_side'),
Button(hp, text='left_tee', cursor='left_tee'),
Button(hp, text='leftbutton', cursor='leftbutton'),
Button(hp, text='ll_angle', cursor='ll_angle'),
Button(hp, text='lr_angle', cursor='lr_angle'),
Button(hp, text='man', cursor='man'),
Button(hp, text='middlebutton', cursor='middlebutton'),
Button(hp, text='mouse', cursor='mouse'),
Button(hp, text='none', cursor='none'),
Button(hp, text='pencil', cursor='pencil'),
Button(hp, text='pirate', cursor='pirate'),
Button(hp, text='plus', cursor='plus'),
Button(hp, text='question_arrow', cursor='question_arrow'),
Button(hp, text='right_prt', cursor='right_ptr'),
Button(hp, text='right_side', cursor='right_side'),
Button(hp, text='right_tee', cursor='right_tee'),
Button(hp, text='rightbutton', cursor='rightbutton'),
Button(hp, text='rtl_logo', cursor='rtl_logo'),
Button(hp, text='sailboat', cursor='sailboat'),
Button(hp, text='sb_down_arrow', cursor='sb_down_arrow'),
Button(hp, text='sb_v_double_arrow', cursor='sb_v_double_arrow'),
Button(hp, text='sb_h_double_arrow', cursor='sb_h_double_arrow'),
Button(hp, text='sb_left_arrow', cursor='sb_left_arrow'),
Button(hp, text='sb_right_arrow', cursor='sb_right_arrow'),
Button(hp, text='sb_up_arrow', cursor='sb_up_arrow'),
Button(hp, text='shuttle', cursor='shuttle'),
Button(hp, text='sizing', cursor='sizing'),
Button(hp, text='sb_up_arrow', cursor='sb_up_arrow'),
Button(hp, text='spider', cursor='spider'),
Button(hp, text='spraycan', cursor='spraycan'),
Button(hp, text='star', cursor='star'),
Button(hp, text='target', cursor='target'),
Button(hp, text='tcross', cursor='tcross'),
Button(hp, text='top_left_arrow', cursor='top_left_arrow'),
Button(hp, text='top_left_corner', cursor='top_left_corner'),
Button(hp, text='top_right_corner', cursor='top_right_corner'),
Button(hp, text='top_side', cursor='top_side'),
Button(hp, text='top_tee', cursor='top_tee'),
Button(hp, text='trek', cursor='trek'),
Button(hp, text='ul_angle', cursor='ul_angle'),
Button(hp, text='umbrella', cursor='umbrella'),
Button(hp, text='ur_angle', cursor='ur_angle'),
Button(hp, text='watch', cursor='watch'),
Button(hp, text='xterm', cursor='xterm'),
]
ro =1
co =0
for x in button:
x.grid(row=ro, column=co,
padx=2, pady=2,
ipady=10, ipadx=10,sticky=EW)
co +=1
if co % 5==0:
co =0
ro +=1
hp.mainloop()

View File

@@ -16,17 +16,17 @@ def array_ausgabe(arri: list):
def encrypt(plain_text: str, rails: int):
arr = [["_" for x in range(len(plain_text))] for y in range(rails)]
arr = [["_" for _ in range(len(plain_text))] for _ in range(rails)]
r = 0
z = 0
plus = True
for b in plain_text:
arr[r][z] = b
z += 1
if r+1 == rails and plus:
if r + 1 == rails and plus:
plus = False
r -= 1
elif r-1 < 0 and not plus:
elif r - 1 < 0 and not plus:
plus = True
r += 1
elif plus:
@@ -40,15 +40,44 @@ def encrypt(plain_text: str, rails: int):
out += arr[i][j]
print(out)
array_ausgabe(arr)
print()
def decrypt(cipher: str, rails: int):
arr = [["" for x in range(len(cipher))] for y in range(rails)]
for r in range(rails):
#arr[r][z] = b
pass
arr = [["_" for _ in range(len(cipher))] for _ in range(rails)]
# cipher ins array reinbasteln
x, y = 0, 0
first_x = True
for b in cipher:
if x >= len(cipher) and y < rails:
y += 1
x = y
first_x = True
arr[y][x] = b
if y == 0 or (first_x and y != rails-1):
x = x + (rails - y - 1) * 2
first_x = False
elif y == rails-1 or first_x is False:
x = x + (y * 2)
first_x = True
array_ausgabe(arr)
# dekodierten Text aus array holen
out = ""
x, y = 0, 0
down = True
for i in range(len(cipher)):
out += arr[y][x]
x += 1
if down and y+1 == rails:
down = False
y -= 1
elif down:
y += 1
elif down is False and y == 0:
down = True
y += 1
elif down is False:
y -= 1
print(out)
encrypt(t1r2, 2)

1
HTML/version.txt Normal file
View File

@@ -0,0 +1 @@
Version: 1.10 (17. März 2024)

Binary file not shown.

View File

@@ -14,7 +14,7 @@ import webbrowser # für website in Infofenster
import binascii # für base64_ascii
#######################################
versionsnummer = "Version: 1.01 (21. Juni 2023)"
versionsnummer = "Version: 1.10 (17. März 2024)"
website = "http://mysteryhelfer.tba-tm.bplaced.net"
#######################################
@@ -4319,10 +4319,10 @@ def rail_encrypt(plain_text: str, rails: int):
for b in plain_text:
arr[r][z] = b
z += 1
if r+1 == rails and plus:
if r + 1 == rails and plus:
plus = False
r -= 1
elif r-1 < 0 and not plus:
elif r - 1 < 0 and not plus:
plus = True
r += 1
elif plus:
@@ -4344,8 +4344,17 @@ def jaegerzaun_encrypt():
pw = pw.strip()
if eingabetext == "":
Ausgabe.insert(1.0, """HILFE: [encrypt Jägerzaun]
Jägerzaun (auch Railfence oder ZigZag-Chiffre genannt)
Jägerzaun (auch Railfence oder ZigZag-Chiffre genannt)
Bei dieser Chiffre wird kodiert, indem man einen Text im Zickzackmuster
in ein Feld aus z.B. 3 Zeilen und so vielen Spalten wie der Text lang ist
schreibt. Man beginnt in Spalte 1 - Zeile 1, dann geht es in Spalte 2 - Zeile 1
weiter danach Spalte 3 - Zeile 3, dann Spalte 4 - Zeile 2, Spalte 5 - Zeile 1 usw.
Danach werden die Buchstaben einfach Zeile für Zeile hintereinander geschrieben.
Unterschiedliche Varianten entstehen einfach dadurch, dass man mit unterschiedlich
vielen Zeilen arbeitet welche im Schlüsselfeld anzugeben ist.
Die Funktion erzeugt hierbei einmal eine Ausgabe bei welcher auch Leerzeichen
mitgeschrieben werden und eine Ausgabe wo zuvor die Leerzeichen entfernt werden.
""" + "\n\n")
elif pw == "" or not pw.isdigit():
Ausgabe.insert(1.0, "Bitte eine Zahl im Schlüsselfeld eingeben!!\n", "re")
@@ -4361,6 +4370,86 @@ def jaegerzaun_encrypt():
Ausgabe.insert(1.0, "Schlüsselzahl fehlerhaft oder kleiner als 2.\n", "re")
def rail_decrypt(cipher: str, rails: int):
arr = [["_" for _ in range(len(cipher))] for _ in range(rails)]
# cipher ins array reinbasteln
x, y = 0, 0
first_x = True
for b in cipher:
if x >= len(cipher) and y < rails:
y += 1
x = y
first_x = True
arr[y][x] = b
if y == 0 or (first_x and y != rails - 1):
x = x + (rails - y - 1) * 2
first_x = False
elif y == rails - 1 or first_x is False:
x = x + (y * 2)
first_x = True
# dekodierten Text aus array holen
out = ""
x, y = 0, 0
down = True
for i in range(len(cipher)):
out += arr[y][x]
x += 1
if down and y + 1 == rails:
down = False
y -= 1
elif down:
y += 1
elif down is False and y == 0:
down = True
y += 1
elif down is False:
y -= 1
return out
def jaegerzaun_decrypt():
trennlinie()
eingabetext = Eingabe.get(1.0, END)
eingabetext = eingabetext.strip().replace("\n", " ")
pw = PW_Eingabe.get()
pw = pw.strip()
if eingabetext == "":
Ausgabe.insert(1.0, """HILFE: [decrypt Jägerzaun]
Jägerzaun (auch Railfence oder ZigZag-Chiffre genannt)
Bei dieser Chiffre wird kodiert, indem man einen Text im Zickzackmuster
in ein Feld aus z.B. 3 Zeilen und so vielen Spalten wie der Text lang ist
schreibt. Man beginnt in Spalte 1 - Zeile 1, dann geht es in Spalte 2 - Zeile 1
weiter danach Spalte 3 - Zeile 3, dann Spalte 4 - Zeile 2, Spalte 5 - Zeile 1 usw.
Danach werden die Buchstaben einfach Zeile für Zeile hintereinander geschrieben.
Unterschiedliche Varianten entstehen einfach dadurch, dass man mit unterschiedlich
vielen Zeilen arbeitet welche im Schlüsselfeld angegeben werden kann.
Die Funktion erzeugt hierbei einmal eine Ausgabe bei welcher auch Leerzeichen
mitgeschrieben werden und eine Ausgabe wo zuvor die Leerzeichen entfernt werden.
Wird im Schlüsselfeld keine Zahl angegeben erfolgt automatisch die Dekodierung
für alle Zeilenanzahlen von 2-12.""" + "\n\n")
elif pw == "":
for i in range(12, 1, -1):
Ausgabe.insert(1.0, f'{i:02} - {rail_decrypt(eingabetext.replace(" ", ""), i)}\n')
Ausgabe.insert(1.0, "ohne Leerzeichen\n", "bu")
for i in range(12, 1, -1):
Ausgabe.insert(1.0, f'{i:02} - {rail_decrypt(eingabetext, i)}\n')
Ausgabe.insert(1.0, "inkl. Leerzeichen\n", "bu")
elif not pw.isdigit():
Ausgabe.insert(1.0, "Bitte eine Zahl im Schlüsselfeld eingeben!!\n", "re")
else:
try:
if int(pw) < 2:
raise ValueError("Zahl zu klein")
Ausgabe.insert(1.0, rail_decrypt(eingabetext.replace(" ", ""), int(pw)) + "\n")
Ausgabe.insert(1.0, "ohne Leerzeichen\n", "bu")
Ausgabe.insert(1.0, rail_decrypt(eingabetext, int(pw)) + "\n")
Ausgabe.insert(1.0, "inkl. Leerzeichen\n", "bu")
except ValueError:
Ausgabe.insert(1.0, "Schlüsselzahl fehlerhaft oder kleiner als 2.\n", "re")
# ------------------------------------------------------------------------------------------
def knoeppe_aendern2():
B44.config(text="Button88", command="", bg=bgcolor_default, cursor="")
@@ -4410,7 +4499,8 @@ def knoeppe_aendern1():
B55.config(text="Base64<->ASCII", command=base64_ascii, bg="#7777ff", cursor='question_arrow', font=schrift)
B56.config(text="Jägerzaun kodieren", command=jaegerzaun_encrypt, bg="#3388aa", cursor='question_arrow',
font=schrift)
B57.config(text="Button79", command="", bg=bgcolor_default, cursor="")
B57.config(text="Jägerzaun dekodieren", command=jaegerzaun_decrypt, bg="#3388aa", cursor='question_arrow',
font=schrift)
B58.config(text="Button80", command="", bg=bgcolor_default, cursor="")
B59.config(text="Button81", command="", bg=bgcolor_default, cursor="")
B60.config(text="Button82", command="", bg=bgcolor_default, cursor="")

View File

@@ -1,14 +1,18 @@
1.10
rework: diverse Codeüberarbeitungen
neu: Jägerzaun (Railfence) - Chiffre
1.01
neu: Scrollleiste f<EFBFBD>r Eingabe und Ausgabe erg<EFBFBD>nzt
neu: Scrollleiste für Eingabe und Ausgabe ergänzt
bugfix: Zahlwortsuch zwanzig, hundert, tausend wird jetzt auch gefunden
fix: ein paar kleine Sachen im Code optimiert/verbessert
1.00
release: es wird noch einfacher das Ding zum laufen zu bringen
release: es wird noch einfacher das Ding zum Laufen zu bringen
new: Update-Check eingebaut
update: ein paar kleine Schönheitsreparaturen am Quelltext
update: Webseite aktualisiert,
update: öffentliche .exe-Version für Windowsbenutzer
update: Öffentliche .exe-Version für Windowsbenutzer
0.97
neu: manuelle Config ist doof, deshalb klicki-klicki-konfig-editor gebastelt
@@ -38,7 +42,7 @@ neu: T9-EN, T9-DE
update: Maptilesfunktion testet nun bis Zoomstufe 30 statt vorher 25
neu: Funktion zum Umwandeln von Quadtreekoordinaten
0.90a Keine Programmänderung sondern nur eine UTF-8-kodierte Variante für die Benutzung unter Pydroid ergänzt.
0.90a Keine Programmänderung sondern nur eine UTF-8-kodierte Variante für die Benutzung unter Pydroid ergänzt.
0.90
update: Ab jetzt alles mit Schriftart "Times New Roman" und Schriftgröße 10, was Abhilfe schaffen sollte bei
@@ -51,7 +55,7 @@ bugfix: Funktionsknöpfe für Kennyspeak waren zwischenzeitlich verlorengegangen
0.88
update: Primfaktorsuche eingeschränkt um extrem lange Suchläufe zu verhindern.
Es erfolgt ein Abbruch, wenn ein Faktor größer als 100 Millionen ist.
Es erfolgt ein Abbruch, wenn ein Faktor größer als 100 Millionen ist.
0.87
update: noch einmal die Anordnung für ein paar Funktionsknöpfe geändert und Funktionen, welche
@@ -89,7 +93,7 @@ neu: Maptiles/Kachelkoord.
0.76
bugfix: in die Primzahlprüffunktion hatte sich ein Fehler eingeschlichen wodurch 289 als Primzahl erkannt
wurde und für alle größeren Primzahlen eine falsche Position ermittelt wurde
wurde und für alle grüßeren Primzahlen eine falsche Position ermittelt wurde
0.75
neu: Polybios, Klopfcode
@@ -115,7 +119,7 @@ update: -Re-Morse braucht jetzt nur noch die normalen Wörterbuchdateien von
https://sourceforge.net/projects/wordlist (englisch) wie sie auch von der Anagrammsuche
genutzt werden.
Da die deutsche Version allerdings dadurch extrem an Geschwindigkeit verliert ist eine
Funktion integriert, über die sich das Spezial-Wörterbuch aus dem normalen generieren läßt,
Funktion integriert, über die sich das Spezial-Wörterbuch aus dem normalen generieren läßt,
mit welchem die Suche dann wieder deutlich schneller geht.
(In Eingabefeld GENERATE eingeben und dann auf Knopf [Re-Morse-DE] allerdings wird die
Generierung dann auch nur durchgeführt wenn die Datei morse-de.dic im Verzeichnis data fehlt)

View File

@@ -7,7 +7,7 @@
},
{
"optionDest": "filenames",
"value": "D:/mager/Documents/Python/Mysteryhelfer/Mysteryhelfer.pyw"
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/Mysteryhelfer.pyw"
},
{
"optionDest": "onefile",
@@ -19,7 +19,7 @@
},
{
"optionDest": "icon_file",
"value": "D:/mager/Documents/Python/Mysteryhelfer/mystery-helfer-logo.ico"
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/mystery-helfer-logo.ico"
},
{
"optionDest": "ascii",
@@ -71,19 +71,19 @@
},
{
"optionDest": "datas",
"value": "D:/mager/Documents/Python/Mysteryhelfer/Versionsgeschichte.txt;."
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/Versionsgeschichte.txt;."
},
{
"optionDest": "datas",
"value": "D:/mager/Documents/Python/Mysteryhelfer/Kurzanleitung.txt;."
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/Kurzanleitung.txt;."
},
{
"optionDest": "datas",
"value": "D:/mager/Documents/Python/Mysteryhelfer/Mysteryhelfer.pyw;."
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/Mysteryhelfer.pyw;."
},
{
"optionDest": "datas",
"value": "D:/mager/Documents/Python/Mysteryhelfer/data_f\u00fcr_auto-py-to-exe;data/"
"value": "D:/mager/Documents/Python/Mysteryhelfer_git/data;data/"
}
],
"nonPyinstallerOptions": {

Binary file not shown.

View File

@@ -1 +0,0 @@
Version: 1.01 (21. Juni 2023)