Author Topic: Fix downloaded files that are the wrong mimetype  (Read 11216 times)

Offline Chargers

  • Newbie
  • *
  • Posts: 25
    • View Profile
  • Rated:
Fix downloaded files that are the wrong mimetype
« on: February 03, 2012, 11:14:09 PM »
Does anyone know how to fix files that are downloaded with a web browser and interpreted as the wrong mimetype?
I have some files that are saved as html files, but are really binary.  The data is there; it is formatted wrong.... like it is on the wrong boundary or something....

and no, I can't download them correctly, they are not online anymore.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #1 on: June 01, 2012, 09:47:25 AM »
mime-type doesn't matter.

mime-type is an HTTP-header content-type

some web servers might not serve files if there's no mime type for resource.extension, but if you got the file, you have the file, just open it in whatever program.  the mime-type is used for like: resource is text/html, display in browser, resource is video/mp4, open with browser helper object X.  you could always just open the video in a video player if the mime-type was wrong.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline Chargers

  • Newbie
  • *
  • Posts: 25
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #2 on: June 04, 2012, 10:27:10 PM »
I appreciate the input, but unfortunately, that is not true.
I actually happen to have an example file that has been correctly downloaded as well as an incorrectly downloaded version of the same file.  So it is easy to see the differences.


Code: [Select]
vi ascii display of binary data:

corrupted:
PK^C^D^T^H$qA)»½ý>^^^[^A6<95>^C VAP_SIN2.DM2Äýks^\G<96>® ®¸Ì$^E<96>*K U<91>ê^Vö^^`,°·<94>C<85>µ<9d>^?5¿q>Í×^P-©9
;ÂÞCíSdµP])^USb&<81>rü}×ëqË^DHU÷Ø<81><95>øÔò<88><8c><8b><87>_<96>/_¾üÿ<99>'Ib<96>^XþÍmb^_ó<97>÷þ^?iÛ4'óÔe<93>¼måÈ?<89>åoå^S¿^^Yܦe
Þ¤e^A6âûÀ<ð×À£Àuà £À«Àià uà <81>ÿÎlÈY¸G±Mç^SÈ^FÙi=ö<9f><83>éc<86>ãµx¢óË>qÞV¼ÑûE9
ϱÁs<84>ç}<8e>ëlÒ²Ò{U}9òªc­|¨oü}êkQé<95>çÛyåÏ7^W+ñ!<99>+ý^AÏ<9f>^W<87>bN<9e><8b>ó"Óu^R1KËK¤§iÙxzÌ<8f><93>
Ýï<8d>òE÷+<97>:Oés<9d>^WÞßù|t~Ì×úWñ]Âß×7 <9e>'^\Ï\^F­Ç^[q<9d>ÍÉ<95>ÎÛ<84>ß<81>W<89>^_ß<8a><96>è¾<99><98>èy^S½<97>ßÏ
çü^]ß<9b>×^A^[=<97>éú8<8f>ùE<96>=ÃŽ<8b>^CòÜó;9)¦ä<99>Ã’OÀðûÏÅÇäUrM6IÅû[ráï<9f>,^Cçá¹<96><96>âù²uíϹ®s<94>¿<84>rà Rò<8f>õ<81><98>+Ý<8f>¯<8a>4^C«"Éæ¤Qn<82>ÌëÃ
Î<91>O<81><97>Kg%¾xãü¶R:¹íø^]~ï2ÉëÝv

uncorrupted:
PK^C^D^T^@^@^@^H^@$qA)»½ý>^^^[^A^@6<95>^C^@^L^@^@^@VAP_SIN2.DM2Äýks^\G<96>®^K®¸^@ÃŒ$^E<96>*K^MU<91>ê^Vö^^`,°·<94>C<85>µ<9d>^?5¿q>Í×^P-©9^L;ÂÞCíSdµP])^USb&<81>^@rü}×ëqË^DHU   [etc.]


od -c | sdiff output of first 8 lines:

0000000   P   K 003 004 024  \b   $   q   A   ) 273 275 375   | 0000000   P   K 003 004 024  \0  \0  \0  \b  \0   $   q   A 
0000020 001   6 225 003       V   A   P   _   S   I   N   2   | 0000020 375   > 036 033 001  \0   6 225 003  \0  \f  \0  \0 
0000040   P 304 375   k   s 034   G 226 256     256 270 314   | 0000040   P   _   S   I   N   2   .   D   M   2 304 375   k 
0000060   *   K       U 221 352 026 366 036   `   , 260 267 2 | 0000060 226 256  \v 256 270  \0 314   $ 005 226   *   K  \r 
0000100 265 235 177   5 277   q   > 315 327 020   - 251   9   | 0000100 026 366 036   `   , 260 267 224   C 205 265 235 177 
0000120   ; 302 336   C 355   S   d 265   P   ]   ) 025   S   | 0000120   > 315 327 020   - 251   9  \f   ; 302 336   C 355 
0000140   r 374   } 327 353   q 313 004   H   U 367 330 201 2 | 0000140   P   ]   ) 025   S   b   & 201  \0   r 374   } 327 3
0000160 362 210 214 213 207   _ 226   /   _ 276 374 377 231   | 0000160 004   H   U 367 330 201 225 370 324 362 210 214 213 2


As you can see, the non-null/zero, non-LF data is present in both.  But there is padded data and linefeeds and such that is missing/added in the bad one.
The browser(Netscape4.72) incorrectly downloaded them as the wrong mime type.  base16(?) or 8-bit non-uuencoded(?) instead of base64. ???
People with a very small amount of file-handing experience will quickly notice that this is a pkzip compressed file.

I have no idea how to re-decode/encode this to be correct.  Every mention of this issue that I can find simply says how to fix the browser settings to re-download it.... not how to fix the corrupted file.


[Edit by Admin: truncated very long line, as it kills my ability to read the forum in recent posts mode.]
« Last Edit: June 05, 2012, 12:07:05 AM by Admin »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #3 on: June 05, 2012, 12:14:50 AM »
I have no idea how to re-decode/encode this to be correct.  Every mention of this issue that I can find simply says how to fix the browser settings to re-download it.... not how to fix the corrupted file.

Unfortunately, once those bytes have been stripped, information has been lost in a way that won't be recoverable algorithmically.


N.B. `hexdump -C` produces an alternate format that is also nice for viewing mixed ascii/binary data.


Regards,

quadz

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #4 on: June 06, 2012, 05:44:40 PM »
The server is not sending the browser anything different, although HTTP will allow compression.  Netscape probably did something to it, but I don't think other browsers would.  Let's see the hex representation, and figure out what it did.

Is that the whole file?  I don't see 273 at a different location in the "failed" file.
« Last Edit: June 06, 2012, 05:52:32 PM by reaper »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #5 on: June 06, 2012, 06:24:06 PM »
Let's see the hex representation, and figure out what it did.

Is that the whole file?  I don't see 273 at a different location in the "failed" file.

He said it's the first 8 lines of the diff, however what may not be obvious is that the rows also truncated when sdiff put them side by side.

We can tell by the offsets it's dumping 32 bytes per line, though we're only seeing about 13 of those 32 bytes per line.

But in any case, it's clear that nulls and apparently most of the control characters apart from (surprisingly) \b {backspace} are being stripped:


0000000   P   K 003 004 024  \b   $   q   A   ) 273 275 375   |   0000000   P   K 003 004 024  \0  \0  \0  \b  \0   $   q   A 
0000020 001   6 225 003       V   A   P   _   S   I   N   2   |   0000020 375   > 036 033 001  \0   6 225 003  \0  \f  \0  \0 
0000040   P 304 375   k   s 034   G 226 256     256 270 314   |   0000040   P   _   S   I   N   2   .   D   M   2 304 375   k 
0000060   *   K       U 221 352 026 366 036   `   , 260 267 2 |   0000060 226 256  \v 256 270  \0 314   $ 005 226   *   K  \r 
0000100 265 235 177   5 277   q   > 315 327 020   - 251   9   |   0000100 026 366 036   `   , 260 267 224   C 205 265 235 177 
0000120   ; 302 336   C 355   S   d 265   P   ]   ) 025   S   |   0000120   > 315 327 020   - 251   9  \f   ; 302 336   C 355 
0000140   r 374   } 327 353   q 313 004   H   U 367 330 201 2 |   0000140   P   ]   ) 025   S   b   & 201  \0   r 374   } 327 3
0000160 362 210 214 213 207   _ 226   /   _ 276 374 377 231   |   0000160 004   H   U 367 330 201 225 370 324 362 210 214 213 2



No way in hell that's recoverable...

 :(
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline yahoo

  • Opulent Member
  • *
  • Posts: 2290
  • Quake II | Powered by SMF 1.0.9.
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #6 on: June 06, 2012, 06:39:16 PM »
im just curious.

can you edit a binary file using a hex editor and perhaps supply, change if not supply any missing varioables it may have?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Quake II | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #7 on: June 06, 2012, 06:53:54 PM »
can you edit a binary file using a hex editor and perhaps supply, change if not supply any missing varioables it may have?

Sure, if you know what's missing and precisely where to put it back.

In a binary file format like PK, generally if you drop even a single byte anywhere in the file it will be corrupt.

If something has just blindly stripped a whole range of byte values from the file, and you don't have the original to compare it with, you're pretty much f**ked.


:raincloud:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #8 on: June 06, 2012, 07:58:36 PM »
Why would netscape remove characters from an HTML file?  Maybe it wants only ASCII characters like the alphabet?  But an HTML file could have any character and be different encodings.

I see mostly numbers, are most opcodes numbers when represented with ASCII?  So this browser took control ASCII characters, or bytes that weren't ASCII representations, and removed them?

I suppose you would have to fill in the gaps, so you'd have to start constructing the assembly source, but it'd be extremely difficult.
« Last Edit: June 06, 2012, 08:11:28 PM by reaper »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #9 on: June 06, 2012, 08:57:31 PM »
Why would netscape remove characters from an HTML file?  Maybe it wants only ASCII characters like the alphabet?  But an HTML file could have any character and be different encodings.

Common encodings like US-ASCII or ISO-8859-1 or UTF-8 aren't going use byte values lower than 32 in HTML, apart from whitespace like \n and \r and \t (10, 13, and 9).

It may not be polite of Netscape to assume it can strip those lower range values, but it's not entirely surprising.


I see mostly numbers, are most opcodes numbers when represented with ASCII?

It's a mixed ASCII/octal dump.  Where it outputs a single character, it's ASCII.  If it's three digits then it's an octal representation of the byte value.  If it's \x then it's a mnemonic for a particular control character.  ( http://msdn.microsoft.com/en-us/library/6aw8xdf2.aspx )


So this browser took control ASCII characters, or bytes that weren't ASCII representations, and removed them?

Yes, generally byte values less than 32.  (Apparently with a few exceptions like \b)


I suppose you would have to fill in the gaps, so you'd have to start constructing the assembly source, but it'd be extremely difficult.

Next to impossible, unless you knew what the compressed data stored in the PK was supposed to look like when uncompressed.

You might be able to salvage undamaged fragments of it, but lots of information has simply been erased.


:mrdead:

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #10 on: June 06, 2012, 09:14:11 PM »
couldn't you uncompress the code that is there, depending on the compression algorithm the exectuable format uses?

then maybe you could create some assembly source, and see what the program is attempting to do to recreate it?  And nice decoding of what the data is and what happened!
« Last Edit: June 06, 2012, 09:16:12 PM by reaper »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline yahoo

  • Opulent Member
  • *
  • Posts: 2290
  • Quake II | Powered by SMF 1.0.9.
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #11 on: June 06, 2012, 11:01:17 PM »
i didnt know that netscape is still around.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Quake II | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Fix downloaded files that are the wrong mimetype
« Reply #12 on: June 07, 2012, 02:49:33 AM »
couldn't you uncompress the code that is there, depending on the compression algorithm the exectuable format uses?

Not sure which 'code' you're referring to.  The original sample file appears to be a PKzip'd Q2 demo file.

The the bytes deleted by Netscape will have caused corruption in both the PK container format itself, as well as to the compressed Q2 demo data.

Even if you attempted to disregard the broken container format by manually trying to find the start of the compressed Q2 demo, the compressed data stream itself is corrupted.  If you tried to follow the zip decompression algorithm on the corrupted data, the output would be mostly garbage.


:exqueezeme:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

 

El Box de Shoutamente

Last 10 Shouts:

 

Costigan_Q2

Today at 07:35:35 AM
Members
Total Members: 2921
Latest: provider

Date Registered : March 20, 2024

*laughs in slow clapping*
 

RyU

September 03, 2024, 05:15:49 PM
And wow Derrick is still playing lol
 

RyU

September 03, 2024, 05:15:15 PM
Just know yesterday is gone and soon tomorrow will be gone too  :)
 

Lejionator

August 08, 2024, 07:28:01 PM
It's tiem to QuakeCon!!!  ;)

https://www.youtube.com/watch?v=ThQd_UJaTys
 

ImperiusDamian

July 26, 2024, 09:34:53 PM
In nomine Quake II et Id Software et Spiritus John Carmack, Amen.
 

QuakeDuke

July 26, 2024, 05:10:30 PM
Hey, shout, summertime blues
Jump up and down in you blue suede shoes
Hey, did you rock and roll? Rock on!!  ...QD
 

Yotematoi

July 24, 2024, 01:31:20 PM
Ayer me mato 5 veces para robarme en la vida real hará lo mismo? [img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&amp;show_text=true&amp;width=500
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&show_text=true&width=500" width="500"
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text

Show 50 latest
Welcome, Guest. Please login or register.
September 21, 2024, 10:26:42 AM

Login with username, password and session length