liuyuqi 2 years ago
parent
commit
cfd7d040c2

+ 8 - 35
README.md

@@ -1,40 +1,13 @@
-# Gmail-BOTV2
+# gmail_creator
 
 - Creator Gmail BOT Bypass OTP 😅☝️
 
-# Alat Perang 🚀
+## Develop
 
-- https://www.anaconda.com/products/distribution
-- Python 3xx
-- Google Chrome
+* 依赖Chrome,py38
+* 接码平台获取token
+```
+pip install requirements.txt
+python main.py
+```
 
-# Cara Pake 🎨
-
-- git clone https://github.com/tahaluindo/Gmail-BOTV2
-
-- cd Gmail-BOTV2
-
-- pip install requirements.txt
-
-- python main.py
-
-# Keterangan Setup 🤖
-
-- Perlu Di Perhatikan Di Bagian File Name Ini => https://github.com/tahaluindo/Gmail-BOTV2/blob/8040f15f3b1575840077f7427f9c82c99ff1ba28/proxy_config.py#L2
-
-- Ini Ganti Juga => https://github.com/tahaluindo/Gmail-BOTV2/blob/8040f15f3b1575840077f7427f9c82c99ff1ba28/main.py#L353
-
-- Sampai Ke Bawah 
-
-# NB 💡
-
-- Perlu Di Perhatikan Penggunan Script Ini
-
--  • Pastikan Internet Mu Kencang 😅
--  • Jika Modules Error Ketik Aja `pip install nama modulesnya` Oke Gaes
-
-# Working ON?
-
-- Android => RDP Client 👍
-- Windows => 10,11,12 ON 👍
-- Ubuntu => ON 👍

+ 1 - 2
config/config.yaml

@@ -3,6 +3,5 @@ settings:
   use_proxy: False
   proxy_protocol: "HTTP"
   account_count: 10
-  api_key: "2c7d78A5b57efdc4db82ff46283664AA"
   smsman_token: "7jum0G6_tqXLCIZoAbMo8luIh6HW2IgQ"
-  
+  smsactivate_token: "2c7d78A5b57efdc4db82ff46283664AA"

+ 0 - 1
gmail_creator/api.py

@@ -1,5 +1,4 @@
 
-
 # sms
 # host_sms_man = r"http://api.sms-man.com"
 host_sms_man = r"http://api.sms-man.ru"

+ 5 - 2
gmail_creator/gmail_creator.py

@@ -7,9 +7,8 @@ import sms_man_api
 
 LOG = logger('client')
 
-
 class GmailCreator:
-    ''' register client '''
+    ''' gmail account register client '''
 
     def __init__(self):
         ''' init data and iter '''
@@ -49,6 +48,9 @@ class GmailCreator:
             sms_man_api.set_status(request_id, 'reject')
             LOG.info(result)
             return result
