News for hackers. Stuff that matters.
Re:Haxing Minesweeper by szemet on Sunday April 08, 2018 @10:14AM (#16786147)
On Windows XP we still had xyzzy[1]. I had so much fun that time in school, claiming that I had psychic powers of seeing through the minesweeper table... ;)

[1] https://en.wikipedia.org/wiki/Xyzzy_(computing)#Other_comput...

edit: The article links the original WinXP binary, and the cheat still works, even with wine ( https://www.winehq.org/ ) ;)

Re:Haxing Minesweeper by muterad_murilax on Sunday April 08, 2018 @06:07AM (#16785447)
In case anyone else is wondering, the debugger used is OllyDbg [0].

[0] http://www.ollydbg.de/

Re:Haxing Minesweeper by dmitriid on Sunday April 08, 2018 @06:18AM (#16785466)
In Win2000 you could read from and write to memory of any app [1]. Which we did for minesweeper. By setting proper values and forcing the window to repaint we implemented a simple snake game. The body of the snake consisted of bombs and "fruit" you had to eat were flags. I don't remember how we captured keyboard input though.

[1] If your app had admin rights IIRC

Re:Haxing Minesweeper by unrealhoang on Sunday April 08, 2018 @08:12AM (#16785788)
There were GameHack and ArtMoney, they allow you to track memory address for specific value in game (gold, money, scores...) by input the value before and after changing it, and then allow to change the value at that address.
Re:Haxing Minesweeper by dmitriid on Sunday April 08, 2018 @08:40AM (#16785857)
A modern version of these tools is Cheat Engine, which is brilliant: http://www.cheatengine.org
Re:Haxing Minesweeper by xenophonf on Sunday April 08, 2018 @09:40AM (#16786032)
Watch out for the adware bundled into its installers, though. :(
Re:Haxing Minesweeper by Andoryuuta on Sunday April 08, 2018 @03:27PM (#16787827)
Yeah.

There is a link on the download page to a zip of the files, without an installer (or the installCore adware/bundleware).

>"For those that want to have Cheat engine without automated installer and installCore recommendation during installation, click here"

Re:Haxing Minesweeper by xenophonf on Monday April 09, 2018 @08:22AM (#16792339)
To be honest, that's not really acceptable.

We as a community should be pushing back hard against open source developers who want to monetize their work with malware. There are better ways for them to make money from their work than something that's ethically dubious at best.

Re:Haxing Minesweeper by CodeArtisan on Sunday April 08, 2018 @09:24AM (#16785977)
I once wrote a tool like that but for gnu+linux. You first have to retrieve the memory mapping of the targeted process by reading /proc/<PID>/maps [1] then use process_vm_read/write[2]

[1] http://man7.org/linux/man-pages/man5/proc.5.html

[2] http://man7.org/linux/man-pages/man2/process_vm_readv.2.html

Re:Haxing Minesweeper by gruez on Sunday April 08, 2018 @12:21PM (#16786811)
>[1] If your app had admin rights IIRC

only if it's a different user. you can read/write to your own processes without admin

Re:Haxing Minesweeper by foxhop on Sunday April 08, 2018 @08:49AM (#16785879)
I remember when my buddy Charles hacked minesweeper for fun and learning. I thought it was so cool. He wrote about it here if you are looking for another reference point: http://www.charleshooper.net/blog/minesweeper-hacking-viewin...
Re:Haxing Minesweeper by Rjevski on Sunday April 08, 2018 @09:34AM (#16786013)
I always thought Minesweeper would compute the minefield dynamically as you played instead of generating a fixed map of the minefield at the beginning of the game.
Re:Haxing Minesweeper by rashkov on Sunday April 08, 2018 @10:49AM (#16786313)
There is one place where it's dynamic, which is that if your very first click is on a mine, then it'll relocate it to the upper-left corner (or the next available spot).
Re:Haxing Minesweeper by Spare_account on Sunday April 08, 2018 @12:26PM (#16786839)
I'm now questioning my memory because I'm convinced I have hit a mine on the first click before ...
Re:Haxing Minesweeper by davvolun on Monday April 09, 2018 @11:14AM (#16793654)
Maybe a clone?
Re:Haxing Minesweeper by ATsch on Sunday April 08, 2018 @11:00AM (#16786400)
I'm surprised it's done this way... I'd expect that it just doesn't generate the mines until the first click.
Re:Haxing Minesweeper by ronilan on Sunday April 08, 2018 @11:49AM (#16786638)
Nice.

I once wrote a “clone”[1] and when someone here pointed out the “first click is safe” feature, I implemented it by putting the reshuffle inside a while. Never thought of the first click as being “pre game”...

[1] https://www.ronilan.com/bugsweeper/

Re:Haxing Minesweeper by Zarel on Sunday April 08, 2018 @06:21PM (#16788818)
Modern versions of Minesweeper actually makes it so nothing _around_ your first click is a mine, so you always reveal more than one square.

https://guangcongluo.com/dminer/

is a version I wrote while trying to teach myself React.

Re:Haxing Minesweeper by monochromatic on Sunday April 08, 2018 @09:55AM (#16786074)
There’s the possibility of painting yourself into a corner (generating an inconsistent board) if you do it on the fly. It could be done, but it’s probably just simpler to generate it at the outset and then do lookups.

edit: unless you just meant that the adjacency numbers could be generated on the fly, in which case painting yourself into a corner isn’t a concern

Re:Haxing Minesweeper by murkle on Sunday April 08, 2018 @12:32PM (#16786874)
Do you mean something like this? (so you can always work out something logically ie no guessing) https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mine...
Re:Haxing Minesweeper by plastroltech on Monday April 09, 2018 @06:30PM (#16797541)
The fact that it doesn't can be exploited by running it in a virtual machine and using the snapshot feature to go back in time. That's how we made this Website is Down video: https://www.youtube.com/watch?v=1SNxaJlicEU