def main(): myMessage = 'Cenoonommstmme oo snnio. s s c' myKey = 8 plaintext = decryptMessage(myKey, myMessage) # Print with a | (called "pipe" character) after it in case there # are spaces at the end of the decrypted message. print(plaintext + '|') paperclip.copy(plaintext)
def main(): ciphertext = input('enter the cipher text: ') hackedMessage = hackVigenere(ciphertext) if hackedMessage != None: print('Copying hacked message to clipboard:') print(hackedMessage) paperclip.copy(hackedMessage) else: print('Failed to hack encryption.')
def main(): myMessage = input('enter the cipher text: ') hackedMessage = hackTransposition(myMessage) if hackedMessage == None: print('Failed to hack encryption.') else: print('Copying hacked message to clipboard:') print(hackedMessage) paperclip.copy(hackedMessage)
def main(): myMessage = 'Common sense is not so common.' myKey = 8 ciphertext = encryptMessage(myKey, myMessage) # Print the encrypted string in ciphertext to the screen, with a | # (called a "pipe" character) after it in case there are spaces at # the end of the encrypted message. print(ciphertext + '|') # Copy ciphertext to the clipboard paperclip.copy(ciphertext)
def main(): myMessage = input('enter a message') hackedMessage = hackAffine(myMessage) if hackedMessage != None: print('Copying hacked message to clipboard:') print(hackedMessage) paperclip.copy(hackedMessage) else: print('Failed to hack encryption.')
def main(): myMessage = """"A computer would deserve to be called intelligent if it could deceive a human into believing that it was human." -Alan Turing""" myKey = 2023 myMode = 'encrypt' # set to 'encrypt' or 'decrypt' if myMode == 'encrypt': translated = encryptMessage(myKey, myMessage) elif myMode == 'decrypt': translated = decryptMessage(myKey, myMessage) print('Key: {0:d}'.format(myKey)) print('{0:s}ed text:'.format(myMode.title())) print(translated) paperclip.copy(translated) print('Full {0:s}ed text copied to clipboard.'.format(myMode))
def main(): message = input('enter your message: ') print('Hacking...') letterMapping = hackSimpleSub(message) print('Mapping:') print(letterMapping) print() print('Original ciphertext:') print(message) print() print('Copying hacked message to clipboard:') hackedMessage = decryptWithCipherletterMapping( message, letterMapping) paperclip.copy(hackedMessage) print(hackedMessage)
def main(): myMessage = input('enter your message: ') myKey = int(input('enter the key: ')) if a == 1: myMode = 'encrypt' if a == 2: myMode = 'decrypt' if myMode == 'encrypt': translated = encryptMessage(myKey, myMessage) elif myMode == 'decrypt': translated = decryptMessage(myKey, myMessage) print('Key: %s' % (myKey)) print('%sed text:' % (myMode.title())) print(translated) paperclip.copy(translated) print('Full %sed text copied to clipboard.' % (myMode))
def main(): myMessage = input('enter your message: ') myKey = input('enter the key (for example: ASIMOV): ') if a == 1: myMode = 'encrypt' elif a == 2: myMode = 'decrypt' if myMode == 'encrypt': translated = encryptMessage(myKey, myMessage) elif myMode == 'decrypt': translated = decryptMessage(myKey, myMessage) print('%sed message:' % (myMode.title())) print(translated) paperclip.copy(translated) print() print('The message has been copied to the clipboard.')
def main(): myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri ch nitaalr eiuengiteehb(e1 hilincegeoamn fubehgtarndcstudmd nM eu eacBoltaeteeoinebcdkyremdteghn.aa2r81a condari fmps" tad l t oisn sit u1rnd stara nvhn fsedbh ee,n e necrg6 8nmisv l nc muiftegiitm tutmg cm shSs9fcie ebintcaets h aihda cctrhe ele 1O7 aaoem waoaatdahretnhechaopnooeapece9etfncdbgsoeb uuteitgna.rteoh add e,D7c1Etnpneehtn beete" evecoal lsfmcrl iu1cifgo ai. sl1rchdnheev sh meBd ies e9t)nh,htcnoecplrrh ,ide hmtlme. pheaLem,toeinfgn t e9yce da' eN eMp a ffn Fc1o ge eohg dere.eec s nfap yox hla yon. lnrnsreaBoa t,e eitsw il ulpbdofgBRe bwlmprraio po droB wtinue r Pieno nc ayieeto'lulcih sfnc ownaSserbereiaSm-eaiah, nnrttgcC maciiritvledastinideI nn rms iehn tsigaBmuoetcetias rn""" hackedMessage = hackTransposition(myMessage) if hackedMessage == None: print('Failed to hack encryption.') else: print('Copying hacked message to clipboard:') print(hackedMessage) paperclip.copy(hackedMessage)
def main(): myMessage = input('enter a message: ') myKey = input( 'enter a key (for example: LFWOAYUISVKMNXPBDCRJTQEGHZ): ') if a == 1: myMode = 'encrypt' elif a == 2: myMode = 'decrypt' if not keyIsValid(myKey): sys.exit('There is an error in the key or symbol set.') if myMode == 'encrypt': translated = encryptMessage(myKey, myMessage) elif myMode == 'decrypt': translated = decryptMessage(myKey, myMessage) print('Using key %s' % (myKey)) print('The %sed message is:' % (myMode)) print(translated) paperclip.copy(translated) print() print('This message has been copied to the clipboard.')
def api_terminal(): command = request.form['command'] if command[0:2] == 'cd': #terminal command 'cd' os.chdir(command[3:]) p = os.popen('dir') elif command[0:2] == 'dl': #download from server path = os.path.abspath('.') print(path) #return send_from_directory('../../'+path,command[3:],as_attachment=True) return send_from_directory(path, command[3:], as_attachment=True) p = os.popen('dir') elif command[0:2] == 'up': #open upload page return redirect('/upload') elif command[0:2] == 'pt': #print in server's console print(command[3:]) p = command[3:] + 'was sent to ras clipboard!' + '/n' + os.popen('dir') elif command[0:2] == 'cp': #copy to server's clipboard paperclip.copy(command[3:]) p = command[3:] + 'was copied to ras clipboard!' + 'n' + os.popen( 'dir') elif command[0:2] == 'zp': path = os.path.abspath('.') fatherpath = os.path.abspath('..') folder = path[len(fatherpath) + 1:] os.chdir('..') os.system("zip -r " + folder + ".zip " + folder) print(path) print(fatherpath) os.chdir(folder) return send_from_directory(fatherpath, folder + '.zip', as_attachment=True) else: #terminal commmand p = os.popen(command) echo = p.read() print(echo) return render_template('terminal.html', commands=echo)
# Run the encryption/decryption code on each symbol in the message string for symbol in message: if symbol in letters: # Get the encrypted (or decrypted) number for this symbol num = letters.find(symbol) # Get the number of the symbol if mode == 'encrypt': num += key elif mode == 'decrypt': num -= key # Handle the wrap-around if num is larger than the length of # letters or less than 0 if num >= len(letters): num -= len(letters) elif num < 0: num += len(letters) # Add encrypted/decrypted number's symbol at the end of translated translated += letters[num] else: # Just add the symbol without encrypting/decrypting translated += symbol # Print encrypted/decrypted string to the screen print(translated) # Copy the encrypted/decrypted string to the clipboard paperclip.copy(translated)
import paperclip paperclip.copy('Hello World') paperclip.paste()
#! python3 # --TODO secure the passwords import sys import paperclip PASSWORDS = {'email': 'paralyze123', 'facebook': 'paralyze123'} if (len(sys.argv) < 2): print('Usage: python passwordManager [account]') sys.exit() account = sys.argv[1] if (account in PASSWORDS): paperclip.copy(PASSWORDS[account]) print('Password copied to clipboard') else: print('There is no account named ' + account)
def copy_email(cls, number): contact_found = Contact.find_by_number(number) paperclip.copy(contact_found.email)