Site hosted by Angelfire.com: Build your free website today!

Notes

You are here: linux webshots converter :: Notes
  Here is a command to name file from description like so:
wbz2jpg 33333.wbz `wbzd 33333.wbz`
This shell script saves some typing
#!/bin/bash
mv $1 /home/me/webshots/
cd /home/me/webshots
wbz2jpg $1 `wbzd $1`;kview `wbzd $1`
   

  Here is a shell script I use to launch wbz2jpg program from my browser
#!/bin/bash
wbz2jpg $1 $1.jpg
mv $1.jpg /home/user/webshots/
opera /home/user/webshots/`echo $1.jpg|awk -F'/' '{print $(NF)}'`
add application/x-webshots to mime types for browser, extension wbz, application
/home/user/bin/wbz2jpg.sh ,if you saved it there. The jpg sould open in your browser. It will be saved in webshots directory.. if you have created it
   

  Some info I used off a usenet post:
There are three "types" of jpegs into WBC. The first type is the unencrypted type: all you have to do is to search for the string FF D8 FF E0 (start of JPG), then copy all bytes until you reach the first 'Adobe' string. Then jump all following bytes until the second 'Adobe' string, and continue to copy bytes (second 'Adobe' string included) until you reach FF D9 (end of JPG). The part you jumped is a thumbnail.

The second and third types are the header-encripted ones, and they're very similar each other. You have to search for the string 'WWBB0000' (second type) or 'WWBB1111' (third type). The 100 bytes following these strings are encrypted, then the rest of bytes until FF D9 (end of jpg) are unencrypted and can be copied normally.

To decrypt these first 100 bytes, you have to use this procedure: grab the first 100 bytes into a matrix (A), then the following 100 bytes in another matrix (B). For every byte, make this operations:

NOT A(n)
XOR B(n), A(n)
XOR B(n), magicvalue

When the loop ends, in array B you have the correct header. The 'magicvalue' is 'A4' for WWBB0000 type, 'F2' for WWBB1111 type.

   

  
This program works on all the wbz files I have tried. However, it need s more testing Also, in addition to a major rewrite, I need to add wbc support This program works on all the wbz files I have tried. However, it need s more testing Also, in addition to a major rewrite, I need to add wbc support

Last modified: 2003/07/07 00:21