Menu

Magic Number

2010-08-20
2012-12-07
  • Andreas Bardill

    Andreas Bardill - 2010-08-20

    Hi
    I musst detect if a file is a archive file
    for a normal archive is no problem with the magic like 37 7A BC AF 27 1C for 7-zip

    how can i detect when the file is a selfextracting Archive ?
    have you another file signature from different archive files?

     
  • Bulat Ziganshin

    Bulat Ziganshin - 2010-08-20

    all sfxes i know are just exe+regular archive

     
  • Andreas Bardill

    Andreas Bardill - 2010-08-23

    thi a now
    but how can i detect that an archive is in a exe?

    example by a PKSFX

    50 4B 53 70 58
    PKSFX
    ZIP PKSFX self-extracting executable compressed file

    what is the offset an magic for a 7zip self-extracting??

     
  • Bulat Ziganshin

    Bulat Ziganshin - 2010-08-23

    ypu should read zip fromat docs for the magic. afair it's PK\1\2 or PK\3\4

    look at appnote.txt at pkzip site

     
  • Bulat Ziganshin

    Bulat Ziganshin - 2010-08-23

    and there is no magic offset - you just scan reasonable amount of data, say 512kb

     
  • Vacon

    Vacon - 2010-08-23

    Hello everyone,

    while having a look at the new DoubleCommander, just by coincidence I stumbled upon this one. Quite old, but the top-most entry of the "What's new"-section makes me believe it could be helpful for your problem. So you may want to have a look at it / it's sources.

    Best regards!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.