Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #-*-coding:utf-8-*-
- # Auto Reactions Grup By Deray
- # Required Modules
- import requests,json,sys,time
- # Manual Color
- W = '\033[1;37m'
- N = '\033[0m'
- R = '\033[1;37m\033[31m'
- B = '\033[1;37m\033[34m'
- G = '\033[1;32m'
- O = '\033[33m'
- print """
- ___ ___ _____
- | _ )/ _ \_ _|
- | _ \ (_) || | Facebook Auto
- |___/\___/ |_| Reaction Group
- By Deray <3
- """
- class react():
- def __init__(self):
- self.grup=[]
- self.no=[]
- self.ck()
- def ck(self):
- try:
- self.tk=raw_input(R+"[!]"+N+" Your Token List: ")
- self.token=open(self.tk).read().split("\n")[0]
- self.maen()
- except Exception as f:
- print R+"[!] "+N+str(f)
- self.ck()
- def maen(self):
- r=requests.get("https://graph.facebook.com/me/groups?access_token="+self.token).text
- s=json.loads(r)
- for x in s["data"]:
- self.grup.append(x["name"] + " => "+N+G+x["id"]+N)
- print """
- [ SEARCH YOUR GRUOP ]
- """
- self.search()
- def search(self):
- r=raw_input(G+"[*]"+N+" Query: ")
- if r == "":
- print R+"[!]"+N+" Please enter grup query."
- self.search()
- else:
- for x in self.grup:
- if not r in x:
- pass
- else:
- self.no.append(x)
- print R+"[!] "+N+x.replace(r,O+r+N)
- if len(self.no) == 0:
- print R+"[-]"+N+" Not Found:",r
- self.no=[]
- self.search()
- else:
- self.ids=raw_input(B+"\n[*]"+N+" Paste ID HERE: ")
- try:
- self.reaction()
- except:sys.exit(R+"\n[+] "+N+"Byee")
- def reaction(self):
- ap=[]
- self.limit=raw_input(R+"[!] "+N+"Limit Post You Want To Get: ")
- try:
- print "[*] Retrieving "+R+self.limit+N+" Post ID From",G+requests.get('https://graph.facebook.com/'+self.ids+'?access_token='+self.token).json()["name"]
- r=requests.get("https://graph.facebook.com/"+self.ids+"/feed?limit="+self.limit+"&access_token="+self.token).text
- self.js=json.loads(r)
- except Exception as f:
- print R+"\n[ERROR]: "+N+str(f)
- sys.exit(R+"\n[!] "+N+"Unknown ID or Group is Private?:(")
- print """
- {}1{}){} LIKE
- {}2{}){} HAHA
- {}3{}){} SAD
- {}4{}){} ANGRY
- {}5{}){} WOW
- {}6{}){} LOVE
- """.format(B,R,N,B,R,N,B,R,N,B,R,N,B,R,N,B,R,N)
- self.tipe=raw_input("Menu: ").replace("1","LIKE").replace("2","HAHA").replace("3","SAD").replace("4","ANGRY").replace("5","WOW").replace("6","LOVE")
- print R+"[!] "+N+"React Type:",G+self.tipe
- print R+"[!]"+N+" Starting Bot ..."
- for x in self.js["data"]:
- payload = {'access_token' : self.token , 'type' : self.tipe}
- s = requests.post("https://graph.facebook.com/"+x["id"]+"/reactions", data = payload).text
- if "true" in s:
- try:
- print G+"[ID| "+N+x["id"].split('_')[1]+" --> "+x["message"][0:20]+" .."
- except:
- try:
- print G+"|ID| "+N+x["id"].split('_')[1]+" --> "+x["story"][0:20]+" .."
- except:pass
- else:
- try:
- print R+"|ID| "+N+x["id"].split('_')[1]+" => GAGAL"
- except:pass
- print "\n[*] Done."
- react()
Advertisement
Add Comment
Please, Sign In to add comment