diff --git a/parsebin/file.c b/parsebin/file.c new file mode 100644 index 0000000..02428e5 --- /dev/null +++ b/parsebin/file.c @@ -0,0 +1,21 @@ +#define _USE_GNU + +#include +#include + +#ifndef WIN32 +# include +#else +# define stat _stat +#endif + +// ssize_t abspath(const char *restrict path, char *restrict buf) + +int get_mod_time(const char *restrict path, struct timespec *restrict mtime) { + struct stat result; + if(stat(path, &result) == -1) + return ERR; + *mtime = result.st_mtime; + + return OK; +} diff --git a/parsebin/pe/README.md b/parsebin/pe/README.md new file mode 100644 index 0000000..d21faf3 --- /dev/null +++ b/parsebin/pe/README.md @@ -0,0 +1,9 @@ +# Portable Executable (PE) + + +## References +1. https://en.wikipedia.org/wiki/Portable_Executable +2. https://en.wikipedia.org/wiki/.exe +3. https://en.wikipedia.org/wiki/DOS_MZ_executable +4. https://learn.microsoft.com/en-us/windows/win32/debug/pe-format +5. https://web.archive.org/web/20180711022043/https://msdn.microsoft.com/en-us/magazine/bb985992.aspx