mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Updated all files for 2024
This commit is contained in:
parent
cabf232ea5
commit
7cb1f1ff87
12 changed files with 84 additions and 81 deletions
|
@ -18,7 +18,6 @@ class FromHFSPlusTimestamp extends Operation {
|
|||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "From HFS(+) Timestamp";
|
||||
this.module = "Default";
|
||||
this.description = "Converts Apple HFS/HFS+ Filesystem Timestamp to datetime string<br><br>e.g. <code>CDF566EE</code> becomes <code>30 June 2013 04:39:10 UTC</code><br><br>Mac HFS/HFS+ timestamp is a 4 Byte Hex String representing the number of seconds since January 1, 1904 UTC<br><br> Use with swap endianness recipe if required.";
|
||||
|
@ -34,13 +33,13 @@ class FromHFSPlusTimestamp extends Operation {
|
|||
* @throws {OperationError} if invalid unit
|
||||
*/
|
||||
run(input, args) {
|
||||
|
||||
try{
|
||||
const h = parseInt(input, 16);
|
||||
const d = moment.unix(h - 2082844800);
|
||||
return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC";
|
||||
|
||||
throw new OperationError();
|
||||
return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC";
|
||||
} catch{
|
||||
throw new OperationError("Unrecognised format");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default FromHFSPlusTimestamp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue