Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
798ac5a4
Commit
798ac5a4
authored
Jul 30, 2018
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed timestamp date bug in issue #346
parent
66d5ceb9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
21 deletions
+24
-21
magic.py
src/binwalk/core/magic.py
+3
-0
archives
src/binwalk/magic/archives
+3
-3
compressed
src/binwalk/magic/compressed
+1
-1
filesystems
src/binwalk/magic/filesystems
+16
-16
firmware
src/binwalk/magic/firmware
+1
-1
No files found.
src/binwalk/core/magic.py
View file @
798ac5a4
...
@@ -671,8 +671,11 @@ class Magic(object):
...
@@ -671,8 +671,11 @@ class Magic(object):
# Up until this point, date fields are treated as integer values,
# Up until this point, date fields are treated as integer values,
# but we want to display them as nicely formatted strings.
# but we want to display them as nicely formatted strings.
if
line
.
type
==
'date'
:
if
line
.
type
==
'date'
:
try
:
ts
=
datetime
.
datetime
.
utcfromtimestamp
(
dvalue
)
ts
=
datetime
.
datetime
.
utcfromtimestamp
(
dvalue
)
dvalue
=
ts
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
dvalue
=
ts
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
except
OSError
:
dvalue
=
"invalid timestamp"
# Generate the tuple for the format string
# Generate the tuple for the format string
dvalue_tuple
=
()
dvalue_tuple
=
()
...
...
src/binwalk/magic/archives
View file @
798ac5a4
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
>34 byte !0
>34 byte !0
>>34 string x {name:%s}
>>34 string x {name:%s}
>>34 string x original name: "%s",
>>34 string x original name: "%s",
>0xC ledate x original file date: %s,
>0xC
u
ledate x original file date: %s,
>0x10 lelong <0 {invalid}
>0x10 lelong <0 {invalid}
>0x10 lelong x compressed file size: %d,
>0x10 lelong x compressed file size: %d,
>0x14 lelong <0 {invalid}
>0x14 lelong <0 {invalid}
...
@@ -218,8 +218,8 @@
...
@@ -218,8 +218,8 @@
>6 leshort <0 {invalid}
>6 leshort <0 {invalid}
>6 leshort 0 {invalid}
>6 leshort 0 {invalid}
>6 leshort x volume number: %d,
>6 leshort x volume number: %d,
>8 ledate x current date: %s,
>8
u
ledate x current date: %s,
>12 ledate x starting date: %s,
>12
u
ledate x starting date: %s,
>20 string x disk name: "%s",
>20 string x disk name: "%s",
>36 string x file system name: "%s",
>36 string x file system name: "%s",
>52 string x user name: "%s"
>52 string x user name: "%s"
...
...
src/binwalk/magic/compressed
View file @
798ac5a4
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
>3 byte &0x20 \b, encrypted{invalid}
>3 byte &0x20 \b, encrypted{invalid}
# Dates before 1992 are {invalid}, unless of course you're DD-WRT in which
# Dates before 1992 are {invalid}, unless of course you're DD-WRT in which
# case you don't know how to set a date in your gzip files. Brilliant.
# case you don't know how to set a date in your gzip files. Brilliant.
>4
ledate
x \b, last modified: %s
>4
uledate
x \b, last modified: %s
>4 lelong =0 (null date)
>4 lelong =0 (null date)
>4 lelong !0
>4 lelong !0
>>4 lelong <694224000 (bogus date)
>>4 lelong <694224000 (bogus date)
...
...
src/binwalk/magic/filesystems
View file @
798ac5a4
...
@@ -240,9 +240,9 @@
...
@@ -240,9 +240,9 @@
>28 beshort 3
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>>51 belong x blocksize: %d bytes,
>28 beshort <4
>28 beshort <4
>>39 bedate x created: %s
>>39
u
bedate x created: %s
>28 beshort >3
>28 beshort >3
>>8 bedate x created: %s
>>8
u
bedate x created: %s
# Squashfs, little endian
# Squashfs, little endian
0 string hsqs Squashfs filesystem, little endian,
0 string hsqs Squashfs filesystem, little endian,
...
@@ -277,9 +277,9 @@
...
@@ -277,9 +277,9 @@
>28 leshort 3
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>>51 lelong x blocksize: %d bytes,
>28 leshort <4
>28 leshort <4
>>39 ledate x created: %s
>>39
u
ledate x created: %s
>28 leshort >3
>28 leshort >3
>>8 ledate x created: %s
>>8
u
ledate x created: %s
>28 leshort <3
>28 leshort <3
>>8 lelong x {jump:%d}
>>8 lelong x {jump:%d}
>28 leshort 3
>28 leshort 3
...
@@ -320,9 +320,9 @@
...
@@ -320,9 +320,9 @@
>28 beshort 3
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>>51 belong x blocksize: %d bytes,
>28 beshort <4
>28 beshort <4
>>39 bedate x created: %s
>>39
u
bedate x created: %s
>28 beshort >3
>28 beshort >3
>>8 bedate x created: %s
>>8
u
bedate x created: %s
>28 beshort <3
>28 beshort <3
>>8 belong x {jump:%d}
>>8 belong x {jump:%d}
>28 beshort 3
>28 beshort 3
...
@@ -363,9 +363,9 @@
...
@@ -363,9 +363,9 @@
>28 beshort 3
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>>51 belong x blocksize: %d bytes,
>28 beshort <4
>28 beshort <4
>>39 bedate x created: %s
>>39
u
bedate x created: %s
>28 beshort >3
>28 beshort >3
>>8 bedate x created: %s
>>8
u
bedate x created: %s
>28 beshort <3
>28 beshort <3
>>8 belong x {jump:%d}
>>8 belong x {jump:%d}
>28 beshort 3
>28 beshort 3
...
@@ -410,9 +410,9 @@
...
@@ -410,9 +410,9 @@
>28 beshort 3
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>>51 belong x blocksize: %d bytes,
>28 beshort <4
>28 beshort <4
>>39 bedate x created: %s
>>39
u
bedate x created: %s
>28 beshort >3
>28 beshort >3
>>8 bedate x created: %s
>>8
u
bedate x created: %s
>28 beshort <3
>28 beshort <3
>>8 belong x {jump:%d}
>>8 belong x {jump:%d}
>28 beshort 3
>28 beshort 3
...
@@ -453,9 +453,9 @@
...
@@ -453,9 +453,9 @@
>28 leshort 3
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>>51 lelong x blocksize: %d bytes,
>28 leshort <4
>28 leshort <4
>>39 ledate x created: %s
>>39
u
ledate x created: %s
>28 leshort >3
>28 leshort >3
>>8 ledate x created: %s
>>8
u
ledate x created: %s
>28 leshort <3
>28 leshort <3
>>8 lelong x {jump:%d}
>>8 lelong x {jump:%d}
>28 leshort 3
>28 leshort 3
...
@@ -496,9 +496,9 @@
...
@@ -496,9 +496,9 @@
>28 leshort 3
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>>51 lelong x blocksize: %d bytes,
>28 leshort <4
>28 leshort <4
>>39 ledate x created: %s
>>39
u
ledate x created: %s
>28 leshort >3
>28 leshort >3
>>8 ledate x created: %s
>>8
u
ledate x created: %s
>28 leshort <3
>28 leshort <3
>>8 lelong x {jump:%d}
>>8 lelong x {jump:%d}
>28 leshort 3
>28 leshort 3
...
@@ -607,7 +607,7 @@
...
@@ -607,7 +607,7 @@
18 string WDK\x202.0\x00 WDK file system, version 2.0,
18 string WDK\x202.0\x00 WDK file system, version 2.0,
>11 byte !0 %d files,
>11 byte !0 %d files,
>4 bedate !0 Last modified %s GMT
>4
u
bedate !0 Last modified %s GMT
32769 string CD001 ISO
32769 string CD001 ISO
>6144 string !NSR0 9660 CD-ROM filesystem data,
>6144 string !NSR0 9660 CD-ROM filesystem data,
...
@@ -664,7 +664,7 @@
...
@@ -664,7 +664,7 @@
>8 lelong*1024 x {jump:%d}
>8 lelong*1024 x {jump:%d}
>8 lelong x total blocks: %d,
>8 lelong x total blocks: %d,
>972 lelong x free blocks: %d,
>972 lelong x free blocks: %d,
>968 ledate x last modified: %s
>968
u
ledate x last modified: %s
>980 byte !0
>980 byte !0
>>980 string x \b, last mounted on: "%s"
>>980 string x \b, last mounted on: "%s"
...
...
src/binwalk/magic/firmware
View file @
798ac5a4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# From: Craig Heffner, U-Boot image.h header definitions file
# From: Craig Heffner, U-Boot image.h header definitions file
0 belong 0x27051956 uImage header, header size: 64 bytes,
0 belong 0x27051956 uImage header, header size: 64 bytes,
>4 ubelong x header CRC: 0x%X,
>4 ubelong x header CRC: 0x%X,
>8 bedate x created: %s,
>8
u
bedate x created: %s,
>12 belong <1 {invalid}
>12 belong <1 {invalid}
>12 ubelong x image size: %d bytes,
>12 ubelong x image size: %d bytes,
>16 ubelong x Data Address: 0x%X,
>16 ubelong x Data Address: 0x%X,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment