mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Exrtact ZIP file with pure mIRC code #120435 17/05/05 05:40 PM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
Is it possible to extract a .ZIP file in pure mIRC script?

That is, Without using: COM, DLL, or any external program.... ? Is it hard?

Last edited by Biggles; 17/05/05 05:40 PM.
Re: Exrtact ZIP file with pure mIRC code #120436 17/05/05 06:06 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You need some form of extraction program (winzip/winrar for example). Those allow command-line extraction, so you can easily do it from within mIRC as long as one of those is installed.


Invision Support
#Invision on irc.irchighway.net
Re: Exrtact ZIP file with pure mIRC code #120437 17/05/05 06:10 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
It's possible, but it'd be far too slow to be of any practical use.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Exrtact ZIP file with pure mIRC code #120438 18/05/05 02:23 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
whats wrong with using an external program to do it? like ummm pkzip ?

Re: Exrtact ZIP file with pure mIRC code #120439 18/05/05 10:32 AM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
Ok hmm... Is there any other form of file/folder encryption that is much simpler than .zip then? This would be handling around 5mb file. And there would be folders and subfolders not just a single file here.

Really the objective for me, Is not to achieve a small compression, but merely to have the files and folders packaged into one single file, like a .zip, which I could extract with pure mIRC script.

Every time I type 'simple file compression' in google I get zip.

Edit: There is another criteria... The file packaging format must be reasonably popular, So that a user can package their files with a common windows or linux tool, and not with a mIRC script. So this rules out something like the 'vpak' script by variant. So we have compression with a 3rd party program, Decompression with pure mIRC script... But it's really about folder packaging not compression, I don't care if the end resulting file is a bit bigger than the original folder.

Re: Exrtact ZIP file with pure mIRC code #120440 18/05/05 11:24 AM
Joined: May 2005
Posts: 79
M
Mary_juana Offline
Babel fish
Offline
Babel fish
M
Joined: May 2005
Posts: 79
If he wanted to use an external program he would of done, why bother to go to the effort of creating a post which clearly states "mIRC script" sheesh mad

Re: Exrtact ZIP file with pure mIRC code #120441 18/05/05 01:04 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The point being that mIRC doesn't do compression. You need another program. Of course, you can always use any zip/rar program and make it create a self-extracting EXE. Then mIRC can simply run it.


Invision Support
#Invision on irc.irchighway.net
Re: Exrtact ZIP file with pure mIRC code #120442 18/05/05 01:51 PM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
You can script it in pure mIRC script, I know mIRC doesnt have zip functions. You can create a .ZIP file with the mIRC binary functions if you understand the gzip format. This is what I was getting at.

Anyway I'm past this now,... I've moved on I realise ZIP isn't suitable, I'm looking for a simple folder/file packaging solution which fulfills the criteria layed out in my previous post. Thanks all for you help.

Re: Exrtact ZIP file with pure mIRC code #120443 18/05/05 02:19 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
The zip file format [direct download link] isn't too complicated so parsing it shouldn't be a problem.
If you're saying it will be slow because zip files can get very large that's true for most applications.


New username: hixxy
Re: Exrtact ZIP file with pure mIRC code #120444 18/05/05 03:35 PM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
Quote:
The zip file format [direct download link] isn't too complicated so parsing it shouldn't be a problem.
If you're saying it will be slow because zip files can get very large that's true for most applications.


This sounds like it would make a good mirc scripting challenge on a website doesn't it, Too bad no websites do those anymore,

Re: Exrtact ZIP file with pure mIRC code #120445 18/05/05 03:36 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Some do.

Lack of participation == lack of wanting to start one. smirk

Regards,


Mentality/Chris
Re: Exrtact ZIP file with pure mIRC code #120446 18/05/05 04:12 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
If he wanted to use an external program he would of done, why bother to go to the effort of creating a post which clearly states "mIRC script" sheesh mad


At the time he had yet to make clear his full need, he could have simply had not known that pkzip can be run from command lines completely, no interface to deal with. Thus this direction of question can easily be an acceptable one. If someone had written a request that uses hashtables to store access levels, and you saw you can just assign ulevels to do the job, would it be wrong to say, even tho he said he wanted hashtables?

Even now with what he has said i cant really see a problem with using pkzip to do the job, just uses the zip file like a filesafe pass out each needed file, and pass in when finsihed with.

Re: Exrtact ZIP file with pure mIRC code #120447 18/05/05 06:14 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Parsing the format isn't the problem. The problem is actually doing something with what you're parsing. Zip files can contain encryption and various extensions, all of which would be far beyond what mIRC scripting could process in a remotely useful timescale. Even ignoring those extras, the basic decompression methods that aren't included as built-in mIRC identifiers (ie. those which don't use the standard DEFLATE algorithm) will be too slow to be useable.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Exrtact ZIP file with pure mIRC code #120448 18/05/05 06:22 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You're assuming that everyone has PKZip, which they don't. And AFAIK Winzip, which many more people would have (although by no means all), still doesn't include a decent command-line interface as standard.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Exrtact ZIP file with pure mIRC code #120449 18/05/05 08:05 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Decent or not, it has one and if the command is scripted into his script, a user doesn't have to figure it out.

Still, like I mentioned, the person doing the compression can also use command line on winrar/winzip to compress file(s) into a self-extracting exe and then the receiver can simply /run it. And, if there's an issue with not wanting to send exe files because some people block them, you can have the sender rename the file to some other extension and the receiver can rename it to exe and then run it.

Example:

User 1: /run rar as files.ext outputfile.exe

*Note that I am not positive on the "s" switch for creating SFX.

User 1 then sends the file to User 2

User 2: /run outputfile.exe

Done.


Invision Support
#Invision on irc.irchighway.net
Re: Exrtact ZIP file with pure mIRC code #120450 19/05/05 12:36 AM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
Well, I'm really not interested in any old way to unzip files otherwise I could use necromans DLL and not bother with 3rd party programs that may or may not be installed on the users machine...

I should of been clearer about this in my initial post..

I'm really interested in the 'art' of pure mIRC script and doing this just for the heck of it... There are many ways to achieve the objective of unpacking a file, I'm not looking for the best or most efficient method. I'm interested in doing it this specific way, with pure mIRC code, even though it has no advantages.

I'm going to be reading documents and trying to get my head around all of this binary stuff, Its a bit beyond me and seems daunting, but I might learn something..

Thanks all for your feedback.

Re: Exrtact ZIP file with pure mIRC code #120451 19/05/05 01:16 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Heh. Well, that *does* change things for how we might respond. laugh

If you're doing this to challenge your scripting abilities, have fun. I'll leave pouring over compression routines to others. I have no interest in learning to do that which is easily done using other methods. I'd rather learn to do something that can't easily be done any other way. Still, that's just me... I don't have a lot of patience. laugh


Invision Support
#Invision on irc.irchighway.net
Re: Exrtact ZIP file with pure mIRC code #120452 19/05/05 07:30 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Heh. Well, that *does* change things for how we might respond. laugh


Yes its a lot different with knowing hes after doing it for a challenge, I wouldnt have told him to use pkzip for a start, I cant amagine doing it in mirc script, I worked on a GIF compression/decompression code once becuase it was early days, before Jpeg really took hold, I didnt learn much about coding that time, but lernt that the people that think these compression schemes up must think on a whole differnt plane from the rest of us, i rember getting into it and thinking, omg whats this hashtable (not like mirc hashtables) with linked added results compounding to make the bitstream ment to mean ?!?!?!?!?!?! It made sence at the end, but i was like, who could have thought that up in there head?

Re: Exrtact ZIP file with pure mIRC code #120453 19/05/05 11:38 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
With this script you can create and unpack cabinet (.CAB) files, using a couple of executables that exist on every modern Windows system. I hope the script includes sufficient documentation. If it doesn't, please post your questions here and I will answer them later.

Re: Exrtact ZIP file with pure mIRC code #120454 19/05/05 01:04 PM
Joined: Aug 2004
Posts: 24
B
Biggles Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Aug 2004
Posts: 24
This script uses COM and windows scripting host.

I want this to work for people who might be using mIRC under WINE, I do sometimes. Well thats just an example, Even if COM and WSH worked under wine I still want the extraction... Which is the main part, to be done in pure mirc script. wink

That is a good script though and would be useful to many people, But still an external element is doing the extraction there.

Page 1 of 2 1 2