Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


HTML5 Hacking with the console

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Tue Aug 04, 2015 5:23 am    Post subject: HTML5 Hacking with the console Reply with quote

I'm trying to hack an HTML5 game using the console,here is a link to the game:

http://www.newgrounds.com/portal/view/660548

How can I call a function declared in Balls.js or NG.min.js?

Thanks for any help.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 61

Joined: 01 Oct 2008
Posts: 958

PostPosted: Tue Aug 04, 2015 5:58 am    Post subject: Reply with quote

Try change the window context to the game page with your target javascript.

pic for chrome.

For firefox, there is a js command cd function, but I forget how to operate it.

After context changed, js command will be act on that window frame,eg/

Code:
alert(window.document.body.innerHTML)



jschangeContext.jpg
 Description:
chrome
 Filesize:  123.24 KB
 Viewed:  35668 Time(s)

jschangeContext.jpg



_________________
- Retarded.
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Tue Aug 04, 2015 12:06 pm    Post subject: Reply with quote

panraven wrote:
Try change the window context to the game page with your target javascript.

pic for chrome.

For firefox, there is a js command cd function, but I forget how to operate it.

After context changed, js command will be act on that window frame,eg/

Code:
alert(window.document.body.innerHTML)


I use Firefox.
found this : https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Working_with_iframes

Tried all the 3 syntax forms,and nothing works (see in screenshot)
(NG is defined in NG.min.js)



iframe.png
 Description:
 Filesize:  16.7 KB
 Viewed:  35640 Time(s)

iframe.png


Back to top
View user's profile Send private message
JirkaCZS
How do I cheat?
Reputation: 0

Joined: 18 Jul 2015
Posts: 8

PostPosted: Wed Aug 12, 2015 3:26 pm    Post subject: Reply with quote

Hi,
I can't try it because I use chrome, but you tried run function NG, but you need cd("NG");.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 204

Joined: 25 Jan 2006
Posts: 8579
Location: 127.0.0.1

PostPosted: Wed Aug 12, 2015 4:21 pm    Post subject: Reply with quote

JirkaCZS wrote:
Hi,
I can't try it because I use chrome, but you tried run function NG, but you need cd("NG");.


Chrome has this feature as well. Hit F12 while viewing the page which will open the developer tools. The Javascript console can be found there as well as the html/css editor and some other goodies.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Fri Aug 14, 2015 3:40 pm    Post subject: Reply with quote

JirkaCZS wrote:
Hi,
I can't try it because I use chrome, but you tried run function NG, but you need cd("NG");.


NG is defined in NG.min.js as :
Code:
var NG = {};


(I am not really experienced with Javascript).
What should I do to have access to it from the console?

Thanks for your help.



sol.png
 Description:
 Filesize:  11.04 KB
 Viewed:  35353 Time(s)

sol.png


Back to top
View user's profile Send private message
JirkaCZS
How do I cheat?
Reputation: 0

Joined: 18 Jul 2015
Posts: 8

PostPosted: Sun Aug 16, 2015 5:59 am    Post subject: Reply with quote

I am not sure if it will work, but you can try copy javascript code to console and then you can run it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites