0BunnySenpai0 / ProdigyHacking--MobileHacking

Me and my team hack accounts for players of Prodigy Math Game that only have access to a mobile device/people who can't hack themselves.
https://prodigyhacking-mobilehacking.yolasite.com/
14 stars 12 forks source link

Hack account with discord bot #20

Closed hostedposted closed 3 years ago

hostedposted commented 3 years ago

I made a discord bot that can change the gold of a user, change the level of a user, give all pets to a user and give all items to a user.

You can test it here. It takes around 60 seconds to work. It sometimes crashes when multiple commands are used at once.

irhrhd commented 3 years ago

Hey Okay so Can i see the code by chance

SakuraKitsunee commented 3 years ago

@hostedposted i will check it out after school!

irhrhd commented 3 years ago

Also would you like to be a mod

SakuraKitsunee commented 3 years ago

hey hey hey

irhrhd commented 3 years ago

Yes

SakuraKitsunee commented 3 years ago

we need to interview first

irhrhd commented 3 years ago

Ohhh yeahhh

SakuraKitsunee commented 3 years ago

can you do it tho? I have to go and will be back in like 10

irhrhd commented 3 years ago

Yeah if hes good how do i add him mod

SakuraKitsunee commented 3 years ago

okay ask bout how good he is at coding and other questions like that, sound good?

SakuraKitsunee commented 3 years ago

well i have to go be back in 5-10 mins

irhrhd commented 3 years ago

Yeah and if hes good are you gonna add him or am i?

SakuraKitsunee commented 3 years ago

you can!

irhrhd commented 3 years ago

How idk how to

SakuraKitsunee commented 3 years ago

then i will

irhrhd commented 3 years ago

Can you tell me please

hostedposted commented 3 years ago

This is the code:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from discord.ext import commands
import time, os, discord, threading

client = commands.Bot(command_prefix='!')

@client.event
async def on_ready():
    print(f"Logged in as {client.user}")
    await client.change_presence(activity=discord.Game(
        name=f"{str(client.user).split('#')[0]} | !help"))

@client.event
async def on_message(message):
    if str(message.channel.type) != "private" and str(message.content).startswith("!"):
        await message.channel.send("Please DM the bot.")
    await client.process_commands(message)

def _gold(username, password, gold):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_extension("./extension (1).zip")
    chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
    #chrome_options.add_argument("--headless")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--no-sandbox")

    driver = webdriver.Chrome(options=chrome_options)

    driver.get('https://sso.prodigygame.com/game/login?rid=c5884060-d4c7-495d-a8b3-7658d7921a0d')
    driver.find_element_by_id("unauthenticated_game_login_form_username").send_keys(username)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(password)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(Keys.ENTER)
    time.sleep(30)
    print("Script!")
    driver.execute_script(f"""
_.player.data.gold = {gold}
""")
    time.sleep(5)
    driver.quit()

def _level(username, password, level):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_extension("./extension (1).zip")
    chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
    #chrome_options.add_argument("--headless")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--no-sandbox")

    driver = webdriver.Chrome(options=chrome_options)

    driver.get('https://sso.prodigygame.com/game/login?rid=c5884060-d4c7-495d-a8b3-7658d7921a0d')
    driver.find_element_by_id("unauthenticated_game_login_form_username").send_keys(username)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(password)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(Keys.ENTER)
    time.sleep(30)
    print("Script!")
    driver.execute_script(f"""
const i = {level} - 2;
// xpConstant from 3-16-1.js:8528
const xpConstant = 1.042;
_.player.data.stars = Math.round((1 - Math.pow(xpConstant, i)) / (1 - xpConstant) * 20 + 10);

_.player.data.level = +{level};
_.player.getLevel = () => _.player.data.level;
_.player.forceSaveCharacter()
""")
    time.sleep(5)
    driver.quit()

