このコードがあります。
offset = -0
print ("In Command 3 - Brute force")
string = input("Please enter a string to Brute Force:")
while offset > -26:
offset = offset - 1
print("")
for letter in string:
letter = (ord(letter))
letter = letter + offset
if letter > 126:
letter - 95
elif letter < 32:
letter + 32
output = (chr(letter))
print(output,end='')
choice = 0
このような文字列に応じて出力します。
rc`rcr
qb_qbq
pa^pap
o`]o`o
n_\n_n
m^[m^m
l]Zl]l
k\Yk\k
j[Xj[j
iZWiZi
hYVhYh
gXUgXg
fWTfWf
eVSeVe
dURdUd
cTQcTc
bSPbSb
aROaRa
`QN`Q`
_PM_P_
^OL^O^
]NK]N]
\MJ\M\
[LI[L[
ZKHZKZ
YJGYJY
たとえば、出力の前にテキストが必要です。
Decryption string rc`rcr
Decryption string qb_qbq
等...
私が試してみました;
print("Decryption",output,end='')
と
print("Decryption"+output,end='')
ただし、これにより、すべての文字の前にそのテキストが表示されます。
できれば助けてください。説明も望ましいでしょう。
御時間ありがとうございます。
ベン