[Information] Accessing and using the DEV console
It's gonna start coming up more often.
Accessing and using the DEV console Posted on: 04/21/2015 11:26pm
Quote Post

As HTML (JS) based games continue to grow in numbers so will hacks using the developer console. The issue is that most people don't know what the developer console is, or how to access it so when they see something like:
 

Open your console for this one boys.  MAKE SURE YOU TARGET THE IFRAME, or just open the frame in a new tab.  You could also play the game here : https://swarmsim.github.io/ and just import/export.

$('body').scope().game._units.byName.meat._addCount(99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999);

Boom, that's it. There's a few units I didn't find (the code name is probably different than the display name), but overmind6 is the top meat producing unit. You can hit things like larva, energy, etc by changing the bolded MEAT to the proper name.

To get a list of names, simply hit
$('body').scope().game._units.byName

 

You might not understand what he's talking about or where to input the code. This little guide will remedy this.

Accessing the console
If you are using firefox, chrome, or IE 11 you can simply press F12 and the developers console will pop up. If you are using Opera you need to do the following.

1. Access the file menu by click the little button in the top left of the window.

2. Click more tools.

3. From there you click 'Enable Developer Tools'

4. You can now access the Opera Dragonfly developer console by pressing ctrl + shift + i at the same time.

Selecting an Iframe
This is important, if you haven't selected the iframe the game is in hack WILL NOT work do to scope.

Chrome
It's right in the open


IE 11
Same as chrome, just to the right.


Opera
Litterally same as chrome


Firefox


Do you see it? No? Well that's because in Firefox you've gotta turn the button on.
1. Click the gear in the dev console.

2. Scroll down to the 'Available Toolbox Buttons' section and check 'Select an iframe as the currently targeted document.


3. Viola you can now select an iframe with Firefox


There you have it, that's how you open the dev console and select an iframe on the major browsers for the site!

Entering the JS
To use the Dev console you simply need to enter the javascript code/hack into the lower section as so...

Hit enter and if you're in the right iframe watch the hack work like a charm.

Stay curious my friends,
TLG (Galrick)




Billy-a-dick, billy-a-dick tic tac

RE: Accessing and using the DEV console Posted on: 04/22/2015 4:11am
Quote Post

Much appreciated. Do you have any tips for finding the correct iframe for the game? I've only used this a handful of times. How do you go about figuring what certain objects or items are labeled as? How do you know when you need to add that $body.scope$ jargon in the beginning as TIM did for the Swarm Simulator?

Thanks.




One night in Bangkok and the world's your oyster. The bars are temples but the pearls ain't free.

RE: Accessing and using the DEV console Posted on: 04/22/2015 5:15am
Quote Post
disgruntled old man

It's usually pretty obvious when you look in the dropdown list of iframes. There's a good chance "game" is going to be in there somewhere. If not, and you have trouble finding the right one, right click on the game and open the iframe in a new tab, then you won't have to worry about selecting it.

Regarding the certain objects/items, it's all in the code. An easy way to get that is to open the game iframe in a new tab, open the dev console and go to the network tab, and refresh the page. You'll see all of the js that the game uses in there. From there you just have to dig through it, follow the logic, and look for what you want to modify. Just a warning, the games that are created with construct 2 are a bitch...




New to Kong Hack and want to learn the basics? Check out the [Kong Hack 101] and the [Hacking 101].
Wanna learn how we make the hacks? Start with getting [the tools], then check these out: [AoB tutorial] | [.sol guide] | [Unity3d tutorial] | kadat's [video tutorials]
And if you don't already have it, check out the [Kong Hack Ultra Trainer]. You'll be glad you did!