EvilZone

Programming and Scripting => Projects and Discussion => : Hydration September 17, 2012, 05:31:41 PM

: [Question] Text-Based Game
: Hydration September 17, 2012, 05:31:41 PM







Hello,


This title may be a bit misleading as I don't wish to create a text based game but for my beginner project I want to create the ability to 'cheat' in one.
Basically what I wish to do is create a program that has the ability to add resources without any effort.


For example:


[Wood: 500]


*open program*


Add Wood: *type amount of wood you wish to add*
Add Wood: 1500
*refresh webpage*


[Wood: 2000]


(I hope that example made some sort of sense)


Basically what I am asking is which language would be best to do something like this. The game I wish to do this with is called Raynia (http://rayniawars.com/). If you wish to help and need to see what the game is like use the username: Test and the password: Test


Thank you for any help in advance
: Re: [Question] Text-Based Game
: flowjob September 17, 2012, 05:36:28 PM
AFAIK,You'll have to find an exploit,make a Bufferoverflow and point at your function,wich adds e.g. wood,so it's the next one wich gets executed in the stack....
: Re: [Question] Text-Based Game
: Hydration September 17, 2012, 05:43:40 PM
So if it's buffer overflows I should be looking into c++ for this project?
: Re: [Question] Text-Based Game
: flowjob September 17, 2012, 06:11:11 PM
C,C++ something like that...

But it will require lots of time to learn the language,creating exploits,etc...
In the end it will not be worth the work...
: Re: [Question] Text-Based Game
: techb September 17, 2012, 11:25:08 PM
You can try fuzzing the input. Kinda like glitches you find in commercial games.
: Re: [Question] Text-Based Game
: Hydration September 18, 2012, 05:29:32 AM
It may not be worth it but I don't really want to hack the game to gain an advantage at all, I just wish to learn a language and put it to use. I wish to try and see what potential I have as a programmer and see if I have the will power to finish a project that may be a bit difficult them something a bit normal.


I don't really know much apart from java. Other then that I don't know a lot which is why I like this site, it has a lot of tutorials that are smooth and easy to follow
: Re: [Question] Text-Based Game
: Daemon September 18, 2012, 05:43:25 AM
If it's a web based game then you might want to look into how the webpage retrieves and adds the information. Most likely javascript or PHP, it could be as simple as messing with the clock to say that you've passed the correct amount of time (seen this done, don't remember where) or anything else really. First step though, i would say, is check the source and try to figure out how the webpage (and in what language) updates your stats
: Re: [Question] Text-Based Game
: Hydration September 18, 2012, 06:43:01 AM
I saw this

      <span class="return owntransport">One of your <a href='# (http://www.rayniawars.com/overview.php#)' onmouseover="return overlib('<table width=200><tr><td width=50% align=left><font color=white>Small Cargo:<font></td><td width=50% align=right><font color=white>5<font></td></tr><tr><td width=50% align=left><font color=white>Large Cargo:<font></td><td width=50% align=right><font color=white>2<font></td></tr></table>');" onmouseout="return nd();" class="owntransport">Fleets </a>returns from the world Kepler <a href="galaxy.php?mode=3&galaxy=1&system=472 (http://www.rayniawars.com/galaxy.php?mode=3&galaxy=1&system=472)" owntransport >[1:472:12]</a> and arrives at the planet Colony <a href="galaxy.php?mode=3&galaxy=1&system=472 (http://www.rayniawars.com/galaxy.php?mode=3&galaxy=1&system=472)" owntransport >[1:472:10]</a>. Current mission: <a href='# (http://www.rayniawars.com/overview.php#)' onmouseover="return overlib('<table width=200><tr><td width=50% align=left><font color=white>Metal<font></td><td width=50% align=right><font color=white>0<font></td></tr><tr><td width=50% align=left><font color=white>Crystal<font></td><td width=50% align=right><font color=white>0<font></td></tr><tr><td width=50% align=left><font color=white>Deuterium<font></td><td width=50% align=right><font color=white>74.978<font></td></tr></table>');" onmouseout="return nd();" class="owntransport">Transport</a></span>
</th>
I bolded where I thought it was important as it is stated that the code is written in javascript.

I'm not sure how it works, but I can ask someone on the games forum hopefully, just to get a bit of information.
   <script language="JavaScript">


: Re: [Question] Text-Based Game
: Hydration September 18, 2012, 06:49:11 AM
You can try fuzzing the input. Kinda like glitches you find in commercial games.


This sounds like a good idea, and I have looked into it. would it work with a text-based game?
: Re: [Question] Text-Based Game
: ande September 18, 2012, 04:03:51 PM
Since this is a web based game, you can look away from C/++ and overflows etc. These are application security flaws.

What you need to look at is web application security. And also, rayniawars is a crazy small game and are incredible buggy.

PS: The javascript stuff is probably not very interesting.
: Re: [Question] Text-Based Game
: TRAiN3R September 18, 2012, 07:05:02 PM
Well I'm not familar with the game or anything, but if its online, have you tried CheatEngine? My wife was really into Facebook and the Facebook games by Zanga and was able to cheat most of them with the help of CheatEngine searching for random bytes going in and out of the Web Browser... Might be a viable option

http://cheatengine.org/
: Re: [Question] Text-Based Game
: Hydration September 19, 2012, 04:02:27 AM
I tried using cheat engine, but it didn't work. I believe because most of it is server based.
So ande what would you suggest I use as a language?
: Re: [Question] Text-Based Game
: techb September 19, 2012, 12:30:19 PM
I tried using cheat engine, but it didn't work. I believe because most of it is server based.
So ande what would you suggest I use as a language?


Perl, PHP, or Python.
: Re: [Question] Text-Based Game
: Hydration September 19, 2012, 02:01:06 PM
Thank you very much :)
: Re: [Question] Text-Based Game
: ande September 20, 2012, 05:27:15 PM
Well I'm not familar with the game or anything, but if its online, have you tried CheatEngine? My wife was really into Facebook and the Facebook games by Zanga and was able to cheat most of them with the help of CheatEngine searching for random bytes going in and out of the Web Browser... Might be a viable option

http://cheatengine.org/

You have to learn the difference between server side and client side. Cheat engine will only work on client side.

I tried using cheat engine, but it didn't work. I believe because most of it is server based.
So ande what would you suggest I use as a language?

Not sure what you mean. What language to do what? The game is written in PHP and MySQL, so it might be a good idea to learn those to better understand how the game works and then look into web application vulnerabilities. Other than that, use any language you want..
: Re: [Question] Text-Based Game
: TRAiN3R September 20, 2012, 06:58:23 PM
You have to learn the difference between server side and client side. Cheat engine will only work on client side.

Well I believe facebook games are server side right? They are hosted on Zynga's servers and I was able to up the amount of money and products she had. What I would do is load up CheatEngine, Load the FireFox process, test different searches with the value of whatever I was looking for, so say I was looking to increase her gold, I would do my first search on the value, then either spend some or gain some, do another search, etc. Until I found the bytes I was looking for then either freeze it or change it. The only thing is every time you load the game they move so you werent able to save cheat tables like with a regular game, but it definitely worked for online games.
: Re: [Question] Text-Based Game
: ande September 22, 2012, 04:33:30 PM
Well I believe facebook games are server side right? They are hosted on Zynga's servers and I was able to up the amount of money and products she had. What I would do is load up CheatEngine, Load the FireFox process, test different searches with the value of whatever I was looking for, so say I was looking to increase her gold, I would do my first search on the value, then either spend some or gain some, do another search, etc. Until I found the bytes I was looking for then either freeze it or change it. The only thing is every time you load the game they move so you werent able to save cheat tables like with a regular game, but it definitely worked for online games.

Then I guess that was a flash game. You can modify the values in the flash game and the flash game will send information back to its database to update the values. However, you could have done this with something like tamper data as well.
: Re: [Question] Text-Based Game
: TRAiN3R September 22, 2012, 10:06:45 PM
Then I guess that was a flash game. You can modify the values in the flash game and the flash game will send information back to its database to update the values. However, you could have done this with something like tamper data as well.

You're right, it definetly was a flash based game. I completley forgot about Tamper Data. I remember back in the day you were able to modify paypal amounts and with automated systems you were able to receive products for pennies... Good times lol.
: Re: [Question] Text-Based Game
: ande September 24, 2012, 08:30:18 PM

You're right, it definetly was a flash based game. I completley forgot about Tamper Data. I remember back in the day you were able to modify paypal amounts and with automated systems you were able to receive products for pennies... Good times lol.

I think you still can, but most shops check the receipt now :P