def _items(username, password):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_extension("./extension (1).zip")
    chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
    #chrome_options.add_argument("--headless")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--no-sandbox")

    driver = webdriver.Chrome(options=chrome_options)

    driver.get('https://sso.prodigygame.com/game/login?rid=c5884060-d4c7-495d-a8b3-7658d7921a0d')
    driver.find_element_by_id("unauthenticated_game_login_form_username").send_keys(username)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(password)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(Keys.ENTER)
    time.sleep(30)
    print("Script!")
    driver.execute_script("""
//> Item stacker hack
//>> Gives all armor, hats, boots, currencies, etc.
(() => {
    // FMI: every time prodigy patches, update scopeObj.
    const scopeObj = _.instance;
    const playerObject = _.player;

    // Do not modify.
    const bootData = scopeObj.game.state.states.Boot._gameData;
    const backpackData = playerObject.backpack.data;

    playerObject.data.gold = playerObject.data.stars = playerObject.data.bountyScore = playerObject.data.level = 1e69;

    // All equipment
    let categories = ["boots", "follow", "fossil", "hat", "key", "mathTownFrame", "mathTownInterior", "outfit", "relic", "spellRelic", "weapon"];
    for (let category of categories) {
        backpackData[category] = [];

        for (let item in bootData[category]) {
            backpackData[category][item] = {"ID": bootData[category][item].ID};
        }
    }

    // Special cases
    // Currency
    backpackData.currency = [];
    for (let i in bootData.currency) {
        backpackData.currency[i] = {"ID": bootData.currency[i].ID, "N": 99999999};
    }

    // All items
    backpackData.item=[];
    for (let i in bootData.item) {
        backpackData.item[i] = {"ID": bootData.item[i].ID, "N": 99999999};
    }

    // Furniture
    playerObject.house.data.items = []
    for (let i in bootData.dorm) {
        playerObject.house.data.items[bootData.dorm[i]["ID"]] = {A: [], N: 999};
    }

    // Remove bounty notes (#229)
    let bountyIndex = _.player.backpack.data.item.findIndex(v => v.ID === 84 || v.ID === 85 || v.ID === 86)
    while (bountyIndex > -1) _.player.backpack.data.item.splice(bountyIndex, 1)
})();
    """)
    time.sleep(5)
    driver.quit()

def _pets(username, password):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_extension("./extension (1).zip")
    chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--no-sandbox")

    driver = webdriver.Chrome(options=chrome_options)

    driver.get('https://sso.prodigygame.com/game/login?rid=c5884060-d4c7-495d-a8b3-7658d7921a0d')
    driver.find_element_by_id("unauthenticated_game_login_form_username").send_keys(username)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(password)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(Keys.ENTER)
    time.sleep(30)
    print("Script!")
    driver.find_element_by_id("menu-toggler").click()
    driver.find_element_by_xpath("/html/body/div[2]/div[1]/div[1]/div[4]/button[1]").click()
    time.sleep(5)
    driver.quit()

@client.command()
async def gold(ctx, username, password, gold):
    """
    Give user gold.
    """
    t = threading.Thread(name="Gold",target=_gold, args=(username, password, gold))
    t.start()
    t.join()
    await ctx.send(f"You now have {gold} gold.")

@client.command()
async def level(ctx, username, password, level):
    """
    Change user level.
    """
    t = threading.Thread(name="level",target=_level, args=(username, password, level))
    t.start()
    t.join()
    await ctx.send(f"You are now at level {level}.")

@client.command()
async def items(ctx, username, password):
    """
    Give user all items.
    """
    t = threading.Thread(name="Item",target=_items, args=(username, password))
    t.start()
    t.join()
    await ctx.send("You have all items.")

@client.command()
async def pets(ctx, username, password):
    """
    Give user all pets.
    """
    t = threading.Thread(name="Pets",target=_pets, args=(username, password))
    t.start()
    t.join()
    await ctx.send("You have all pets.")

class HelpCommand(commands.DefaultHelpCommand):
    async def send_pages(self):
        destination = self.context.author
        text = ""
        for page in self.paginator.pages:
            text += page
        await destination.send(text)

client.help_command = HelpCommand()

client.run("token")
hostedposted commented 3 years ago

I use selenium to go to the prodigy site login and then execute the javascript code.

irhrhd commented 3 years ago

Okay can you go into discussions and fill out the application for. Please for moderator

hostedposted commented 3 years ago

Ok.

irhrhd commented 3 years ago

Thank you

hostedposted commented 3 years ago

Let me know if you want me to add any hacks to the bot.

irhrhd commented 3 years ago

Did you get my invite?

hostedposted commented 3 years ago

