-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
49 lines (37 loc) · 1.21 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import requests,os,bs4
#from telebot import *
#import telebot#
import random
import os
from telebot import *
auth='6974767086:AAFGuDV-aO17RbP8ytohYcN3z2wZXcNHsMk'
msg=''
def extract_arg(arg):
return arg.split()
# telebot import *
bot = telebot.TeleBot(auth)
# creating a instance
@bot.message_handler(commands=["start"])
def strt(message):
bot.reply_to(message, 'starting bot awakened /help to know usage')
@bot.message_handler(commands = ['help'])
def xk(message):
bot.reply_to(message, ' for sending anonymous message \n usage ::: \n /send country_code num \n ex : /send 91 80790##### \n in this way')
@bot.message_handler(commands = ['send'])
def sn(message):
global country
global num
a=extract_arg(message.text)
num=int(a[2])
country=int(a[1].strip('+'))
bot.reply_to(message,'now send message \n example : /msg hi hlw welcome thank you , love you ...')
@bot.message_handler(commands = ['msg'])
def m(message):
os.system('echo "" > zx.txt')
bot.reply_to(message,f'sending to {country} {num}')
msg=extract_arg(message.text)[1::]
os.system(f'python3 anon_sms.py {country} {num} {msg}')
time.sleep(3)
o=open('zx.txt','r')
bot.reply_to(message,str(o.read()))
bot.infinity_polling()