mirror of
https://github.com/gchq/CyberChef.git
synced 2026-03-08 16:00:52 -07:00
Minor changes
parent
3a22285d2d
commit
6978d32f0d
1 changed files with 13 additions and 1 deletions
14
Node-API.md
14
Node-API.md
|
|
@ -37,7 +37,7 @@ import chef from "CyberChef";
|
|||
const aestTime = chef.translateDateTimeFormat("15/06/2015 20:45:00", {
|
||||
outputTimezone: "Australia/Queensland"
|
||||
});
|
||||
aestTime.toString() === "Tuesday 16th June 2015 06:45:00 +10:00 AEST"; //true
|
||||
aestTime.toString() === "Tuesday 16th June 2015 06:45:00 +10:00 AEST"; // true
|
||||
```
|
||||
|
||||
### Parse a Teredo IPv6 Address
|
||||
|
|
@ -79,6 +79,18 @@ const message = new Dish(`00000000 1f 8b 08 00 12 bc f3 57 00 ff 0d c7 c1 09 00
|
|||
message.toString() === "So long and thanks for all the fish." //true
|
||||
```
|
||||
|
||||
### Interact with files from Node.js `fs` library
|
||||
```javascript
|
||||
import { Dish, toHex } from "CyberChef";
|
||||
|
||||
fs.writeFileSync("test.txt", toHex("hello"));
|
||||
|
||||
const file = new Dish(fs.readFileSync("test.txt"));
|
||||
|
||||
console.log(file) // 68 65 6c 6c 6f
|
||||
file.fromHex().toString() === "hello"; // true
|
||||
```
|
||||
|
||||
## Import with ES6 `import` or CommonJS `require`
|
||||
|
||||
#### ES6 imports
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue