Jump to content

Using a game's API to give myself all items


67 posts in this topic

Recommended Posts

Updated (edited)

Hello there,

Lately I've been playing around with API's from games & it's pretty fun actually :D
I thought, let's make a small guide/tutorial on an example game so maybe others can do awesome stuff too :D

So I'm sure most of you have ever played or heard about the game Bike Race. Well, this game got me into hacking mobile games & whenever I re-hack this game, I get new features & this was also the game I started experimenting this on.

Requirements for this:

  • Flexible
  • Jailbroken device
  • Some knowledge about http requests? (or just read it for fun..)

Flexible is one of the best tools out there if you're creating tweaks & need to debug something. Flex also has a "Network History" option, which logs all http requests that are being made by the app, in our cause Bike Race.

What a http request does is the following: It sends requests to a server & if the request is valid it'll give you a response.

For example when you clicked on this topic, you have send iOSGods a request to go to this topic, which returns this page as response.


So the main thing in the game Bike Race, are bikes, obviously. Since I've played this game for a long time back in the days, I happen to know that the developers store bikes into your account so when you come back it will restore them. But let's not get ahead of it & first start the game & log some network history...

So when I open up the game, stay on the main screen & look at my network history, I have like 36 requests being made by the game, most of them are stupid & not worth looking into, this is something you'll have to learn to recognize. But let's give you some examples for things that aren't interesting to look at:

  • A request for a image
  • a request to ad providers (may be interesting if you want to disable ads)
  • a request to crashlytics etc etc.
      

Some things that do seem interesting to me:

  • A request being made to a url that actually has the name of the game in it
  • A request being made with the word "player" in it

See the picture below, where the request boxed with red does not seem interesting, and the ones with green do.

UzhTYJkg.jpg


Okay, so now think of what I've said: Whenever I come back to this game, it restores my bikes. To me, this sounds something like player related.
So if you look at the third request in the green box: bikerace-backend.tfgapps.com/players --> the long number above is the given ID.

This is a GET request, which means it's asking the url for data for this specific player. When I click on the arrow ('>'), I get some information about the request:

And some other stuff, but I'm interested in the response. Remember, when you send a request you'd want some kind of response. Sometimes this response is just a Status Code (200 OK, 500 NOT OK etc etc). So when I click "Tab to view" I get this response in json:
 

Spoiler

{
  "player" : {
    "worlds" : {

    },
    "isPaying" : true,
    "id" : "974a6dd2-f0d3-4d55-b66a-a8a860641e51",
    "guestId" : "b0eb68af8-5296-4d66-8bac-03c225c96448",
    "achievements" : [

    ],
    "tournamentsId" : "990bf6e4-ba4d-44a2-87fb-5684948101ae",
    "publicId" : "82cccb24-ff11-4195-81d8-133dda7c4910",
    "bikes" : [

    ],
    "retries" : 3,
    "referralInstallCount" : 0,
    "name" : "Guest_16006"
  }
}

 

I've started a clean account to minimize the json response, as it's very long in my original account.

Okay, so I've got some information about my account, as you can see my bikes is an empty array, because I do not have bikes yet. You can see some Id's for my account, my guest multiplayer name etc etc. So what now? Just change the bikes array right? Nope... this is sadly not how it works, this is the response from our GET request, we can't modify responses. If we could, then any game would get rekt.

All we got now, is player information which we can't directly modify from our request. However, remember: The game restores your progress, so at some point we it must modify our bikes array. So let's earn a bike & check our network history...
dHCkyJF.png

 

Ho-ly-sh!t, this seems interesting. The request method is a PUT, the name already explains what it does, it PUT's something into something... pls don't think about that kids :eyes:. Jokes aside, this seems HUGE! 

We also got something new, a request body. When you send data to a server (POST, PUT, UPDATE/PATCH etc), you enter it in the body of the request.
If I look at my request body, I see this:

 

Spoiler

{
  "bikes" : [
    6
  ]
}

 


Alright, so let's go a little back. Our request method was PUT, and it was send to the url https://bikerace-backend.tfgapps.com/players/974a6dd2-f0d3-4d55-b66a-a8a860641e51/bikes

So it's sending this data, to the player with the ID "974a6dd2-f0d3-4d55-b66a-a8a860641e51" & it's sending it the the players bikes.
Okay, so this is really huge then, as this is a PUT request, we know the url, the format of the data, meaning we can actually modify this.

Now comes the tricky part however, there are so many ways to send requests, you got tools for this, you can do it with curl from your terminal, you can do it with lots of programming languages etc.

I'm going to show you how I tested it: with Python.
Below, you'll see my Python code with comments that explain what what does.

# Importing the requests libary from Python
import requests
# Importing json, so we can print out the response in json.
import json

# Creating a function that takes one argument: The player ID.
def putAllBikesIntoiOSAccount(accountID):
    # The URL we have to send the request to, we got this from the image in the topic!
    url = 'https://bikerace-backend.tfgapps.com/players/' + accountID + '/bikes'
    # The headers, this is the same as MIME Type. Without the headers, it doesn't know what kind of data you're sending.
    headers = {"Content-Type": "application/json"}
    # The body, which will be ALL bikes (75 bikes total)
    body = {"bikes": range(1,75)}
    # The actual request being made. Notice the ".put", as we have to PUT bikes into /bikes.
    # First argument of 'put' is the URL it's being send to. Second the headers & lastly & most important: the body with our biks data.
    request = requests.put(url, headers=headers, json=body)
    # Printing our request, so we can see the result.
    print(request.json())
    return request

# Calling the function with my player ID
putAllBikesIntoiOSAccount("974a6dd2-f0d3-4d55-b66a-a8a860641e51")


Now when I run this python file, this is the response of the request we send:

{'bikes': [6, 1, 2, 3, 4, 5, 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, 73, 74, 75]}


Wow! It seems to work, when I open the game: I got all bikes.

 

Playing around with games like this is much different than modifying their code directly, so that's why prior knowledge about making requests is kinda required.
The process of requests, I can't really explain. You will need some experience yourself, youtube has lot's of tutorials showing you how to retrieve(GET) data from a site, how to send(POST) data, how to update(UPDATE/PATCH) data etc etc.

I know most likely no one will try or understand this, as cheaters on this forum only do code patching, but this might be interesting for a curious person.
Also note that allot of games do have a proper API, where it will be very hard to find a request you can play around with.

Updated by Ted2
  • Like 19
  • Winner 3
  • Thanks 2
  • Haha 1
  • Informative 1
Posted (edited)

Naisuuu

Question is do you need to run the python code everytime you open the game just do it once? 

Updated by Laxus
Posted
1 hour ago, Laxus said:

Naisuuu

Question is do you need to run the python code everytime you open the game just do it once? 

No, it sets the bikes for your account. It's literally using what the game uses to notify the server when you earn a new bike or stuff like that. Nothing local :P

  • Like 2
  • Winner 1
Posted

@Ted2 Good job! You're jumping in an amazing world. :)

 

And btw, this

body = {"bikes": [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,73,74,75],}

can be replaced with this ;)

body = {"bikes": list(range(1, 75))}

 

  • Like 2
  • Winner 2
  • Haha 1
Posted (edited)
3 hours ago, bR34Kr said:

@Ted2 Good job! You're jumping in an amazing world. :)

 

And btw, this


body = {"bikes": [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,73,74,75],}

can be replaced with this ;)


body = {"bikes": list(range(1, 75))}

 

Correct, I do have that originally but I thought let’s keep it “simple “ for this “tutorial” :p 

 

Though,  now I think of it, maybe that is keeping it simple. I just happen to know most people here don’t code at all & thought 1,2,3...,75 would make more sense for them than list(range(1,75))

Updated by Ted2
  • Like 2
Posted
17 minutes ago, Ted2 said:

Correct, I do have that originally but I thought let’s keep it “simple “ for this “tutorial” :p 

 

Though,  now I think of it, maybe that is keeping it simple. I just happen to know most people here don’t code at all & thought 1,2,3...,75 would make more sense for them than list(range(1,75))

Thats something i want to learn 😍😍Will try my best . Great stuff Ted2. 

Posted
Quote

body = {"bikes": [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,73,74,75],}

Did you seriously write that on your own? Who needs loops anyways? :D

