Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import configparser
- import requests
- import urllib.request
- import urllib3
- import os
- import string
- import time
- import random
- import json
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- requests.packages.urllib3.disable_warnings()
- user_agents = (
- 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14',
- 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0',
- 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9',
- 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5',
- 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20120813 Firefox/16.0',
- 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.15',
- 'Opera/9.0 (Macintosh; PPC Mac OS X; U; en)',
- 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/312.5 (KHTML, like Gecko) Safari/312.3',
- 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100915 Gentoo Firefox/3.6.9',
- 'Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Galeon/1.3.14',
- 'Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.1.13) Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-5)',
- 'Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.9.2.3) Gecko/20100402 Iceweasel/3.6.3 (like Firefox/3.6.3) GTB7.0',
- 'Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0',
- 'Konqueror/3.0-rc4; (Konqueror/3.0-rc4; i686 Linux;;datecode)',
- 'Mozilla/5.0 (X11; Linux x86_64; en-US; rv:2.0b2pre) Gecko/20100712 Minefield/4.0b2pre',
- 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.17) Gecko/20110123 SeaMonkey/2.0.12',
- 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)',
- 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5',
- 'Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11',
- 'Mozilla/4.0 (compatible; Dillo 3.0)',
- 'Mozilla/5.0 (X11; U; Linux i686; en-us) AppleWebKit/528.5 (KHTML, like Gecko, Safari/528.5 ) lt-GtkLauncher',
- 'Midori/0.1.10 (X11; Linux i686; U; en-us) WebKit/(531).(2)',
- 'Mozilla/4.8 [en] (X11; U; SunOS; 5.7 sun4u)',
- 'Mozilla/5.0 (Unknown; U; UNIX BSD/SYSV system; C -) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.10.2',
- 'Opera/9.51 Beta (Microsoft Windows; PPC; Opera Mobi/1718; U; en)',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6',
- 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6',
- 'Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre',
- 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110622 Firefox/6.0a2',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1',
- 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100815 Minefield/4.0b4pre',
- )
- # --------------------------------------------------------------------------------------------------
- def getConfig(path):
- config = configparser.ConfigParser()
- config.read(path, encoding='utf-8')
- return config
- # --------------------------------------------------------------------------------------------------
- def get_setting(path, section, setting):
- config = getConfig(path)
- value = config.get(section, setting)
- return value
- # --------------------------------------------------------------------------------------------------
- def setlanguage(language):
- language_rus = ['Эй, поддержи наш фонд борьбы со скамерами ^_^', 'Подписывайся на нашу группу в Steam!', 'Введите Request URL: ', 'Некорректный URL, введите еще раз.', 'Версия вашей программы устарела. Скачайте новую версию!', 'Введите кол-во запросов: ', 'Успешно отправлено!', 'Ошибка! Запрос не отправлен.', 'Проверьте входные данные и сайт скаммера, либо обратитесь за помощью к разработчику. Telegram: @straume']
- language_eng = ['Hey bro, support our Fund to fight scammers ^_^', 'Subscribe to our group on Steam!', 'Enter Request URL: ', 'Incorrect URL, please try again.', 'The version of your program is outdated. Download the new version!', 'Enter the number of requests: ', 'Successfully sent!', 'ERROR! The request is not sent.', 'Check the input data and scammers website, or contact the developer for help. Telegram: @straume']
- while True:
- if language == 'rus':
- return language_rus
- elif language == 'eng':
- return language_eng
- print('Translation into English may be of poor quality!')
- else:
- print('ERROR: Incorrect language in config.conf')
- print('Enter a new value:')
- language = input()
- continue
- # --------------------------------------------------------------------------------------------------
- def readserver():
- try:
- r = urllib.request.urlopen('https://rocketleague-planet.info/response.json').read()
- return results_response
- except:
- return None
- # --------------------------------------------------------------------------------------------------
- def main(random_log_pass, database, request_delay, scammer_response, request_url, n, list_language, user_agents):
- #Чтение всех вайлов в папке config и их срощение. Создание универсального field словаря.
- DIRECTORY, field, n_response = 'config/', {}, 0
- list_configs = os.listdir(DIRECTORY)
- for i in list_configs:
- chech = {}
- chech = creater_dict('config/{0}'.format(i))
- field.update(chech)
- #Создаем header и добавляем куки из кортежа
- header = {'accept': '*/*'}
- with open('base.txt', 'r') as base:
- while n >= n_response:
- for user_agent, data_acc in zip(user_agents, base):
- header['user-agent'] = user_agent
- response = start_spam(header, field, request_url, random_log_pass, database, data_acc, scammer_response)
- if str(response) in '<Response [200]>' and not scammer_response:
- print('Response [200] {0} №{1}'.format(list_language[6], n_response))
- elif not str(response) in '<Response [200]>' and not scammer_response:
- print('{} {} №{}'.format(response, list_language[7], n_response))
- print(list_language[8])
- else:
- print('Sent! ', n_response)
- n_response += 1
- time.sleep(int(request_delay))
- # --------------------------------------------------------------------------------------------------
- def request(field, header, url, scammer_response=False):
- if scammer_response:
- requests.post(url, data=field, headers=header, verify=False, timeout=1)
- response = None
- else:
- response = requests.post(url, data=field, headers=header, verify=False)
- return response
- # --------------------------------------------------------------------------------------------------
- def creater_dict(name_file):
- with open(name_file, 'r') as file:
- results_dict = {}
- for line in file:
- line = str(line)
- list_arg = [i.rstrip() for i in line.split(': ')]
- results_dict[list_arg[0]] = list_arg[1]
- return results_dict
- # --------------------------------------------------------------------------------------------------
- def start_spam(header, field, request_url, random_log_pass, database, data_acc, scammer_response):
- if random_log_pass:
- for i in field:
- field[i] = randompassword()
- if database:
- login, password = data_acc.split(':')
- field['username'], field['name'] = login, login
- field['password'] = password
- if scammer_response:
- response = request(field, header, request_url, scammer_response=True)
- else:
- response = request(field, header, request_url)
- return response
- # --------------------------------------------------------------------------------------------------
- def randompassword():
- chars=string.ascii_uppercase + string.ascii_lowercase + string.digits
- size=4
- return ''.join(random.choice(chars) for x in range(size,16))
- #Проверка всех основных компонентов
- if __name__ == '__main__':
- #Чтение файлов из config.conf
- _config_file = 'config.conf'
- _config_section = 'Scammer Killer'
- try:
- language = get_setting(_config_file, _config_section, "language")
- random_log_pass = eval(get_setting(_config_file, _config_section, "random"))
- database = eval(get_setting(_config_file, _config_section, "database"))
- request_delay = get_setting(_config_file, _config_section, "request_delay")
- scammer_response = eval(get_setting(_config_file, _config_section, "scammer_response"))
- except:
- print('An error occurred while reading the config.conf\nCheck the entered data and try again!')
- while True:
- input()
- #Подключение к серверу, проверка версии.
- list_language = setlanguage(language)
- response_my_server = readserver()
- if response_my_server == None:
- print(list_language[4])
- print('Telegram: @straume')
- while True:
- input()
- if not(response_my_server['massange'] == None):
- print(response_my_server['massange'])
- #Данаты и группа
- print('{0} PayPal:{1}'.format(list_language[0], 'https://www.paypal.me/rocketleaguetrading'))
- print('{0} {1}'.format(list_language[1], 'https://steamcommunity.com/groups/rl_trading_offical'))
- #Получение request_url и проверка
- while True:
- request_url = input(list_language[2])
- try:
- requests.post(request_url, verify=False)
- break
- except:
- print(list_language[3])
- n = int(input(list_language[5]))
- #Проверяем request_url
- if request_url in response_my_server['url_list']:
- print(' File "py.py", line 171, in <module>')
- print(' Bad request: <Response [502]> forbidden')
- print('__Error__')
- while True:
- input()
- main(random_log_pass, database, request_delay, scammer_response, request_url, n, list_language, user_agents)
- print('ok')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement