xlsx
This commit is contained in:
@@ -34,6 +34,9 @@ func (e Extractor) ExtractAux(auxfile, xlsxfile string) error {
|
||||
row := 2
|
||||
col := 1
|
||||
for i := 0; i < len(data); i += 24 + 128 + 512 {
|
||||
if i+24+128+512 > len(data) {
|
||||
break
|
||||
}
|
||||
var head AuxFrameHead
|
||||
head.Decode(data[i : i+24])
|
||||
l0, _ := head.SaveXlsx(f, col, row)
|
||||
|
||||
@@ -12,7 +12,7 @@ type Extractor struct {
|
||||
func NewExtractor(params *Params) *Extractor {
|
||||
os.MkdirAll(params.OutputPath, 0755)
|
||||
os.MkdirAll(params.TempPath, 0755)
|
||||
return &Extractor{params: params}
|
||||
return &Extractor{params: params, Clean: true}
|
||||
}
|
||||
|
||||
func (e *Extractor) Cleanup() error {
|
||||
|
||||
@@ -59,9 +59,6 @@ func (p *Extractor) ExtractOriginalImageData(aosDataFile string) ([]string, erro
|
||||
snRange := map[int][]uint32{}
|
||||
datSet := map[int][]byte{}
|
||||
|
||||
fsn, _ := os.Create("demo/temp/tf_sn.txt")
|
||||
defer fsn.Close()
|
||||
|
||||
var i int
|
||||
for i < len(aosData) {
|
||||
if i+4 > len(aosData) {
|
||||
@@ -79,8 +76,6 @@ func (p *Extractor) ExtractOriginalImageData(aosDataFile string) ([]string, erro
|
||||
tf.Decode(aosData[i : i+TransImageFrameLength])
|
||||
fileno := int(tf.FileNo)
|
||||
snRange[fileno] = append(snRange[fileno], tf.SNo)
|
||||
fsn.WriteString(fmt.Sprintf("%d %d %d\n", i, tf.SNo, fileno))
|
||||
|
||||
if tf.SecretFlag == 0xAA {
|
||||
log.Info("secret frame is not supported")
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user