Portal to the Future

Discussion of challenges you have already solved
Post Reply
quangntenemy
Posts: 8
Joined: Thu Jul 02, 2009 3:41 pm

Portal to the Future

Post by quangntenemy »

Well it was easy just edit the class version. Anyone solved it another way?
chephy
Posts: 17
Joined: Sat Oct 16, 2010 4:39 pm

Post by chephy »

Nope, did it just the same. I took longer than needed because I had recently switched to a new hex editor, and because not being used to it yet, unintentionally inserted another byte after the major version – shit happens…
magnus
Posts: 20
Joined: Thu Mar 05, 2009 2:29 pm

Post by magnus »

Did the same. Reengeneering with 'http://java.decompiler.free.fr/' did
not work for this class file. ( It worked for all the other class-files here -- hint !! )

Ok - all the other class-files i found so far.... ;-)
Last edited by magnus on Fri Mar 23, 2012 12:18 pm, edited 2 times in total.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

magnus wrote:Did the same. Reengeneering with 'http://java.decompiler.free.fr/' did
not work for this class file. ( It worked for all the other class-files here -- hint !! )
You probably did not solve enough challenges to be able to speak about "all the other" java classes :lol: There are java programs here that resist any decompiler :evil:
tchakkazulu
Posts: 1
Joined: Sat Oct 27, 2012 4:38 pm

Post by tchakkazulu »

Oh, right. Modifying the major version. That's a thing I could've done instead.

I pulled it through a decompiler, which couldn't make sense of the main routine used to calculate the answer. So I hand-decoded the bytecode for that one method. Then a couple of constants were missing (35 and 85), so I hand-decoded the constants table as well. I worked the loop back in, and then rewrote the assignments to refer to the 0xFFFF0000 bytes and the 0x0000FFFF bytes explicitly. This removed some variable dependencies, and the entire loop body was then of the form "result = result + blahblahblah", independent of the looping variable. So that's a multiplication. The result of the program was simple enough to do by calculator as well.

Should've modified the major version. Still, diving into the class file has been educational, so it wasn't a complete waste of time.
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

Much easier when one already did a lot of work on PP4 ;)
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

Hippo wrote:Much easier when one already did a lot of work on PP4
What's a PP4?
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

AMindForeverVoyaging wrote:
Hippo wrote:Much easier when one already did a lot of work on PP4
What's a PP4?
Protected password 4.
Post Reply