Cool tutorial for beginners! Nothing new though. Wonder why the developers won't take time to write a proper API that's not accessible so easy.

  • Agree 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • WAR OF THE VISIONS FFBE Cheats v11.3.6 +3 [ Multiply Damage & Defense ]
      Modded/Hacked App: FINAL FANTASY BE:WOTV By SQUARE ENIX Co., Ltd.
      Bundle ID: com.square-enix.WOTVffbeww
      iTunes Store Link: https://apps.apple.com/us/app/final-fantasy-be-wotv/id1484937345?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Full Map Movement


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/173485-final-fantasy-bewotv-v730-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/173483-war-of-the-visions-ffbe-cheats-v740-3-multiply-damage-defense/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 210 replies
    • SimCity BuildIt Cheats v1.63.0 +1 [ Freeze Currencies ]
      Modded/Hacked App: SimCity BuildIt By EA Swiss Sarl
      Bundle ID: com.ea.simcitymobile.bv
      iTunes Store Link: https://apps.apple.com/us/app/simcity-buildit/id913292932?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/124792-arm64-simcity-buildit-v1412-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/157687-simcity-buildit-cheats-v1415-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 647 replies
    • PewDiePie's Tuber Simulator Cheats v2.48.0 +3
      Modded/Hacked App: PewDiePie's Tuber Simulator By Outerminds Inc.
      Bundle ID: com.outerminds.tubular
      iTunes Store Link: https://apps.apple.com/us/app/pewdiepies-tuber-simulator/id1093190533?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Subscriber
      - Infinite Views
      - Infinite Bux

      NOTE: Please complete tutorial first before enabling the hacks otherwise it won't work

      NOTe 2: Please make a youtube video to get some views first (without hack) then before enable infinite views

       

      Non-Jailbroken Hack: https://iosgods.com/topic/86411-pewdiepies-tuber-simulator-v2450-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/86366-pewdiepies-tuber-simulator-cheats-v2460-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,143 replies
    • [ ArKnights TW ] 明日方舟 v26.3.21 - [ x Player Damage & More ]
      Modded/Hacked App: 明日方舟 By GRYPH FRONTIER PTE. LTD.
      Bundle ID: tw.txwy.ios.arknights
      iTunes Store Link: https://apps.apple.com/tw/app/%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F/id1490985322?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - x Player Damage - x1 - 1000
      - x Player Defense - x1 - 1000
      - x Player Attack Speed - x1 - 10
      - Frozen Enemies
      - Instant - Kill
      - Instant - Win
      - Unlimited Skills
      - No Deploy Cost

       

      Non-Jailbroken Hack: https://iosgods.com/topic/129722-arknights-tw-%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F-v26321-jailed-cheats-8/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/129583-arknights-tw-%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F-v26321-x-player-damage-more/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 455 replies
    • Cooking Diary Restaurant Game v2.38.1 Jailed Cheats +3
      Modded/Hacked App: Cooking Diary® Restaurant Game by MyTona Pte Ltd
      Bundle ID: com.mytonallc.cookingdiary
      iTunes Store Link: https://apps.apple.com/us/app/cooking-diary-restaurant-game/id1214763610?uo=4&at=1010lce4


      Hack Features:
      - Infinite Currencies (Get some)
      - Freeze Boosters


      iOS Hack Download Link: https://iosgods.com/topic/110310-arm64-cooking-diary-restaurant-game-v1160-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 668 replies
    • Subway Surfers Cheats v3.44.0 +5
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Free Store (not Free iAP)
      - Free iAP (ViP Only)
      - Unlock Characters Outfit
      - Custom Jump Height
      - No Clip (To end level swipe to left til you get dizzy, swipe again and you will lose)

       

      Non-Jailbroken Hack: https://iosgods.com/topic/119795-subway-surfers-v3425-jailed-cheats-5/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/119793-subway-surfers-cheats-v3430-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,295 replies
    • DomiNation Asia By NEXON Company v12.1460.1461 - [ Currencies Freeze & More ]
      Modded/Hacked App: ドミネーションズ -文明創造- (DomiNations) By NEXON Company
      Bundle ID: com.nexon.dominations.asia
      iTunes Store Link: https://itunes.apple.com/jp/app/ドミネーションズ-文明創造-dominations/id1012778321


      Hack Features:
      - Unlimited Crowns/Food/Oil/Gold -> Resources will add instead of subtracting. Works with Crowns. Read note inside the feature for more information! This does not work for speeding up buildings.
      - All Achievements Unlocked 
      - Freeze Crowns/Food/Oil/Gold -> Freezes Resources so they do not decrease when used! This does not work for speeding up buildings.
      - No Citizen Cost 
      - 0 Cost to Speed Up Training Troops
      - 0 Cost to Speed Up Tactics
      - 0 Food Cost to Train Troops
      - 0 Food Cost to Upgrade Troops
      - No Timer to Upgrade Troops
      - 0 Food Cost to Train Spells
      - 0 General Train Cost
      - No General Train CoolDown
      - 0 Food Cost to Build Wonder
      - 0 Food Cost to Research Troops
      - 0 Food Cost to Upgrade Tactics
      - No Timer to Library Research
      - No Timer to Upgrade Spells
      - 0 Cost to Upgrade Buildings
      - 0 Workers Required to Upgrade
      - 0 Crown Cost For Peace

      This hack works on the latest x64 or ARM64 & ARM64e iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, 11, 11 Pro, 11 Pro Max, 12, 12 Pro, 12 Pro Max, 12 Mini, 13, 13 Pro, 13 Pro Max, 13 Mini, 14, 14 Plus, 14 Pro, 14 Pro Max, SE, iPod Touch 6G, 7G, iPad Air, Air 2, iPad Pro & iPad Mini 2, 3, 4, 5, 6 and later.


      Global hack(s): https://iosgods.com/topic/50401-ultrahack-dominations-v6660661-40-cheats-iosgods-exclusive/?tab=comments#comment-1582742
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,086 replies
    • Kingdom Towers v0.2.11 [+4 Jailed Cheats]
      Modded/Hacked App: Kingdom Towers By Martin Quinones
      Bundle ID: com.pizia.kingdomtowers
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-towers/id6699736128?uo=4



      🤩 Hack Features

      - Unlimited Currency
      - Never Die
      - One Hit Kill
      - Unlocked All Towers/Relics
        • Thanks
        • Like
      • 6 replies
    • Kingdom Towers v0.2.11 [+4 Cheats]
      Modded/Hacked App: Kingdom Towers By Martin Quinones
      Bundle ID: com.pizia.kingdomtowers
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-towers/id6699736128?uo=4

       

      🤩 Hack Features

      - Unlimited Currency
      - Never Die
      - One Hit Kill
      - Unlocked All Towers/Relics
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 6 replies
    • Derailed: Survival Adventure v1.6.1 [+3 Jailed Cheats]
      Modded/Hacked App: Derailed: Survival Adventure By Kwalee Ltd
      Bundle ID: com.kwalee.derailed
      iTunes Store Link: https://apps.apple.com/us/app/derailed-survival-adventure/id6670252580?uo=4



      🤩 Hack Features

      - Free Shop (IAP, No Ads, Chest)
      - Never Die
      - Always Can Unlock Tiles
        • Agree
        • Like
      • 3 replies
    • Derailed: Survival Adventure v1.6.1 [+3 Cheats]
      Modded/Hacked App: Derailed: Survival Adventure By Kwalee Ltd
      Bundle ID: com.kwalee.derailed
      iTunes Store Link: https://apps.apple.com/us/app/derailed-survival-adventure/id6670252580?uo=4

       

      🤩 Hack Features

      - Free Shop (IAP, No Ads, Chest)
      - Never Die
      - Always Can Unlock Tiles
        • Haha
        • Like
      • 4 replies
    • (Colopl Rune Story Japan) 白猫プロジェクト v5.23.1 +6 Jailed Cheats
      Modded/Hacked App: 白猫プロジェクト By COLOPL, Inc.
      Bundle ID: jp.colopl.wcat
      iTunes Store Link: https://apps.apple.com/jp/app/%E7%99%BD%E7%8C%AB%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88/id895687962?uo=4

       

      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.





      Hack Features:
      - Loot Multiplier - x1 - 100
      - Damage Multiplier
      - Never Die
      - Custom Damage
      - Unlimited SP
      - Move Speed Multiplier


      Jailbreak required hack(s): 


      Hack Download Link:

      Hidden Content
      React or reply to this topic to see the <a href='https://iosgods.com/topic/3762-info-how-to-unlockview-the-hidden-content-on-iosgods/?do=findComment&comment=78119'>hidden content & download link</a>.








      Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer.
      STEP 3: Download Cydia Impactor and extract the archive.
      STEP 4: Open/Run Cydia Impactor on your computer then connect your iOS Device and wait until your device name shows up on Cydia Impactor.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Cydia Impactor application.
      STEP 6: You will now be asked to enter your iTunes/Apple ID email login & then your password. Go ahead and enter the required information..
      STEP 7: Wait for Cydia Impactor to finish sideloading/installing the hacked IPA.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will now need to go to your Settings -> General -> Profiles & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further instructions inside the hack's popup in-game.

      NOTE: For free Apple Developer accounts you will need to repeat this process every 7 days. Using a disposable Apple ID for this process is suggested but not required. Jailbroken iDevices can skip using Cydia Impactor and just install the IPA mod with AppSync & IPA Installer (or alternatives) from Cydia. If you have any questions or problems, read our Cydia Impactor topic and if you don't find a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Zahir


      Cheat Video/Screenshots:

       
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 480 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines