Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Settings
- # -------------------------------------------
- # The rest of the settings can be found in
- # script folder\settings
- active_accounts = 30 # you said you want 30 accounst all the time, to be spinned, you'll have to set this to 30
- max_consecutive_errors_before_stop = 7 # if for some reason, this number of consecutive erros occurs (couldn't create account, or do meetme, or whatever)
- sleep_after_proxy_rental_ip_change = 5 # will sleep 5 seconds after IP is changed
- # in case of error, sleep for a while to chill
- calm_things_down_delay = 5 # in seconds # if error occurs from some reason, sleep this amount of secs
- # Account creation
- # ---------------------
- create_accounts = True # if false, will do only the meetme part
- email_domains = ['gmail.com', 'yahoo.com', 'outlook.com'] # not very important, but you can put your own domains, a random one will be picked for email
- # page 2 (I think)
- # ----------------
- professions = ['worker' , 'stylist', 'banker', 'makeup', 'designer']
- headlines = ['oh hello', 'oh hye', 'lets chat', 'be a friend', 'new here', 'make me smile']
- interests = ['movies' , 'sports', 'outdoors', 'nails']
- # ----------------
- remove_postal_code_after_use = True # straight forward
- last_submit_button_retries = 10 # doesn't need to be changed ... it's the last button, how many times to try and click it
- # because it's not visible from the beginning
- # Images
- # ------
- image_extensions = ['.jpg', '.png', '.bmp', '.jpeg'] # if you have other image extensions, put them here
- # this is so that it won't get txt files and other BS
- image_upload_timeout = 180 # in seconds, depends on image size and proxy speed
- wait_after_click_save_image = 5 # just a double check for image upload
- # a random number between 1-3 in this case
- # will be picked, and that's the number of images/account
- # if you want a fixed number just put
- image_a = 1
- image_b = 3
- remove_image_after_upload = True # straight fwd
- # ------
- # ---------------------
- # Meet me
- # --------------
- # a random number will be picked all the time
- # and that's how many times it will click the meetme button
- # (same as image_a and image_b random choose but for meet me clicks)
- meet_me_clicks_a = 140
- meet_me_clicks_b = 180
- # same here, a random number (seconds) will be choosen all the time
- # will make you more stealth
- # (same as image and clicks thing)
- delay_between_meet_me_clicks_a = 4
- delay_between_meet_me_clicks_b = 8
- # if it cannot click the meetme button for some reason, just remove the account, and move on
- max_consecutive_meet_me_errors = 10 # it will skip the a new account (without delete)
- # --------------
- # Browser
- # -------
- # random user agent will be picked
- user_agents = [
- 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0',
- 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko',
- 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0',
- 'Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0'
- ]
- # random firefox window size will be picked
- resolutions = [
- '1280x800',
- '1024x768',
- '1012x650',
- '1043x800',
- '1000x600',
- '800x600'
- ]
- # a random number will be picked after each
- # action, and also sleep(X) seconds
- # this is just really waiting after each web action (click, navigate, etc)
- # not really needed, but might be sometimes
- delay_a = 0.3 # seconds
- delay_b = 0.9 # seconds
- # -------
- # load timeout
- # THIS IS VERY IMPORTANT
- # if you set this to 10 for example, if the page loads more than 10 seconds
- # will return in an error, it really doesn't care
- # this is important, again, depending on your images and how fast the proxies are working
- # you know better than me about PR
- load_timeout = 200 # if it takes longer, will skip and move on
- disable_flash = True
- # firefox binary file (usually here all the time)
- firefox_binary = r"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
- # will clear C:\Users\YourUser\AppData\Local\Temp (the bot creates new profiles all the time,
- # and it's saving them there). This is not 100% neccessary, but I would leave it on
- clear_appdata_temp_folder = True
- clear_flash_cookies = True
- # end of settings
- # -------------------------------------------
- # ---------------------------
- # ! DO NOT CHANGE BELOW THIS
- # ---------------------------
- from selenium import webdriver
- import random
- from time import sleep
- from bs4 import BeautifulSoup as BS
- from requests import session
- import json
- import re
- import os
- import glob
- import sys
- from extra import Extra
- import socket
- from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
- import threading
- def remove_image(image):
- try:
- os.remove(image)
- print '[+] Image removed.'
- except:
- print '[!] Warning: Cannot remove image: ' + image
- def get_random_name():
- #http://api.randomuser.me/?gender=female&country=unitedstates
- with session() as s:
- response = s.get('http://api.randomuser.me/?gender=female&country=unitedstates')
- data = json.loads(response.text.encode('utf-8'))
- return [data['results'][0]['user']['email'], data['results'][0]['user']['username'],
- data['results'][0]['user']['salt']]
- def find_input(e):
- for i in e.find_elements_by_tag_name('input'):
- if i.get_attribute('type') != 'hidden':
- return i
- def sleep_r():
- sleep(random.uniform(delay_a, delay_b))
- def upload_images(driver, images, do_continue = True):
- print ''
- print '[+] Uploading ' + str(len(images)) + ' images'
- for image in images:
- print '[+] Image: ' + image
- rr_ = 0
- get_out = False
- while True:
- if rr_ == 5:
- get_out = True
- break
- try:
- driver.find_element_by_id('FileUpload').send_keys(image)
- break
- except:
- rr_ += 1
- sleep(1)
- if get_out:
- print '[!] Element is not visibile anymore, continuing to meet me instead of throwing error'
- break
- k = 0
- while k < image_upload_timeout:
- try:
- a = driver.find_element_by_id('save_link')
- a.click()
- print '[+] Image uploaded.'
- if remove_image_after_upload:
- remove_image(image)
- sleep(wait_after_click_save_image)
- break
- except Exception, e:
- pass
- k += 1
- sleep(1)
- if k == image_upload_timeout:
- print '[!] Upload timeout (you should increase the upload timeout). Continuing anyway'
- print ''
- if not do_continue:
- return
- errr = 0
- while True:
- try:
- driver.find_element_by_class_name('cancelBtn').click()
- print '[+] Clicked X on the image uploader.'
- sleep(2)
- except:
- pass
- for i in driver.find_elements_by_tag_name('input'):
- v = i.get_attribute('value').lower()
- if 'continue to final step' in v:
- try:
- i.click()
- print '[+] Submitted.'
- return
- except Exception, e:
- errr += 1
- break
- if errr == last_submit_button_retries:
- raise Exception('Cannot submit last page.')
- sleep(2)
- def create_account(driver, email, username, password, postal_code, images):
- print '[+] Navigating to pof'
- driver.get('http://pof.com')
- if random.randint(0, 9) <= 4:
- driver.get('http://www.pof.com/register.aspx?id=1')
- else:
- links = driver.find_element_by_class_name('innerbanner').find_elements_by_tag_name('a')
- for link in links:
- try:
- if '/register.aspx' in link.get_attribute('href'):
- link.click()
- print '[+] Clicked register'
- break
- except:
- pass
- sleep_r()
- email = email.replace('example.com', random.choice(email_domains))
- """
- print email
- print username
- print password
- print postal_code
- """
- print '[+] Registration started'
- main_table = driver.find_elements_by_tag_name('table')[1]
- trs = main_table.find_elements_by_tag_name('tr')
- trs[0].find_elements_by_tag_name('td')[1].find_element_by_class_name('title').send_keys(username)
- trs[1].find_elements_by_tag_name('td')[1].find_element_by_class_name('title').send_keys(password)
- trs[2].find_elements_by_tag_name('td')[1].find_element_by_class_name('title').send_keys(password)
- trs[3].find_elements_by_tag_name('td')[1].find_element_by_class_name('title').send_keys(email)
- trs[4].find_elements_by_tag_name('td')[1].find_element_by_class_name('title').send_keys(email)
- trs[5].find_elements_by_tag_name('td')[1].find_elements_by_tag_name('option')[1].click()
- month = random.randint(1,11)
- day = random.randint(0,27)
- year = 3
- selects = trs[6].find_elements_by_tag_name('td')[1].find_elements_by_tag_name('select')
- selects[0].find_elements_by_tag_name('option')[month].click()
- sleep_r()
- selects[1].find_elements_by_tag_name('option')[day].click()
- sleep_r()
- selects[2].find_elements_by_tag_name('option')[year].click()
- sleep_r()
- for o in trs[7].find_elements_by_tag_name('option'):
- t = o.text.lower()
- if t == 'united states' or t == 'caucasion':
- o.click()
- sleep_r()
- break
- for o in trs[8].find_elements_by_tag_name('option'):
- t = o.text.lower()
- if t == 'united states' or t == 'caucasion':
- o.click()
- sleep_r()
- break
- captcha = raw_input('[+] Type captcha: ')
- for e in trs[9].find_elements_by_tag_name('input'):
- try:
- e.send_keys(captcha)
- except:
- pass
- trs[10].find_element_by_tag_name('input').click()
- sleep_r()
- try:
- trs[11].find_element_by_tag_name('input').click()
- except:
- pass
- sleep_r()
- driver.find_element_by_name('Submit').click()
- try:
- if 'createprofile.aspx?sguid=' not in driver.current_url:
- raise Exception('Couldn\'t get to page 2.')
- except Exception, e:
- print '[!] Probably a spam check, typing captcha again and resubmitting.'
- try:
- c_e = driver.execute_script('return document.activeElement')
- except:
- try:
- alert = driver.switch_to_alert()
- alert.dismiss()
- sleep_r()
- c_e = driver.execute_script('return document.activeElement')
- except:
- c_e = driver.execute_script('return document.activeElement')
- sleep_r()
- c_e.send_keys(captcha)
- driver.find_element_by_name('Submit').click()
- if 'You are using things like > or \' etc that are not allowed' in driver.page_source:
- raise Exception('Error from website: You are using things like > or \' etc that are not allowed.')
- if 'Copy the letters displayed under the circles from the image exactly' in driver.find_element_by_tag_name('body').text:
- raise Exception('Error from website: You\'ve typed a wrong captcha.')
- try:
- form = driver.find_element_by_tag_name('form')
- except:
- print '[!] Wrong captcha or spam check.'
- print '[!] Captcha retype.'
- driver.execute_script('return document.activeElement').send_keys(captcha)
- driver.find_element_by_name('Submit').click()
- sleep(2)
- form = driver.find_element_by_tag_name('form')
- print '\n[+] On page 2'
- print ''
- # submit second page
- for tr in form.find_elements_by_tag_name('tr'):
- tds = tr.find_elements_by_tag_name('td')
- k = 0
- for td in tds:
- try:
- text_td = td.text.lower()
- next_td = tds[k+1]
- if 'postal code/zip' in text_td:
- find_input(tds[k+1]).send_keys(postal_code)
- print '[+] Postal code'
- sleep_r()
- elif 'do you want children' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Do you want children'
- sleep_r()
- elif 'my gender' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] My gender'
- sleep_r()
- elif 'marital status' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Marital status'
- sleep_r()
- elif 'seeking' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Seeking'
- sleep_r()
- elif 'do you have children' in text_td:
- next_td.find_elements_by_tag_name('option')[2].click()
- print '[+] Have children'
- sleep_r()
- elif 'height' in text_td:
- next_td.find_elements_by_tag_name('option')[random.randint(5,8)].click()
- print '[+] Height'
- sleep_r()
- elif 'do you smoke' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Smoke'
- sleep_r()
- elif 'i am looking for' in text_td:
- next_td.find_elements_by_tag_name('option')[random.randint(1,2)].click()
- print '[+] Looking for'
- sleep_r()
- elif 'do you do drugs' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Do drugs'
- sleep_r()
- elif 'hair color' in text_td:
- l = [1, 6]
- next_td.find_elements_by_tag_name('option')[random.choice(l)].click()
- print '[+] Hair color'
- sleep_r()
- elif 'do you drink' in text_td:
- next_td.find_elements_by_tag_name('option')[2].click()
- print '[+] Drink'
- sleep_r()
- elif 'body type' in text_td:
- next_td.find_elements_by_tag_name('option')[random.randint(1,3)].click()
- print '[+] Body type'
- sleep_r()
- elif 'religion' in text_td:
- l = [0, 1, 14]
- next_td.find_elements_by_tag_name('option')[random.choice(l)].click()
- print '[+] Religion'
- sleep_r()
- elif 'do you own a car' in text_td:
- next_td.find_elements_by_tag_name('option')[1].click()
- print '[+] Own a car'
- sleep_r()
- elif 'your profession' in text_td:
- find_input(tds[k+1]).send_keys(random.choice(professions))
- print '[+] Profession'
- sleep_r()
- elif 'education' in text_td:
- next_td.find_elements_by_tag_name('option')[random.randint(0, 1)].click()
- print '[+] Education'
- sleep_r()
- elif 'do you have pets' in text_td:
- next_td.find_elements_by_tag_name('option')[0].click()
- print '[+] Pets'
- elif 'eye color' in text_td:
- l = [1, 4]
- next_td.find_elements_by_tag_name('option')[random.choice(l)].click()
- print '[+] Eye color'
- elif 'personality in one word' in text_td:
- opts = next_td.find_elements_by_tag_name('option')
- i = random.randint(1, len(opts)-1)
- opts[i].click()
- print '[+] Personality'
- sleep_r()
- elif 'second language' in text_td:
- next_td.find_elements_by_tag_name('option')[0].click()
- print '[+] Second language'
- sleep_r()
- elif 'not ambitious' in text_td and 'very ambitious' in text_td:
- opts_ = td.find_elements_by_tag_name('option')
- opts_[random.randint(3,4)].click()
- sleep_r()
- elif 'it comes to dating what best describes your intent' in text_td:
- td.find_elements_by_tag_name('option')[2].click()
- print '[+] Dating intents'
- sleep_r()
- elif 'longest relationship you have been in' in text_td:
- td.find_elements_by_tag_name('option')[random.randint(2,5)].click()
- print '[+] Longest relationship'
- sleep_r()
- elif 'income' in text_td:
- td.find_elements_by_tag_name('option')[random.randint(1,7)].click()
- print '[+] Income'
- sleep_r()
- elif 'birth father and mother are' in text_td:
- td.find_elements_by_tag_name('select')[0].find_elements_by_tag_name('option')[random.randint(1,6)].click()
- sleep_r()
- td.find_elements_by_tag_name('select')[1].find_elements_by_tag_name('option')[random.randint(1,3)].click()
- sleep_r()
- td.find_elements_by_tag_name('select')[2].find_elements_by_tag_name('option')[1].click()
- print '[+] Family'
- sleep_r()
- elif 'you date someone who has kids' in text_td:
- td.find_elements_by_tag_name('option')[2].click()
- print '[+] Someone who has kids'
- sleep_r()
- elif 'date someone who smokes' in text_td:
- td.find_elements_by_tag_name('option')[2].click()
- print '[+] Someone who smokes'
- sleep_r()
- elif 'few extra pounds selected as a body type' in text_td:
- td.find_elements_by_tag_name('option')[1].click()
- print '[+] Someone with extra pounds'
- sleep_r()
- k += 1
- except Exception, e:
- pass
- # part 2
- print ''
- for select in form.find_elements_by_tag_name('select'):
- os = select.find_elements_by_tag_name('option')
- select_text = select.text.lower()
- if 'i want to date but nothing serious' in select_text and 'i am putting in serious' in select_text:
- os[2].click()
- print '[+] Intent'
- sleep_r()
- elif 'over 10 years' in select_text and 'over 1 year' in select_text:
- os[random.randint(2,5)].click()
- print '[+] Longest relationship'
- sleep_r()
- elif '150,000+' in select_text and 'less than 25,000' in select_text:
- os[random.randint(1, len(os)-1)].click()
- print '[+] Cash'
- sleep_r()
- elif 'still married' in select_text and 'one has passed away' in select_text:
- os[random.randint(1,6)].click()
- print '[+] Parents relationship'
- sleep_r()
- elif '1 child' in select_text and '9 children' in select_text:
- os[random.randint(1,9)].click()
- print '[+] Parents children'
- sleep_r()
- elif 'the oldest' in select_text and 'seventh born' in select_text:
- os[1].click()
- print '[+] Oldest one'
- sleep_r()
- elif 'i only date single parents' in select_text:
- os[2].click()
- print '[+] Date parents'
- sleep_r()
- elif 'i only date smokers' in select_text:
- os[2].click()
- print '[+] Date smokers'
- sleep_r()
- elif 'i only date a few extra pounds' in select_text:
- os[1].click()
- print '[+] Date extra pounds'
- sleep_r()
- driver.find_element_by_id('headline').send_keys(random.choice(headlines).strip())
- print '[+] Headline'
- sleep_r()
- driver.find_element_by_id('interests').send_keys(random.choice(interests).strip())
- print '[+] Interests'
- sleep_r()
- # textareas (only 2)
- text_areas = driver.find_elements_by_tag_name('textarea')
- text_areas[0].send_keys(get_description().strip())
- print '[+] Description'
- sleep_r()
- text_areas[1].send_keys(get_first_date().strip())
- print '[+] First date'
- sleep_r()
- print ''
- # submit page 2
- for i in driver.find_elements_by_tag_name('input'):
- v = i.get_attribute('value')
- if 'create my profile now!' in v.strip().lower():
- print '[+] Submiting.'
- i.click()
- sleep_r()
- break
- if 'createProfileSuccess=True' not in driver.current_url:
- raise Exception('Not sure page submitted.')
- upload_images(driver, images)
- sleep_r()
- if 'poftest.aspx' in driver.current_url:
- return
- if 'log out' not in driver.page_source.lower():
- raise Exception('Not sure if account got created, trying again.')
- def get_random(arr):
- return arr[random.randrange(0,len(arr))]
- def _select(m):
- choices = m.group(1).split('|')
- return choices[random.randint(0, len(choices)-1)]
- def spin(text, tokens=None):
- r = re.compile('{([^{}]*)}')
- while True:
- text, n = r.subn(_select, text)
- if n == 0:
- break
- if tokens:
- text = multi_replace(text, tokens)
- return text.strip()
- def read_file(f):
- s = ''
- with open(f, 'rb') as g:
- s = g.read()
- return s
- def get_accounts():
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'), 'rb'):
- s = line.split('::')
- g = []
- g.append(s[0].strip())
- g.append(s[1].strip())
- l.append(g)
- return l
- def remove_account(email, show_text=True):
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'), 'rb'):
- if email != line.split('::')[0].strip():
- l.append(line)
- with open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'),'wb') as f:
- for e in l:
- f.write(e.strip()+'\n')
- if show_text:
- print '[+] Account removed: ' + email
- def get_newest_account():
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'),'rb'):
- l.append(line.strip())
- return l[0]
- def get_oldest_account():
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'),'rb'):
- l.append(line.strip())
- return l[-1]
- def add_account(email, password, end=True):
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'), 'rb'):
- if email != line.split('::')[0].strip():
- l.append(line.strip())
- with open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'), 'wb') as f:
- if not end:
- for e in l:
- f.write(e+'\n')
- f.write(email + '::' + password + '\n')
- else:
- f.write(email + '::' + password + '\n')
- for e in l:
- f.write(e+'\n')
- def get_images():
- n = random.randint(image_a, image_b)
- real_m = []
- imgs = glob.glob(os.path.join(os.path.join(os.path.join(os.getcwd(), 'settings'), 'pictures'), '*'))
- for e in imgs:
- ok = False
- for ex in image_extensions:
- if e.endswith(ex.lower()):
- ok = True
- if ok:
- real_m.append(e)
- random.shuffle(real_m)
- return real_m[:n]
- def get_description():
- return spin(read_file(os.path.join(os.path.join(os.getcwd(), 'settings'), 'description.txt')))
- def get_first_date():
- return spin(read_file(os.path.join(os.path.join(os.getcwd(), 'settings'), 'first_date.txt')))
- def get_postal_code():
- l = []
- for line in open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'postal_codes.txt'), 'rb'):
- l.append(line.strip())
- try:
- postal_code = random.choice(l)
- except:
- raise Exception('Out of postal codes. Check posta_codes.txt, it\'s probably empty.')
- if remove_postal_code_after_use:
- l.remove(postal_code)
- with open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'postal_codes.txt'), 'wb') as f:
- for e in l:
- f.write(e + '\n')
- return postal_code
- def proxy_rental():
- print '[+] Closing all firefox instances and changing proxy rental IP.'
- Extra.close_all_ff_instances()
- Extra.change_proxy_rental_ip()
- print '[+] Sleeping for ' + str(sleep_after_proxy_rental_ip_change) + ' seconds.'
- sleep(sleep_after_proxy_rental_ip_change)
- def do_account_create(driver):
- postal_code = get_postal_code()
- images = get_images()
- if len(images) == 0:
- print '[!] No images available.'
- print '[!] Will try to do meetme instead.'
- do_meet_me(driver)
- return
- sys.stdout.write('[+] Getting new identity - ')
- sys.stdout.flush()
- try:
- email, username, password = get_random_name()
- print 'OK'
- except Exception, e:
- print 'FAILED'
- raise Exception('Cannot get identity.')
- try:
- create_account(driver, email, username, password, postal_code, images)
- print '[+] Account created: ' + username
- add_account(username, password, True)
- #a = raw_input('account addded')
- except Exception, e:
- print str(e)
- raise Exception('Cannot create account.')
- def images_not_there(driver):
- try:
- s= driver.find_element_by_id('imageitembox').get_attribute('class')
- return False
- except:
- return True
- def meet_me(driver, username, password, clicks_to_send, do_not_login):
- if not do_not_login:
- print ''
- print '[+] Logging in.'
- lgn_links = ['http://www.pof.com/inbox.aspx', 'http://www.pof.com/meetme.aspx', 'http://www.pof.com']
- if random.randint(0, 9) <= 4:
- driver.get(random.choice(lgn_links))
- else:
- driver.get(random.choice(lgn_links))
- links = None
- try:
- links = driver.find_element_by_class_name('innerbanner').find_elements_by_tag_name('a')
- except:
- sleep(5)
- links = driver.find_element_by_class_name('innerbanner').find_elements_by_tag_name('a')
- for link in links:
- try:
- if '/meetme.aspx' in link.get_attribute('href'):
- link.click()
- break
- except:
- pass
- sleep_r()
- driver.find_element_by_id('logincontrol_username').send_keys(username)
- sleep_r()
- pass_field = driver.find_element_by_id('logincontrol_password')
- pass_field.send_keys(password)
- sleep_r()
- pass_field.submit()
- sleep_r()
- if 'log out' in driver.page_source.lower():
- print '[+] Logged in.'
- else:
- remove_account(username)
- raise Exception('Cannot login.')
- sleep(random.randint(1,4))
- print '[+] Checking if the images are still up.'
- if 'inbox.aspx' in driver.current_url:
- if 'you have no images.' in driver.page_source.lower():
- print '[+] Looks like your images got deleted, uploading new images.'
- print '[+] Getting on the images page.'
- driver.get('http://www.pof.com/images.aspx')
- imgs_ = get_images()
- if len(imgs) == 0:
- print '[!] No images available, doing meetme.'
- else:
- upload_images(driver, imgs_, False)
- else:
- print '[+] Images still there.'
- elif 'images.aspx' in driver.current_url:
- if images_not_there(driver):
- print '[+] Looks like your images got deleted, uploading new images.'
- upload_images(driver, get_images(), False)
- else:
- print '[+] Images still there.'
- else:
- print '[+] Navigating to the right page'
- driver.get('http://www.pof.com/images.aspx')
- if images_not_there(driver):
- print '[+] Looks like your images got deleted, uploading new images.'
- upload_images(driver, get_images(), False)
- else:
- print '[+] Images still there.'
- if 'loginError=1' in driver.current_url:
- remove_account(username)
- raise Exception('[!] Error from website: found loginError=1 in link, account probably banned.')
- if 'log out' not in driver.page_source.lower():
- remove_account(username)
- raise Exception('[!] Error from website: annot find log out in page, account probably banned.')
- k = 0
- err = 0
- first = False
- while k < clicks_to_send:
- try:
- if 'meetme.aspx' not in driver.current_url:
- print '[+] Navigating to meetme page.'
- driver.get('http://www.pof.com/meetme.aspx')
- sleep_r()
- driver.find_element_by_name('votea').click()
- if not first:
- print '[+] First click got through.'
- first = True
- sleep(random.randint(delay_between_meet_me_clicks_a, delay_between_meet_me_clicks_b))
- sleep_r()
- k += 1
- err = 0
- except:
- print '[!] Couldn\'t click Yes, retrying.'
- driver.get('http://pof.com/meetme.aspx')
- err += 1
- if err == max_consecutive_meet_me_errors:
- if k == 0:
- remove_account(username)
- raise Exception('Got maximum consecutive meetme errors, skipping account.')
- if k % 5 == 0:
- print '[+] Clicked Yes ' + str(k) + ' times'
- remove_account(username, False)
- add_account(username, password)
- print '[+] Meetme clicks sent.'
- def do_meet_me(driver, use_newest=False):
- acc = ''
- if not use_newest:
- acc = get_oldest_account()
- else:
- acc = get_newest_account()
- username = acc.split('::')[0]
- password = acc.split('::')[1]
- print ''
- print '[+] Meetme: ' + username
- clicks_to_send = random.randint(meet_me_clicks_a, meet_me_clicks_b)
- print '[+] Clicking Yes ' + str(clicks_to_send) + ' times'
- try:
- meet_me(driver, username, password, clicks_to_send, use_newest)
- except Exception, e:
- print str(e)
- raise Exception('Cannot do meetme.')
- def close_browser(driver):
- try:
- driver.quit()
- except:
- pass
- def start_browser_check():
- a = Extra.get_temp_file()
- with open(a, 'wb') as f:
- f.write('')
- t = threading.Thread(target=Extra.check_browser)
- t.start()
- def get_new_browser():
- ua = random.choice(user_agents)
- wsize = random.choice(resolutions)
- wsize = wsize.lower()
- w = wsize.split('x')[0]
- h = wsize.split('x')[1]
- profile = webdriver.FirefoxProfile()
- profile.set_preference("general.useragent.override",ua)
- if disable_flash:
- profile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so', 'false')
- print '[+] Flash disabled.'
- binary = FirefoxBinary(firefox_binary)
- start_browser_check()
- driver = webdriver.Firefox(firefox_profile=profile, firefox_binary=binary)
- driver.set_window_size(w, h)
- Extra.remove_file(Extra.get_temp_file())
- return driver
- def do_clean():
- try:
- Extra.clear_temp_folder()
- print '[+] Temp folder cleaned.'
- except:
- print '[!] Cannot clear temp folder.'
- def clear_flash_cks():
- try:
- Extra.clear_flash()
- print '[+] Flash cookies cleared.'
- except:
- print '[!] Cannot clear flash cookies.'
- def main():
- print '[+] POF automation'
- print '[+] getyourbots.com'
- print ''
- # init variables
- socket.setdefaulttimeout(load_timeout)
- accounts = []
- try:
- accounts = get_accounts()
- except Exception, e:
- with open(os.path.join(os.path.join(os.getcwd(), 'settings'), 'accounts.txt'), 'wb') as f:
- f.write('')
- print '[!] Accounts didn\'t exist, just created it.'
- print '[+] Accounts in database: ' + str(len(accounts))
- print '[+] Make sure ProxyRental is started, you\'re logged in, and connected. The software will change the IP automatically when needed.'
- print ''
- a = raw_input('[-] If everything is set, press any key to continue ...')
- print ''
- runs = 0
- errs = 0
- while True:
- if clear_appdata_temp_folder:
- do_clean()
- if clear_flash_cookies:
- clear_flash_cks()
- accounts = get_accounts()
- proxy_rental()
- print ''
- if len(accounts) < active_accounts and create_accounts:
- print ''
- print '[+] You have ' + str(len(accounts)) + ' accounts in the DB.'
- print '[+] Your active accounts variable is set to: ' + str(active_accounts)
- print '[+] Creating new account'
- print ''
- print '[+] Starting browser'
- driver = None
- try:
- driver = get_new_browser()
- do_account_create(driver)
- do_meet_me(driver, True)
- close_browser(driver)
- errs = 0
- runs += 1
- print '---------------------------------------------------------'
- print '[+] Ran ' + str(runs) + ' times'
- print '---------------------------------------------------------'
- continue
- except Exception, e:
- close_browser(driver)
- errs += 1
- print '[!] Error: ' + str(e)
- print '[!] Sleeping for ' + str(calm_things_down_delay) + ' seconds to calm things down ...'
- sleep(calm_things_down_delay)
- runs += 1
- print '---------------------------------------------------------'
- print '[+] Ran ' + str(runs) + ' times'
- print '---------------------------------------------------------'
- continue
- print '[+] Starting browser'
- driver = None
- try:
- driver = get_new_browser()
- do_meet_me(driver)
- close_browser(driver)
- runs += 1
- print '---------------------------------------------------------'
- print '[+] Ran ' + str(runs) + ' times'
- print '---------------------------------------------------------'
- continue
- except Exception, e:
- close_browser(driver)
- errs += 1
- print '[!] Error: ' + str(e)
- print '[!] Sleeping for ' + str(calm_things_down_delay) + ' seconds to calm things down ...'
- sleep(calm_things_down_delay)
- runs += 1
- print '---------------------------------------------------------'
- print '[+] Ran ' + str(runs) + ' times'
- print '---------------------------------------------------------'
- continue
- if errs == max_consecutive_errors_before_stop:
- print '[+] Got to maximum consecutive errors. Stopping.'
- a = raw_input()
- sys.exit()
- runs += 1
- print '---------------------------------------------------------'
- print '[+] Ran ' + str(runs) + ' times'
- print '---------------------------------------------------------'
- #create_account(driver, email, username, password, postal_code, images)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement