Amigos AulaMice Hello! Aqui eu vim trazer um novo projeto para [Sources][fontes] !
Sobre o que é isso?
Bem, este irá atendê-lo para muitas coisas , como qualquer um tocar sua [Source][fonte] e outras coisas !
Bem , a primeira coisa que precisamos fazer é criar um arquivo com nada nele , com o nome TFMSource.py ou que querem chamar , mas precisa terminar em .py
Depois que nós damos -lhe editar esse arquivo com Edit idle.
e adicione o seguinte código:
- Código:
# Embedded file name: C:/Users/KoshTFM/Desktop/Programer/1.239/Admin.py
import sys
import os
import json
import time
from datetime import datetime
from twisted.internet import reactor, protocol
from TFMProtocols import TFMClient
from Tkinter import *
try:
import tkinter as tk
except ImportError:
import Tkinter as tk
failure_max = 3
passwords = [('kosh', 'oficial'), ('gotay', 'oficial'), ('kura', 'oficial')]
def make_entry(parent, caption, width = None, **options):
tk.Label(parent, text=caption).pack(side=tk.TOP)
entry = tk.Entry(parent, **options)
if width:
entry.config(width=width)
entry.pack(side=tk.TOP, padx=10, fill=tk.BOTH)
return entry
def enter(event):
check_password()
def check_password(failures = []):
""" Collect 1's for every failure and quit program in case of failure_max failures """
print (user.get(), password.get())
if (user.get(), password.get()) in passwords:
root.destroy()
print 'Login in'
return
failures.append(1)
if sum(failures) >= failure_max:
root.destroy()
raise SystemExit('Login No autorizado')
else:
root.title('Try again. Attempt %i/%i' % (sum(failures) + 1, failure_max))
root = tk.Tk()
root.geometry('300x160')
root.title('Digite el usuario y contrase\xf1a')
parent = tk.Frame(root, padx=10, pady=10)
parent.pack(fill=tk.BOTH, expand=True)
user = make_entry(parent, 'User:', 16, show='*')
password = make_entry(parent, 'Password:', 16, show='*')
b = tk.Button(parent, borderwidth=4, text='Login', width=10, pady=8, command=check_password)
b.pack(side=tk.BOTTOM)
password.bind('<Return>', enter)
user.focus_set()
parent.mainloop()
dateNow = datetime.now()
def getTime():
global time
return time.time()
import tkMessageBox
from datetime import datetime
def getTime2():
TIME = str(datetime.now())[11:].split(':')
TIME = TIME[0] + ':' + TIME[1] + ':' + TIME[2][:2]
return str(TIME)
print '[' + str(getTime2()) + '] ' + 'Cargando AulaMice server...'
Start = datetime.now()
window = Tk()
window.wm_withdraw()
window.geometry('1x1+' + str(window.winfo_screenwidth() / 2) + '+' + str(window.winfo_screenheight() / 2))
tkMessageBox.showinfo(title='CreandoMice Server', message='Source Creada por Programador: Kosh *-*')
class AuthError(Exception):
pass
if __name__ == '__main__':
iniports = []
if sys.platform.startswith('win'):
os.system('cls')
os.system('color D')
print ' ' * 80
print '********************************************************'.center(79)
print '********************************************************'.center(79)
print '** ** **'.center(79)
print '** Kosh,AulaMice,Programer ** TFMSource [Online] **'.center(79)
print '** ** **'.center(79)
print '********************************************************'.center(79)
print '********************************************************'.center(79)
print '** ** **'.center(79)
print '** Tokens [Online] ** TFMProtocols [Online] **'.center(79)
print '** ** **'.center(79)
print '********************************************************'.center(79)
print '********************************************************'.center(79)
print '** ** **'.center(79)
print '** TFMShop [Online] ** TFMClient [Online] **'.center(79)
print '** ** **'.center(79)
print '********************************************************'.center(79)
print '********************************************************'.center(79)
print '** ** **'.center(79)
print '** TFMModules [Online] ** Tribulle [Online] **'.center(79)
print '** ** **'.center(79)
print '********************************************************'.center(79)
print '********************************************************'.center(79)
print ''
MICESERVER = TFMClient.TransformiceServer()
for port in TFMClient.PORTS:
try:
reactor.listenTCP(port, MICESERVER)
iniports = iniports + [port]
except:
pass
if iniports == []:
os.system('title Falha na leitura das portas!')
reactor.run()
Voce's devem alinhar o code...
Dps fala assim: passwords = [('kosh', 'oficial'), ('gotay', 'oficial'), ('kura', 'oficial')]
Isso ae voce edita por o nome e senha que voce quere em seu source!
Dps projecto ficara assim:
1-
2-
3-
Dps voce da com um Compilador e deixa ela pra que ngm possa editar!
Creditos: Os Programadores - Mais que um rato, Uma legenda!
Creditos: # AulaMice #
Facebook: https://www.facebook.com/KoshTFM