+    def sms_activate(self):
+        ''' use sms-activate.org get sms code. '''
+        pass
 
     def reg(self, method, amount):
         ''' register google account 
@@ -58,6 +60,7 @@ class GmailCreator:
         LOG.info(method)
         methods = {
             'smsman': self.smsman,
+            'sms-activate': self.sms_activate
         }
         result = 0
         while result < amount:

+ 8 - 1
gmail_creator/igniter.py

@@ -1 +1,8 @@
-from src.snippets import CLI from urllib.request import urlopen import random, string, sys, threading from src.worker.generator import worker ua = open("./config/useragents.txt", "+r", encoding="utf-8").read().splitlines() def get_name(): x = urlopen("https://raw.githubusercontent.com/CryonicsX/SpotifyStreamBot/main/x.txt") a = x.read().splitlines() return random.choice(a).decode("utf-8") def get_random_string(length): # Letters and numbers pool = string.ascii_lowercase + string.digits return "".join(random.choice(pool) for _ in range(length)) class Igniter: def __init__(self, config, proxies = None) -> None: self.proxies = proxies self.config = config self.count = self.config["account_count"] self.thread = self.config["browser_thread"] self.remaining = self.config['account_count'] self.CLI = CLI(self.thread) if proxies: self.proxies = proxies[0] def thread_function(self, thread_id): while self.remaining > 0: full_name = [get_name(), get_name()] data = None data = worker(full_name, f"{full_name[0]}{full_name[1]}{random.randint(1,999)}", get_random_string(12), random.choice(ua), self.config["api_key"], self.CLI, thread_id, random.choice(self.proxies) if self.proxies else None).create_account() if data: self.remaining -= data else: pass for thread_id in range(0, self.thread): self.CLI.set(index=thread_id, status='Completed.') sys.exit() def thread_base(self): threads = [] for thread_id in range(0, self.thread): t = threading.Thread(target=self.thread_function, daemon=True, args=(thread_id,)) threads.append(t) t.start() for t in threads: t.join() def main(self): self.thread_base()
+from src.snippets import CLI 
+from urllib.request import urlopen 
+import random, string, sys, threading 
+from src.worker.generator import worker 
+
+ua = open("./config/useragents.txt", "+r", encoding="utf-8").read().splitlines()
+
+def get_name(): x = urlopen("https://raw.githubusercontent.com/CryonicsX/SpotifyStreamBot/main/x.txt") a = x.read().splitlines() return random.choice(a).decode("utf-8") def get_random_string(length): # Letters and numbers pool = string.ascii_lowercase + string.digits return "".join(random.choice(pool) for _ in range(length)) class Igniter: def __init__(self, config, proxies = None) -> None: self.proxies = proxies self.config = config self.count = self.config["account_count"] self.thread = self.config["browser_thread"] self.remaining = self.config['account_count'] self.CLI = CLI(self.thread) if proxies: self.proxies = proxies[0] def thread_function(self, thread_id): while self.remaining > 0: full_name = [get_name(), get_name()] data = None data = worker(full_name, f"{full_name[0]}{full_name[1]}{random.randint(1,999)}", get_random_string(12), random.choice(ua), self.config["api_key"], self.CLI, thread_id, random.choice(self.proxies) if self.proxies else None).create_account() if data: self.remaining -= data else: pass for thread_id in range(0, self.thread): self.CLI.set(index=thread_id, status='Completed.') sys.exit() def thread_base(self): threads = [] for thread_id in range(0, self.thread): t = threading.Thread(target=self.thread_function, daemon=True, args=(thread_id,)) threads.append(t) t.start() for t in threads: t.join() def main(self): self.thread_base()

+ 0 - 1
gmail_creator/logger.py

@@ -1,6 +1,5 @@
 import logging
 
-
 def logger(name, mode='w', file='log.log'):
     
     logger = logging.getLogger(name)

+ 11 - 2
gmail_creator/proxy_config.py

@@ -1,5 +1,14 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+'''
+@Contact :   liuyuqi.gov@msn.cn
+@Time    :   2023/04/17 22:54:28
+@License :   Copyright © 2017-2022 liuyuqi. All Rights Reserved.
+@Desc    :   proxy
+'''
+
 try:
-    with open(r'C:\Users\Gmail-BOTV2\proxies.txt', 'r') as file:
+    with open(r'config/proxies.txt', 'r') as file:
         proxy = [line.rstrip() for line in file.readlines()]
 except FileNotFoundError:
-    raise Exception('proxies.txt tidak ada.')
+    raise Exception('the proxies.txt file not found.')

+ 3 - 3
gmail_creator/sms_activate.py

@@ -1,18 +1,18 @@
 from configparser import ConfigParser
 
 import requests
-
+from gmail_creator import api
 
 class SmsActivate:
     ''' sms-activate.ru API'''
 
     __api_key = '2c7d78A5b57efdc4db82ff46283664AA'
-    __base_url = 'https://sms-activate.ru/stubs/handler_api.php'
+    __base_url = api.host_sms_activate + '/stubs/handler_api.php'
 
     def __init__(self):
         config = ConfigParser()
         config.read("config.ini")
-        __api_key = config['sms_man']['sms_man_token']
+        __api_key = config['settings']['smsactivate_token']
 
     def get_balance(self):
         ''' get balance '''

+ 45 - 46
gmail_creator/sms_man_api.py

@@ -5,62 +5,61 @@ from logger import logger
 import api
 
 class SmsMan(object):
-    
-    def __init__(self):
-        pass
-
-smsman_token = '7jum0G6_tqXLCIZoAbMo8luIh6HW2IgQ'
-LOGGER = logger('sms_man')
+    smsman_token = '7jum0G6_tqXLCIZoAbMo8luIh6HW2IgQ'
+    LOGGER = logger('sms_man')
 
-def balance():
-    result = requests.get(
-        api.host_sms_man + f'/control/get-balance?token={smsman_token}').json().get('balance')
-    return result
+    def __init__(self, token: str, logger:logger):
+        self.token = token
+        self.logger=logger
+    
+    def balance(self):
+        result= requests.get(api.host_sms_man + f'/control/get-balance?token={self.token}').json().get('balance')
+        return result
 
 
-def limits(country_id):
-    result = requests.get(api.host_sms_man + f'/stubs/handler_api.php?'
-                          f'action=getPrices'
-                          f'&api_key={smsman_token}'
-                          f'&country={country_id}').json()
-    LOGGER.info(result)
-    return result
+    def limits(self, country_id):
+        result = requests.get(api.host_sms_man + f'/stubs/handler_api.php?'
+                            f'action=getPrices'
+                            f'&api_key={self.token}'
+                            f'&country={country_id}').json()
+        self.LOGGER.info(result)
+        return result
 
 
-def get_number(country_id: int, application_id: str):
-    ''' sms-man api get phone number 
-    :param country_id: which country.
-    :param application_id: application id,for example: go.
-    :return: :class:`Response <Response>` object
-    :rtype: requests.Response
-    '''
-    result = requests.get(api.host_sms_man + f'/stubs/handler_api.php?action=getNumber&'
-                          f'api_key={smsman_token}&'
-                          f'service={application_id}&'
-                          f'country={country_id}')
-    return result
+    def get_number(self, country_id: int, application_id: str):
+        ''' sms-man api get phone number 
+        :param country_id: which country.
+        :param application_id: application id,for example: go.
+        :return: :class:`Response <Response>` object
+        :rtype: requests.Response
+        '''
+        result = requests.get(api.host_sms_man + f'/stubs/handler_api.php?action=getNumber&'
+                            f'api_key={self.token}&'
+                            f'service={application_id}&'
+                            f'country={country_id}')
+        return result
 
 
-def get_sms(request_id):
-    ''' get a sms phone number '''
-    result = requests.get(
-        api.host_sms_man + f'/control/get-sms?token={smsman_token}&request_id={request_id}').json()
-    return result
+    def get_sms(self, request_id):
+        ''' get a sms phone number '''
+        result = requests.get(
+            api.host_sms_man + f'/control/get-sms?token={self.token}&request_id={request_id}').json()
+        return result
 
 
-def set_status(request_id, status):
-    result = requests.get(
-        api.host_sms_man + f'/control/set-status?token={smsman_token}&request_id={request_id}&status={status}').json()
-    return result
+    def set_status(self, request_id, status):
+        result = requests.get(
+            api.host_sms_man + f'/control/set-status?token={self.token}&request_id={request_id}&status={status}').json()
+        return result
 
 
-def countries():
-    result = requests.get(
-        api.host_sms_man + f'/stubs/handler_api.php?action=getCountries&api_key={smsman_token}').json()
-    return result
+    def countries(self):
+        result = requests.get(
+            api.host_sms_man + f'/stubs/handler_api.php?action=getCountries&api_key={self.token}').json()
+        return result
 
 
-def applications():
-    result = requests.get(
-        api.host_sms_man + f'/control/applications?token={smsman_token}').json()
-    return result
+    def applications(self):
+        result = requests.get(
+            api.host_sms_man + f'/control/applications?token={self.token}').json()
+        return result