def post_photoOnly(): console.set_windowTitle('FBUP/UPLOAD PHOTO') Banner() token.find_token('token/') token_selected = raw_input(con.Proc('select your token : ')) image = raw_input(con.Proc('enter image file : ')) fbup.post_photoNoCaption(image, token.get_token(token_selected))
def post_photoWithCaption(): console.set_windowTitle('FBUP/UPLOAD PHOTO WITH CAPTION') Banner() token.find_token('token/') token_selected = raw_input(con.Proc('select your token : ')) image = raw_input(con.Proc('enter image file : ')) caption = raw_input(con.Proc('enter caption : ')) fbup.post_photoWithCaption(image, caption, token.get_token(token_selected))
def post_textOnly(): console.set_windowTitle('FBUP/STATUS') Banner() token.find_token('token/') token_selected = raw_input(con.Proc('select your token : ')) message = raw_input(con.Proc('enter message : ')) fbup.post_toWall(message, token.get_token(token_selected))
def menu_mode(): console.set_windowTitle('FBUP') print '\n\t' + con.Num(str(1), 'post status text only') print '\t' + con.Num(str(2), 'post photo without caption') print '\t' + con.Num(str(3), 'post photo with caption\n') select_menu = raw_input(con.Proc('select menu : ')) if not select_menu: print con.Err('no menu selected !\n') sys.exit(1) else: try: if int(select_menu) == 1: post_textOnly() elif int(select_menu) == 2: post_photoOnly() elif int(select_menu) == 3: post_photoWithCaption() else: print con.Err('you must select 1-3 !\n') sys.exit(1) except Exception, e: print con.Err(str(e)) print con.Err('failed !\n') sys.exit(1)
def __init__(self, title): self.title = title console.set_windowTitle(self.title)
#! /usr/bin/env python # # selasa 26 juni 2018 by Hendriyawan # copyrights 2018 gdev # python 2.7.12 from core import RSA from core import console import sys console.set_windowTitle('RSA-Encryption') console.Banner() cons = console.pyConsole() rsa = RSA.RSAEncryption() def main(): # generate keypair # pasangan kunci public dan private # kunci public : (e, n) # kunci private : (d, n) print(cons.Proc('generate keypair...')) public_key, private_key = rsa.gen_key() print(cons.Proc('e : public key : %s' % str(public_key))) print(cons.Proc('d : private key : %s' % str(private_key))) message = raw_input(cons.Proc('Enter your message : ')) if len(message) == 0: print(cons.Err('please enter your message ! \n')) sys.exit(1)