GithubHelp home page GithubHelp logo

ugc-sniper's Introduction

ugc-sniper's People

Contributors

efenatuyo avatar luuccss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ugc-sniper's Issues

The bot won't buy the items

I put in the ID of a limited item but the bot won't buy it, I tried it on a free item(not limited) it still wouldn't buy

Wdym aiohttp dosent support proxies?

Idk what i did but this definitly works if you put it in a directory with a notepad file called "proxylist"

I have zero knowledge of python so if misunderstood and this still wont work with the remaining code then am sorry i only know LUA, #this did work tho and it printed out the working proxies i just dont know how to implement it in your code

import datetime
import json
import os
import uuid
import asyncio
import random
import requests
import configparser
from colorama import Fore, Back, Style
import aiohttp

config = configparser.ConfigParser()
config.read('config.ini')

class Sniper:
def init(self) -> None:
self.webhookEnabled = False if not "configWebhook" in config or not bool(config["configWebhook"]["enabled"] == "on") else True
self.webhookUrl = config["configWebhook"]["webhook"] if self.webhookEnabled else None
self.accounts = None
self.items = self._load_items()
self.title = (""" PROXY CHECKER - ZAID""")
self.checks = 0
self.buys = 0
self.request_method = 2
self.total_ratelimits = 0
self.last_time = 0
self.errors = 0
self.clear = "cls" if os.name == 'nt' else "clear"
self.version = "6.0.0"
self.task = None
self.scraped_ids = []
self.latest_free_item = {}
self._setup_accounts()

def _load_items(self):
    pass

def _setup_accounts(self):
    pass

async def start(self):
    pass

async def check_version(self):
    pass

def _print_stats(self):
    pass

async def check(self, proxy):
   async with aiohttp.ClientSession() as session:
    try:
        async with session.get('http://httpbin.org/ip', proxy=f'http://{proxy}', timeout=aiohttp.ClientTimeout(total=2), ssl = False) as resp:
            if resp.status == 200:
                data = await resp.json()
                self.workingProxies.append(proxy)
                print(f"Proxy {proxy} is working. IP: {data['origin']}")
                return
    except aiohttp.client_exceptions.ServerDisconnectedError:
        print(f"Server disconnected while checking proxy {proxy}. Moving on to next proxy.")
        return
    except aiohttp.client_exceptions.ClientOSError:
        print(f"Server disconnected while checking proxy {proxy}. Moving on to next proxy.")
        return
    except aiohttp.client_exceptions.TooManyRedirects:
        print(f"Server disconnected while checking proxy {proxy}. Moving on to next proxy.")
        return
    except asyncio.TimeoutError:
        print(f"Timeout while checking proxy {proxy}. Moving on to next proxy.")
        return

def get_working_proxy(self):
    if len(self.workingProxies) != 0:
        proxy = random.choice(self.workingProxies)
        return f"http://{proxy}"
    else:
        return None

async def start_proxy(self):
    self.status = "Proxy checker"
    self._print_stats()
    coroutines = []
    for proxy in self.proxylist:
        coroutines.append(self.check(proxy))
    await asyncio.gather(*coroutines)

s = Sniper()
s.proxylist = open("proxylist.txt").read().splitlines()
s.workingProxies = []
asyncio.run(s.start_proxy())
print(s.workingProxies)

#proof I guess?
https://user-images.githubusercontent.com/130939501/232350368-76241fd1-2274-4cfc-a9b8-76364042523a.mp4

Ratelimits

After five minutes of running 7.1.0 and trying to get newest limiteds, it gave me ratelimits each time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.