[Help] Alright, So Let's Talk Javascript Console...
We gon' learn tonight!
Alright, So Let's Talk Javascript Console... Posted on: 03/04/2015 9:09am
Quote Post

What's good KH?

Before I really dove into the whole Cheat Engine and cheating every single online game I play entirely...

I would occasionally use the Developer Console to edit values, though my skill set and what I could do was extremely limited. I could only really do a number on basic flash games, but the fact that I could do it inspired me to do it.

Let's just throw some questions out on the table..

Is it possible to enhance my cheating experience further with the developer console in means of hitting values I can't quite touch with the Cheat Engine? I recently figured it out on Swarm Simulator, Thanks to TIM's Hack he had posted... But I had long forgotten the usefullness of this console.

How does a guy go about finding what the certain "names" are in editing? I've found some real easy ones by simply typing in "coins" or "exp" but editing it was very hit and miss.

Now don't knock me for not using the search bar.. I haven't gotten there yet.

Just wondering if a helpful kind individual could elaborate further, or at least point me in the right direction via a site with information or what have you.

Thank you all, Learn me up.




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

Ubi Maior Minor Cessat

javascript isn't my strong point, that being said a small note: values can be found for those games with cheat engine. The only thing is that probably as today nobody made good tools to help you do it(unlike flash)

You can look at the code of JavaScript games in your browser. Thats all you need, pretty much the same as with Flash games. Simply look over the code and try to find interesting functions/variables or use the search like you did. What a programmer named his variables like can be different on every game so you have to guess.

In the console you can then use whatever you found to change the game. You should even be able to change whole functions by simply saying foo = function() { //code here }




khwar.com
Never let a computer tell me shit.

typically, I find variable names by looking at the javascript code.




I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

TIM the Enchanter
Level: 1
ADR Info

Yup, look through JS code for functions/vars, or try blind hunting by typing "a", "b", etc. into the console to find all variables that start with that letter.  Case matters, so you'll also need "A", "B", etc.

There is no guide to using the console, since you're essentially scripting.  I did find this very shitty looking old ass "javascript primer" if you're interested: http://www.javascriptkit.com/javatutors/primer1.shtml





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

Well, that tutorial was useful. Now i know what all these word couples joined by a dot means :)

 




I have gone to find myself. If I return before I get back, please hold me here until I arrive.

Thank you all for inspiring me further. I'm definitely going to have to try this out. What window is best used for simply "viewing the code"?




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

TIM the Enchanter
Level: 1
ADR Info

object.property
object.method()
object.object.property
object.object.method()
object.object.object.property
object.object.object.method()

object.methodThatReturnsAnObject().property
object.methodThatReturnsAnObject().method()

You get the picture.  In PHP, we use $object->property, $object->method().  Most other languages use dot notation.





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

I recall seeing those, I'm going to give it a shot. Much thanks.




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

disgruntled old man
Klonopin Posted on: 03/04/2015 9:33pm

What window is best used for simply "viewing the code"?



If you're referring to the JS code, right click and view source (you may have to go to "This Frame" first, depending on the game.) You'll likely see a hyperlink to several .js files. Figure out which one it is and click it. It should show you the JS. If it's hard to read, try copying and pasting into something like JavaScript Beautifier.




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!
RE: Alright, So Let's Talk Javascript Console... Posted on: 03/06/2015 11:32am
Quote Post
Ubi Maior Minor Cessat
The Ignorant Masses Posted on: 03/04/2015 12:14pm

Yup, look through JS code for functions/vars, or try blind hunting by typing "a", "b", etc. into the console to find all variables that start with that letter.  Case matters, so you'll also need "A", "B", etc.

 


lol that's my ghetto way when the source is big and I am not inspired 

TIM the Enchanter
Level: 1
ADR Info

My favorite objects are chainable single objects.  That is, an object that has methods that return itself.

For example, when creating the menu...

$menuItem = $mainMenu->newItem(123);
$menuItem->setName('name');
$menuItem->setUrl('url');
$menuItem->setTarget('_blank');

While that's ok, it's kinda long, and if you have 3+ calls for each item, it's goanna get boring fast.  So, we make all menuItem's return themselves.

$mainMenu->newItem(123)->setName('name')->setUrl('url')->setTarget('_blank');

Just took 4 lines of code and dropped it down to 1.  Not only that, but we didn't need to make a $menuItem variable. :D

I want to do another PHP training sometime that goes over concepts like this.  I'd imaging you can do the same in JS, although I haven't done anything "advanced" enough in JS that would require creating my own objects with methods. :P
 





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

The Ignorant Masses Posted on: 03/06/2015 8:05am

I want to do another PHP training sometime that goes over concepts like this.  I'd imaging you can do the same in JS, although I haven't done anything "advanced" enough in JS that would require creating my own objects with methods. :P

jQuery uses it extensively.

TIM the Enchanter
Level: 1
ADR Info
KongregateHack Posted on: 03/06/2015 10:40am
The Ignorant Masses Posted on: 03/06/2015 8:05am

I want to do another PHP training sometime that goes over concepts like this.  I'd imaging you can do the same in JS, although I haven't done anything "advanced" enough in JS that would require creating my own objects with methods. :P

jQuery uses it extensively.


Yup, jQuery does.  I meant it more like I haven't built an object myself that does something like that. :P

$("#target").css("change","something").html("setSomeHTML").slideDown();

Do that kinda stuff all the time. 





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez