Skip to content

Commit

Permalink
GitHub checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mov-ebx committed Dec 23, 2022
1 parent c20583b commit 6bfcb60
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 26 deletions.
61 changes: 58 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
# username-checker
An open sourced username checker, built for multiple websites. Supports adding custom websites.
<div align="center">
<h1>Username checker</h1>
<img width="400" src="https://i.giphy.com/media/WJOq6yKop0A1y/giphy.gif">
<h3>Collection of username checkers for various platforms</h3>
<h5>[WARNING]<br>Using this without proxies will likely leave you ratelimited and possibly banned from using any of these services.</h5>

## the launcher is complete, however I am still yet to add the actual checkers and I also still haven't added a proper profesional readme
[![Python 3.10](https://img.shields.io/badge/Python-3.10-bluesvg)](https://www.python.org/download/releases/3.0/)
[![GitHub license](https://img.shields.io/badge/license-GPL%203.0-green)](./LICENSE)
<a href="https://github.com/mov-ebx">
<img src="https://gpvc.arturio.dev/mov-ebx">
</a>
</div>

## Star goals

5 :star: - Adding multi-threading

10 :star: - Improve speeds

## How do you use the checkers?

While you can use each checker indivdually in the [checkers directory](src/checkers/), the easiest way to use the checkers, is by using the launcher. The launcher is available in the [Releases](https://github.com/mov-ebx/username-checker/releases/latest) tab.

All you need is Python installed and the necessary [requirements](src/requirements.txt). I wrote the scripts in Python 3.10.6, so I'd recommend you [install that version](https://www.python.org/downloads/release/python-3106/). However, later versions should work too.

## How can I integrate the checkers in my projects?

You can easily integrate the checkers in your project, just make sure to follow the [license](LICENSE)!

Each script has a function inside of it called "run" which can be called with the necessary parameters.

Here's an example on how to integrate an example script in your project:

```py
import checkers.example
example.run(
"words.txt", # usernames list path
"proxies.txt" # proxies path (leave empty if no proxies)
)
```

## How do I use proxies in the checker?

In the same directory as the launcher, add a file named proxies.txt and format it like this:

```
type|type://host:port
```

an example is:

```
http|http://[redacted]:80
http|http://[redacted]:9992
http|http://[redacted]:80
https|https://[redacted]:8080
http|http://[redacted]:8085
http|http://[redacted]:3128
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0
0.1
3 changes: 2 additions & 1 deletion data/checkers.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"test.py":"0.0"
"custom.py":"0.1",
"GitHub.py":"0.1"
}
41 changes: 41 additions & 0 deletions src/checkers/GitHub.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

import requests, random

def run(usernames:str, proxies_path:str):
use_proxies = False if proxies_path == "" else True
usernames = open(usernames)
if use_proxies:
proxies = open(proxies_path)
continue_with = None
if use_proxies:
proxies_list = proxies.readlines()
valid = []
status = 404
for username in usernames:
username = username.strip('\n')
this_use_proxies = use_proxies
url = "https://github.com/"+username
try:
if use_proxies:
proxy = proxies_list[random.randint(0, len(proxies_list)-1)]
proxy = {proxy.split('|')[0]:proxy.split('|')[1].strip('\n')}
except:
if continue_with == None:
print("Failed to load a proxy. Perhaps your proxies.txt is empty?")
continue_with = False if input("Continue with proxies? (y/N): ").lower().startswith("n") else True
this_use_proxies = False
if continue_with == False:
continue
elif this_use_proxies:
r = requests.get(url, proxies=proxy)
if r.status_code == status:
valid.append(username)
else:
r = requests.get(url)
if r.status_code == status:
valid.append(username+'\n')
open('hits.txt','w').writelines(valid)
print('\nSaved valid usernames to hits.txt')
usernames.close()
if use_proxies:
proxies.close()
53 changes: 53 additions & 0 deletions src/checkers/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

import requests, random

def run(usernames:str, proxies_path:str):
use_proxies = False if proxies_path == "" else True
usernames = open(usernames)
if use_proxies:
proxies = open(proxies_path)

continue_with = None
if use_proxies:
proxies_list = proxies.readlines()
valid = []
print("\nwrite {[x]} for the username if needed")
url = input("API Endpoint: ")
data = input("Data (leave empty if empty): ")
status = int(input("Status code if valid: "))
for username in usernames:
username = username.strip('\n')
this_use_proxies = use_proxies
url = url.replace("{[x]}", username)
data = data.replace("{[x]}", username)
try:
if use_proxies:
proxy = proxies_list[random.randint(0, len(proxies_list)-1)]
proxy = {proxy.split('|')[0]:proxy.split('|')[1].strip('\n')}
except:
if continue_with == None:
print("Failed to load a proxy. Perhaps your proxies.txt is empty?")
continue_with = False if input("Continue with proxies? (y/N): ").lower().startswith("n") else True
this_use_proxies = False

if continue_with == False:
continue
elif this_use_proxies:
if data != "":
r = requests.get(url, data=data, proxies=proxy)
else:
r = requests.get(url, proxies=proxy)
if r.status_code == status:
valid.append(username)
else:
if data != "":
r = requests.get(url, data=data)
else:
r = requests.get(url)
if r.status_code == status:
valid.append(username+'\n')
open('hits.txt','w').writelines(valid)
print('\nSaved valid usernames to hits.txt')
usernames.close()
if use_proxies:
proxies.close()
10 changes: 0 additions & 10 deletions src/checkers/test.py

This file was deleted.

10 changes: 1 addition & 9 deletions src/launcher/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,8 @@ def download_presets():
else:
use_proxies = False
proxies_path = proxies_path if use_proxies else ""
try:
threads_count = int(input("\nThreads count (default 1): "))
if threads_count <= 0:
error('1')
except:
threads_count = 1
print("Defaulting to 1")
print("\nRunning "+checker[:-3]+"...")
#print(f"\n\nArgs (debug)\n Threads: {threads_count}\n Usernames: {username_path}\n Proxies: {proxies_path}\n")
__import__('checkers.'+checker[:-3], fromlist=[None]).run(threads_count, username_path, proxies_path)
__import__('checkers.'+checker[:-3], fromlist=[None]).run(usernames=username_path, proxies_path=proxies_path)
print("\nDone!\n")
except:
print("\nFailed.\n")
Expand Down
3 changes: 1 addition & 2 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
requests>=2.25.1
colorama>=0.4.4
colorama

0 comments on commit 6bfcb60

Please sign in to comment.