Post AXE01zOd09KCmoEEbY by daeken@haqueers.com
(DIR) More posts by daeken@haqueers.com
(DIR) Post #AXDzE53jfkDDs2erU8 by foone@digipres.club
2023-06-30T17:39:58Z
0 likes, 0 repeats
it'd be nice if my hex editor could automatically keep an eye out for some common file format patterns.like, a series of integers A, B, C where B is located A bytes after A, C is located B bytes after B (and A+B bytes after A, etc), or a long run of 4-byte numbers that are strictly increasing.
(DIR) Post #AXDzE6r2ztFdRGjkzA by revk@toot.me.uk
2023-06-30T17:48:10Z
0 likes, 0 repeats
@foone it is always funny when a mate throws a load of hex at me and I am like: “ok this is a tag length value series and big endian and oh look that says XXX in ASCII there”…. Been there. Done that. AI should be good at that, LOL.
(DIR) Post #AXDzE7oFRmbeOsR2GG by daeken@haqueers.com
2023-06-30T17:54:12Z
0 likes, 0 repeats
@revk @foone it's absolutely something AI *could* do, but training one to do so would be incredibly difficult. Probably have to build something to create a bunch of different file formats (with all kinds of features) and then train on that, since getting enough real formats for training would be nigh on impossible.
(DIR) Post #AXDzE8nDn5NZRyxjIe by penguin42@mastodon.org.uk
2023-06-30T17:59:19Z
0 likes, 0 repeats
@daeken @revk @foone Would the 'magic' data used by libmagic and the 'file' command help?
(DIR) Post #AXDzPdJmdgU3J9fmu8 by daeken@haqueers.com
2023-06-30T18:01:24Z
0 likes, 0 repeats
@penguin42 @revk @foone not really, no. Libmagic only looks at headers, generally speaking
(DIR) Post #AXDzj0pXRgUvjQlbdo by mansr@society.oftrolls.com
2023-06-30T18:04:57Z
0 likes, 0 repeats
@daeken @penguin42 @revk @foone libmagic looks at whatever you give it, doesn't have to be from the start of a file.
(DIR) Post #AXE01zOd09KCmoEEbY by daeken@haqueers.com
2023-06-30T18:08:22Z
0 likes, 0 repeats
@mansr @penguin42 @revk @foone I know -- I've used it to build tools along these lines. One is referenced up thread where libmagic is used to identify archive contents and layout automatically.But libmagic only looks at the headers *of the content you give it*, which makes it useless for any kind of interior analysis.
(DIR) Post #AXE2X3GYrZLJfqOXmy by mansr@society.oftrolls.com
2023-06-30T18:36:24Z
0 likes, 0 repeats
@daeken @penguin42 @revk @foone You could call it with a new starting point whenever the cursor is moved, say. On a fast computer, you could probably even call it starting at every point on the current page. Still might not be the best tool for the job, though.
(DIR) Post #AXE2emSVEiVZrafLP6 by daeken@haqueers.com
2023-06-30T18:37:43Z
0 likes, 0 repeats
@mansr @penguin42 @revk @foone yeah, the tool I referenced elsewhere in the thread can do that. It's just not useful for anything outside of archives due to the limitations of libmagic's design.
(DIR) Post #AXE3dfPs2CRRgbT2u0 by mansr@society.oftrolls.com
2023-06-30T18:48:46Z
0 likes, 0 repeats
@daeken @penguin42 @revk @foone Yes, I do know a little about it (splitting libmagic from the file utility was my doing). It works well for its intended purpose, identifying known file formats. For detecting arbitrary patterns in data, you'll need something else.
(DIR) Post #AXE3o1MXIHEueAqRpw by daeken@haqueers.com
2023-06-30T18:50:39Z
0 likes, 0 repeats
@mansr @penguin42 @revk @foone I am thoroughly confused by this thread then. Considering that ... We're talking about arbitrary patterns in files?