Yes I accepted the invitation.

SakuraKitsunee commented 3 years ago

@hostedposted can you make this script for a school cheat menu maybe?

SakuraKitsunee commented 3 years ago

and if you can make it like wills cheat menu

hostedposted commented 3 years ago

I probably will not make a cheat menu, but if you want I could make a arena point farmer discord bot.

irhrhd commented 3 years ago

Yes please that would be great

irhrhd commented 3 years ago

Just tell me when you finished

SakuraKitsunee commented 3 years ago

@hostedposted i sent you a invite to the ProdigyMobileHaxs organization join it please!

SakuraKitsunee commented 3 years ago

@hostedposted

irhrhd commented 3 years ago

Lol

hostedposted commented 3 years ago

Just finished adding arena to the discord bot. Also @CRobbins0867 not going to join organization.

irhrhd commented 3 years ago

New coding pls

hostedposted commented 3 years ago

Just added one command other then the command same as the other code:

def _arena(username, password):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_extension("./extension (1).zip")
    chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
    #chrome_options.add_argument("--headless")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--no-sandbox")
    #chrome_options.add_extension('C:\\Users\\laure\\Downloads\\extension (1).zip')

    driver = webdriver.Chrome(options=chrome_options)

    driver.get('https://sso.prodigygame.com/game/login?rid=c5884060-d4c7-495d-a8b3-7658d7921a0d')
    driver.find_element_by_id("unauthenticated_game_login_form_username").send_keys(username)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(password)
    driver.find_element_by_id("unauthenticated_game_login_form_password").send_keys(Keys.ENTER)
    time.sleep(30)
    print("Script!")
    driver.execute_script("""
    _.constants.constants["GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS"] = 0;
    function parseJwt(token) {
    var base64Url = token.split('.')[1];
    var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
    var jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) {
        return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
    }).join(''));
    return JSON.parse(jsonPayload)
};

let userID = parseJwt(localStorage.JWT_TOKEN).content.userID
let arenaseason = await (await fetch(`https://api.prodigygame.com/leaderboard-api/user/${userID}/init?userID=${userID}`, {
    method: 'GET',
    credentials: 'same-origin',
    headers: {
        'Authorization': localStorage.JWT_TOKEN,
    },
})).json();
arenaseason = arenaseason.seasonID;
console.log("Good")
setInterval(_ => {
    fetch(("https://api.prodigygame.com/leaderboard-api/season/" + arenaseason + "/user/" + userID + "/pvp?userID=" + userID), {
        headers: {
            "authorization": localStorage.JWT_TOKEN,
            "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
            "sec-fetch-mode": "cors"
        },
        referrer: "https://play.prodigygame.com/",
        referrerPolicy: "no-referrer-when-downgrade",
        body: ("seasonID=" + arenaseason + "&action=win"),
        method: "POST",
        mode: "cors"
    }).then(v => v.text()).then(v => console.log(v))
}, 60500);
    """)
irhrhd commented 3 years ago

@hostedposted tell me if the DiscordHackingBot Code is right please

hostedposted commented 3 years ago

It is good.

irhrhd commented 3 years ago

Thank you

irhrhd commented 3 years ago

Hey could you fix the arena bot its not working for some reason

hostedposted commented 3 years ago

Shutdown the server. But you can use it your self if you want.

Just make a new server then go to this link: https://discord.com/api/oauth2/authorize?client_id=814513103467315262&permissions=2147941440&scope=bot and have the bot join your new server. Then you should be able to dm it again.

irhrhd commented 3 years ago

Thank you could you teach me how to code?

hostedposted commented 3 years ago

This website could help you: https://codecombat.com/. Also there are lots of different programming languages. Prodigy runs on JavaScript which is a .js file My discord bot is made in python which is .py. Python would be the best to learn if you are new to programming.

irhrhd commented 3 years ago

Oh okay i was trying to learn python and .js

hostedposted commented 3 years ago

Also if you are learning JavaScript you should know that JavaScript in the browser is different then node.js JavaScript.

irhrhd commented 3 years ago

Oh okay

irhrhd commented 3 years ago

@hostedposted can you add the epics and epics buddies to my account plesse

irhrhd commented 3 years ago

Hostedposted can you help me make a proxy