Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools, re
- #import vigenereCipher, pyperclip,freqAnalysis,deectEnglish
- alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- silentmode=False
- nummostusedletters=5
- maxkeylength=5
- def removeSpaces(message):
- newMessage = ""
- for letter in message:
- if letter == ' ':
- pass
- else:
- newMessage += letter
- return newMessage
- def main():
- cipher="PVVWA MKAZS TDUDK UJURB KZPMH DYMXS KUYQZ"
- cipher += "BDSIU OHPA HVDIW EQPVV WAMNA"
- cipher+="NRKTE BXECY LXZUV FWPZF YCDBH WTMPS UTKKV HAFZR"
- cipher+="PVVWA MNANR ZEHCE SAFKT WBKTA AVEOO XQEHJ QHTWA"
- cipher+="NHYQJ HYQPS TTJWH GARVE YFZNA RZZPV ZEYVR BPSIN"
- cipher+="NSRWO RFIJP LFDCN OKICP PKFOK FIQOD FZZSE FOFVY"
- cipher+="ZKVXH CEQSO PFKRF UPAZS DHSQP CRSNS VFDOK FDSBQ"
- cipher+="UKFDZ WJFDS VZPWI QPSOF KTKTA RVOHO IMPWF ZKTZZ W"
- cipher = removeSpaces(cipher)
- print(cipher)
- searchStr = "KU"
- loc = cipher.find(searchStr)
- while loc>0:
- print(loc)
- loc = cipher.find(searchStr, loc+1)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement