Need help about the 'Russian Dolls' challenge

DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Post by DaymItzJack »

I wouldn't of known what to do in the command prompt. I don't really want to discuss it too far in this thread, might reveal something.

However, with the program I was using, all I had to do was double click a thousand times.
yyiinn
Posts: 2
Joined: Thu Dec 17, 2009 11:13 pm

Post by yyiinn »

Cheers CodeX,

yeah would hav been on that one well into the new year without that!

nice one :))
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

You're welcome :D

On the Python size of things, Python does have a module to deal with the decompression and only needs one line to extract the contents of 1 file into another, although I haven't tried it I think it should work with this challenge, all you need is the source and target filename leaving out parameters to specify extraction or compression type as you might have in command line with something like 7zip but you do have to know the compression method to know which module to use (*nix file command or windows equivalent anyone?).
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

I'm new to bash scripting (which I guess is what your trying to imply) so would you be able to help recommend a way to start out or another method?

Thanks
There is no spoon.
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

you can use any scripting/programming language that supports system calls or that can extract compressed files, Python can do both of these easily and quickly. As for starting bash I'd say just google for a tutorial on it as there are some good ones
TechnoDemon
Posts: 20
Joined: Tue Apr 13, 2010 7:48 am
Location: Makassar, ID

Post by TechnoDemon »

@CodeX

do you mean this??

Code: Select all

#!/bin/bash
No Pain = Gain
That's how programmer develops...
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

not necessarily, I was just suggesting bash as a tool - not it's shebang
TechnoDemon
Posts: 20
Joined: Tue Apr 13, 2010 7:48 am
Location: Makassar, ID

Post by TechnoDemon »

:twisted:
Hehehe... i got it...
Now let's give it a try...
No Pain = Gain
That's how programmer develops...
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post by Masti6 »

Heya all! I'm starting to think that CodeX might be getting a little tired to see me post my questions on various forums but HERE IT GOES AGAIN! (Awesome song btw)
Anyways, I only know PHP language so far, and not even that well. I can do loops and if-else commands, but as for os commands, I know quite alot. But not even a single one to open 999 archieves. (unzip?).
Any tip for PHP or .bat files appreciated!
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post by Masti6 »

Just asking a random oracle would do the same thing?
Plus, asking "what does "..." mean" ain't leading anywhere.
Or is there a specific "Insert question here!" -box in addition to the normal search box?
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

Actually, if you have Mac OS it's trivial - otherwise I found bashing it worked.
There is no spoon.
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

if you can do OS commands (via command line, not point & click) then this should be trivial, assuming your on windows you could do this with a bath file (similar to bash). Command line allows you to explicitly do something such as extract doll.bin from doll.bin, all you have to do is figure some way of doing that maybe with something like a while loop (while the extracted file has extractable content). PHP can handle compressed files, you just need to look up/search for relevant functions, it might be a bit of a struggle if your not used to this kind of thing but if you keep thinking of things you need to do to get it done then you should manage in the end, I think it's very important to be efficient at researching functions/topics to be good at solving these problems and it's especially handy when your starting off with programming, otherwise you'll think the world is limited to control structures and printing trivial text/numbers.

Also if your having problems searching the forums using PHPBB2's built in search (which I never use) you should use google like so:
site:hacker.org some question or search content here
Google also has other things you can specify such as inurl: which can be useful if you only want certain things such as threads and not searches.
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post by Masti6 »

Thanks, I didn't solve it with PHP nor using only bath, but something in addition. Thanks for the directions!
JayArr
Posts: 8
Joined: Sat Oct 16, 2010 3:06 pm

Post by JayArr »

nice one. why don't ppl who want to learn programming just go here ^^
you got it all covered.
kordosoft
Posts: 5
Joined: Mon May 09, 2011 4:05 pm

Post by kordosoft »

lolex... this is a fat Russian doll(Girl). Hardest part was to find out the the compressor type used
kordosoft
Post Reply