Re:Re^2: CAS-5A jpg trick?2023年03月05日 11時33分

(訳)
まず、追加のヒントを1つ....
いくつかの異なる画像をダウンロードする代わりに、(パスに時間があるならば)
同じ画像をできるだけ何度もダウンロードすることをお勧めします。そうすれば
ダウンロード#1 で見逃したパケットをダウンロード#2 から取得できる可能性が
あります。私は、Windows上の FRHED hex editor を好んで使っています。

https://frhed.sourceforge.net/en/

しかし、部分的なファイルを扱いやすくするために、私は TEXT に変換し、全て
のコピー/貼付操作に GEANY text editor を使用しています。全てのパケットを
取得したら、全ての INFO バイト(行#1 の「FF D8」までの全てと1行ごとに同じ
バイト数)を削除します。次に 改行を削除して、「FF D8」から「FF D9」までの
1行のテキストを作成します。最後に バイナリ16進数ファイルに変換して、一つ
の JPG file にします!

大まかな手順は次のようになります。(コマンドの例を含む)
-------------------------------------------------------
- obtain KSS file from live capture

- convert from KSS to true HEX in GNU Radio while removing 1st 16 bytes (ax.25 header)
    from each packet

- in hex editor, verify (or cut) start of file to confirm '03 xx xx' bytes are at
     start of file

- chop file into 256 byte lines & convert to TEXT file:
    
    cat cas-5a_22-n6rfm--cut.hex | xxd -p -c 256|more (confirm that each line starts
    with '03 xx xx')
    
    cat cas-5a_22-n6rfm--cut.hex | xxd -p -c 256 > cas-5a_22-n6rfm--0301.txt
    
- repeat for any other captures of same JPG file download

- open TEXT files & editor & remove 1st 3 bytes so that each line starts
    w/ sequence # bytes (line #1 should start with '0001' - if you got the 1st packet)

- find missing packets by sequence number & fill from other downloads

- once all packets are present, remove 1st 26 characters from each line so that file
    starts with 'FF D8'
    cat cas-5a_22-combo.txt | cut -c 27- > 22-combo-less-27.txt
    
- remove line feeds so that entire text file (starting w/ 'FF D8') is on a single line

    cat 22-combo-less-27.txt | tr '\n' ' ' > 22-combo-one-line.txt
    
- convert single line TEXT file to binary hex file w/ .JPG extension

    cat 22-combo-one-line.txt | xxd -r -p > 22-combo.jpg
------------------------------------------------------------------

参考までに、昨夜は #23 のほとんどを取得しました。残りのバイトを取得する
ために、今日もう一度試してみます。 #23 は巨大で 794パケットもあります!
私が衛星アンテナと共に投稿した素敵な #22 の写真は、408パケット程度だった
と思います。だから、レンズフレアだけでなくて、#23 が良い写真であることを
願っています。 https://twitter.com/scott23192

コメント

コメントをどうぞ

※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。

※なお、送られたコメントはブログの管理者が確認するまで公開されません。

※投稿には管理者が設定した質問に答える必要があります。

名前:
メールアドレス:
URL:
次の質問に答えてください:
Tropical fish?

コメント:

トラックバック