Skip to content

Commit f7a30a7

Browse files
committed
Innitial commit
1 parent 3820791 commit f7a30a7

File tree

5 files changed

+515
-0
lines changed

5 files changed

+515
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,14 @@ target/
6060

6161
#Ipython Notebook
6262
.ipynb_checkpoints
63+
/.idea/
64+
/ListWebTemplate/
65+
/TEMPLATE/
66+
/phantomjs.exe
67+
/loginInfo.py
68+
/ListWebTemplate.wbs
69+
/FacebookBot.py
70+
/writehtml.py
71+
72+
/Test.py
73+
/test.html

BotAI.py

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
from FacebookWebBot import *
2+
import os, json, random, jsonpickle
3+
from Spam import spam
4+
from loginInfo import Info
5+
posts_=[]
6+
7+
8+
selfProfile = "https://mbasic.facebook.com/profile.php?fref=pb"
9+
grups = ["https://mbasic.facebook.com/groups/830198010427436",
10+
"https://m.facebook.com/groups/1660869834170435",
11+
"https://m.facebook.com/groups/100892180263901",
12+
"https://m.facebook.com/groups/1649744398596548",
13+
"https://m.facebook.com/groups/421300388054652",
14+
"https://m.facebook.com/groups/675838025866331",
15+
"https://m.facebook.com/groups/1433809846928404",
16+
"https://m.facebook.com/groups/1625415104400173",
17+
"https://m.facebook.com/groups/424478411092230",
18+
"https://m.facebook.com/groups/1056447484369528",
19+
"https://m.facebook.com/groups/1433809846928404",
20+
"https://m.facebook.com/groups/421300388054652",
21+
"https://m.facebook.com/groups/1649744398596548",
22+
"https://m.facebook.com/groups/751450114953723",
23+
"https://m.facebook.com/groups/943175872420249"
24+
]
25+
26+
postsList = list()
27+
peopleList = list()
28+
saluteText = "Buenos días usuarios, gracias por activar su unidad moderadora 3000\n" \
29+
"\nPara información sobre su uso presione la tecla F1, para ayuda presione F2 \n" \
30+
"Para otras instrucciones remitase al manual de usuario adjunto en el CD instalador"
31+
32+
eula = """Unidad Moderadora 3000 0.69
33+
Copyright (c) 2001 Unit0x78A
34+
35+
*** END USER LICENSE AGREEMENT ***
36+
37+
IMPORTANT: PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THIS SOFTWARE.
38+
39+
1. LICENSE
40+
41+
By receiving, opening the file package, and/or using Unidad Moderadora 3000 0.69("Software") containing this software, you agree that this End User User License Agreement(EULA) is a legally binding and valid contract and agree to be bound by it. You agree to abide by the intellectual property laws and all of the terms and conditions of this Agreement.
42+
43+
Unless you have a different license agreement signed by Unit0x78A your use of Unidad Moderadora 3000 0.69 indicates your acceptance of this license agreement and warranty.
44+
45+
Subject to the terms of this Agreement, Unit0x78A grants to you a limited, non-exclusive, non-transferable license, without right to sub-license, to use Unidad Moderadora 3000 0.69 in accordance with this Agreement and any other written agreement with Unit0x78A. Unit0x78A does not transfer the title of Unidad Moderadora 3000 0.69 to you; the license granted to you is not a sale. This agreement is a binding legal agreement between Unit0x78A and the purchasers or users of Unidad Moderadora 3000 0.69.
46+
47+
If you do not agree to be bound by this agreement, remove Unidad Moderadora 3000 0.69 from your computer now and, if applicable, promptly return to Unit0x78A by mail any copies of Unidad Moderadora 3000 0.69 and related documentation and packaging in your possession.
48+
49+
2. DISTRIBUTION
50+
51+
Unidad Moderadora 3000 0.69 and the license herein granted shall not be copied, shared, distributed, re-sold, offered for re-sale, transferred or sub-licensed in whole or in part except that you may make one copy for archive purposes only. For information about redistribution of Unidad Moderadora 3000 0.69 contact Unit0x78A.
52+
53+
3. USER AGREEMENT
54+
55+
3.1 Use
56+
57+
Your license to use Unidad Moderadora 3000 0.69 is limited to the number of licenses purchased by you. You shall not allow others to use, copy or evaluate copies of Unidad Moderadora 3000 0.69.
58+
59+
3.2 Use Restrictions
60+
61+
You shall use Unidad Moderadora 3000 0.69 in compliance with all applicable laws and not for any unlawful purpose. Without limiting the foregoing, use, display or distribution of Unidad Moderadora 3000 0.69 together with material that is pornographic, racist, vulgar, obscene, defamatory, libelous, abusive, promoting hatred, discriminating or displaying prejudice based on religion, ethnic heritage, race, sexual orientation or age is strictly prohibited.
62+
63+
Each licensed copy of Unidad Moderadora 3000 0.69 may be used on one single computer location by one user. Use of Unidad Moderadora 3000 0.69 means that you have loaded, installed, or run Unidad Moderadora 3000 0.69 on a computer or similar device. If you install Unidad Moderadora 3000 0.69 onto a multi-user platform, server or network, each and every individual user of Unidad Moderadora 3000 0.69 must be licensed separately.
64+
65+
You may make one copy of Unidad Moderadora 3000 0.69 for backup purposes, providing you only have one copy installed on one computer being used by one person. Other users may not use your copy of Unidad Moderadora 3000 0.69 . The assignment, sublicense, networking, sale, or distribution of copies of Unidad Moderadora 3000 0.69 are strictly forbidden without the prior written consent of Unit0x78A. It is a violation of this agreement to assign, sell, share, loan, rent, lease, borrow, network or transfer the use of Unidad Moderadora 3000 0.69. If any person other than yourself uses Unidad Moderadora 3000 0.69 registered in your name, regardless of whether it is at the same time or different times, then this agreement is being violated and you are responsible for that violation!
66+
67+
3.3 Copyright Restriction
68+
69+
This Software contains copyrighted material, trade secrets and other proprietary material. You shall not, and shall not attempt to, modify, reverse engineer, disassemble or decompile Unidad Moderadora 3000 0.69. Nor can you create any derivative works or other works that are based upon or derived from Unidad Moderadora 3000 0.69 in whole or in part.
70+
71+
Unit0x78A's name, logo and graphics file that represents Unidad Moderadora 3000 0.69 shall not be used in any way to promote products developed with Unidad Moderadora 3000 0.69 . Unit0x78A retains sole and exclusive ownership of all right, title and interest in and to Unidad Moderadora 3000 0.69 and all Intellectual Property rights relating thereto.
72+
73+
Copyright law and international copyright treaty provisions protect all parts of Unidad Moderadora 3000 0.69, products and services. No program, code, part, image, audio sample, or text may be copied or used in any way by the user except as intended within the bounds of the single user program. All rights not expressly granted hereunder are reserved for Unit0x78A.
74+
75+
3.4 Limitation of Responsibility
76+
77+
You will indemnify, hold harmless, and defend Unit0x78A , its employees, agents and distributors against any and all claims, proceedings, demand and costs resulting from or in any way connected with your use of Unit0x78A's Software.
78+
79+
In no event (including, without limitation, in the event of negligence) will Unit0x78A , its employees, agents or distributors be liable for any consequential, incidental, indirect, special or punitive damages whatsoever (including, without limitation, damages for loss of profits, loss of use, business interruption, loss of information or data, or pecuniary loss), in connection with or arising out of or related to this Agreement, Unidad Moderadora 3000 0.69 or the use or inability to use Unidad Moderadora 3000 0.69 or the furnishing, performance or use of any other matters hereunder whether based upon contract, tort or any other theory including negligence.
80+
81+
Unit0x78A's entire liability, without exception, is limited to the customers' reimbursement of the purchase price of the Software (maximum being the lesser of the amount paid by you and the suggested retail price as listed by Unit0x78A ) in exchange for the return of the product, all copies, registration papers and manuals, and all materials that constitute a transfer of license from the customer back to Unit0x78A.
82+
83+
3.5 Warranties
84+
85+
Except as expressly stated in writing, Unit0x78A makes no representation or warranties in respect of this Software and expressly excludes all other warranties, expressed or implied, oral or written, including, without limitation, any implied warranties of merchantable quality or fitness for a particular purpose.
86+
87+
3.6 Governing Law
88+
89+
This Agreement shall be governed by the law of the Afghanistan applicable therein. You hereby irrevocably attorn and submit to the non-exclusive jurisdiction of the courts of Afghanistan therefrom. If any provision shall be considered unlawful, void or otherwise unenforceable, then that provision shall be deemed severable from this License and not affect the validity and enforceability of any other provisions.
90+
91+
3.7 Termination
92+
93+
Any failure to comply with the terms and conditions of this Agreement will result in automatic and immediate termination of this license. Upon termination of this license granted herein for any reason, you agree to immediately cease use of Unidad Moderadora 3000 0.69 and destroy all copies of Unidad Moderadora 3000 0.69 supplied under this Agreement. The financial obligations incurred by you shall survive the expiration or termination of this license.
94+
95+
4. DISCLAIMER OF WARRANTY
96+
97+
THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. THIS DISCLAIMER CONCERNS ALL FILES GENERATED AND EDITED BY Unidad Moderadora 3000 0.69 AS WELL.
98+
99+
5. CONSENT OF USE OF DATA
100+
101+
You agree that Unit0x78A may collect and use information gathered in any manner as part of the product support services provided to you, if any, related to Unidad Moderadora 3000 0.69.Unit0x78A may also use this information to provide notices to you which may be of use or interest to you."""
102+
103+
104+
def getPost():
105+
global postsList
106+
107+
108+
def saluteAll():
109+
global grups, bot, saluteText
110+
for g in grups:
111+
try:
112+
bot.postInGroup(g, eula)
113+
print("DONE")
114+
except Exception:
115+
print("Fail")
116+
117+
118+
def getUsers():
119+
global peopleList, grups, bot
120+
for g in grups:
121+
try:
122+
pg = bot.getGroupMembers(g, 1, random.randint(0, 20))
123+
peopleList += pg
124+
print("DONE", len(pg))
125+
except Exception:
126+
print("fail")
127+
print(len(peopleList))
128+
129+
130+
def addAll():
131+
global bot, grups, peopleList
132+
for p in peopleList:
133+
try:
134+
bot.addFriend(p.profileLink)
135+
print("Added: ", p.name)
136+
except Exception:
137+
print("Fail to add: ", p.name)
138+
139+
140+
def spam_group():
141+
global bot, groups,posts_
142+
for g in grups:
143+
try:
144+
posts_ += bot.getPostInGroup(g)[0]
145+
print("Number of posts: ", len(posts_))
146+
except Exception:
147+
print("Fail get posts in :", bot.title)
148+
for p in posts_:
149+
try:
150+
n=bot.commentInPost(p.linkToComment, random.choice(spam))
151+
bot.save_screenshot(n)
152+
print("Commenting in", bot.title)
153+
except Exception:
154+
print("Fail comment in ", bot.title)
155+
156+
157+
if __name__ == "__main__":
158+
bot = FacebookBot()
159+
bot.login(Info["email"], Info["pass"], False)
160+
bot.save_screenshot("debug.jpg")
161+
while True:
162+
try:
163+
saluteAll()
164+
spam_group()
165+
time.sleep(5*60)
166+
except Exception:
167+
print ("ERROR!!!")

0 commit comments

Comments
 (0)