Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vk
- import tkinter
- import time
- from tkinter import *
- import webbrowser
- x=("")
- mail =('')
- pas =("")
- start1=True
- start2=0
- countt=()
- ownerr=()
- msgg=()
- ttme=()
- sc=()
- so=""
- sm=""
- st=str(1)
- ll = open('lastlogin.txt','r')
- lp=open('lastpas.txt','r')
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope="photos,audio,video,docs,notes,pages,status,offers,questions,wall,groups,messages,email,notifications,stats,ads,offline,docs,pages,stats,notifications")
- def sstart():
- mail=open("lastlogin.txt","r")
- pas=open("lastpas.txt","r")
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope=8192)
- api = vk.API(session)
- global st
- global ttime
- global so
- global ownerr
- global sm
- global msgg
- global sc
- global countt
- global start1
- global start2
- st=ttime.get()
- so=ownerr.get()
- sc=countt.get()
- sm=msgg.get()
- while start1==True:
- api.wall.post(owner_id="-"+so,message=sm)
- time.sleep(2)
- def spam():
- w = Label(root, text="количество сообщений")
- global countt
- global sc
- countt=Entry(root,width=20)
- w2 = Label(root, text="ID сообщества")
- w2.pack()
- global ownerr
- global so
- ownerr=Entry(root,width=20)
- ownerr.pack()
- w1 = Label(root, text="Сообщение")
- w1.pack()
- global msgg
- global sm
- msgg=Entry(root,width=20)
- msgg.pack()
- w = Label(root, text="интервал в секундах")
- global ttime
- global st
- ttime=Entry(root,width=3)
- startt=Button(root,text=u"Старт",command=sstart)
- startt.pack()
- def quitg():
- mail=open("lastlogin.txt","r")
- pas=open("lastpas.txt","r")
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope=262144)
- api = vk.API(session)
- qg=open("groups.txt","w")
- gg=api.groups.get(user_id=0)
- my_data_string = "".join(["api.groups.leave(group_id=%s)\n" % group_id for group_id in gg])
- qg.write(my_data_string)
- qg.close()
- commands = open("groups.txt").readlines()
- for command in commands:
- exec(command)
- def delreq():
- mail=open("lastlogin.txt","r")
- pas=open("lastpas.txt","r")
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope=2)
- api = vk.API(session)
- api.friends.deleteAllRequests()
- def getfr():
- mail=open("lastlogin.txt","r")
- pas=open("lastpas.txt","r")
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope=2)
- api = vk.API(session)
- gfa=api.friends.get(user_id=0)
- gf=open("friends.txt","w")
- my_data_string = "".join(["api.friends.delete(user_id=%s)\n" % user_id for user_id in gfa])
- gf.write(my_data_string)
- gf.close()
- commands = open("friends.txt").readlines()
- for command in commands:
- exec(command)
- def button_clicked():
- mail=text1.get()
- pas=text2.get()
- session = vk.AuthSession(app_id='5984408',user_login=mail, user_password=pas,scope="photos,audio,video,docs,notes,pages,status,offers,questions,wall,groups,messages,email,notifications,stats,ads,offline,docs,pages,stats,notifications")
- api = vk.API(session)
- ll = open('lastlogin.txt','w')
- lp=open('lastpas.txt','w')
- ll.write(mail)
- lp.write(pas)
- ll.close()
- lp.close()
- t=api.users.get(user_id=0)
- text1.destroy()
- text2.destroy()
- button1.destroy()
- buttondelreq = Button(root,text=u"Оставить все заявки в подписчиках",command=delreq)
- buttondelreq.pack()
- buttongetfr= Button(root,text=u"Удалить друзей",command=getfr)
- buttongetfr.pack()
- buttonqg= Button(root,text=u"Выйти из всех групп",command=quitg)
- buttonqg.pack()
- global buttonspam
- buttonspam= Button(root,text=u"Спам по группам",command=spam)
- buttonspam.pack()
- print(t['uid'])
- if '[{' in t:
- print("true")
- else:
- label['text']=t
- l1 = ll.read()
- l2 = lp.read()
- root=Tk()
- root.title(u"vk bot")
- root.geometry('250x300+300+200')
- label = Label(root, text="Вход не выполнен")
- label.pack()
- text1=Entry(root,width=20)
- text1.insert(0,l1)
- text1.pack()
- text2=Entry(root,width=20 ,show='*')
- text2.insert(0,l2)
- text2.pack()
- button1 = Button(root, text=u"Вход", command=button_clicked)
- button1.pack()
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement