mirror of
https://github.com/gchq/CyberChef
synced 2025-12-15 07:43:22 +00:00
Spelling
This commit is contained in:
@@ -22,7 +22,7 @@ class ParseUDP extends Operation {
|
|||||||
|
|
||||||
this.name = "Parse UDP";
|
this.name = "Parse UDP";
|
||||||
this.module = "Default";
|
this.module = "Default";
|
||||||
this.description = "Parses a UDP header and payload if present.";
|
this.description = "Parses a UDP header and payload (if present).";
|
||||||
this.infoURL = "https://wikipedia.org/wiki/User_Datagram_Protocol";
|
this.infoURL = "https://wikipedia.org/wiki/User_Datagram_Protocol";
|
||||||
this.inputType = "byteArray";
|
this.inputType = "byteArray";
|
||||||
this.outputType = "json";
|
this.outputType = "json";
|
||||||
@@ -44,7 +44,7 @@ class ParseUDP extends Operation {
|
|||||||
//Parse Header
|
//Parse Header
|
||||||
const UDPPacket = {
|
const UDPPacket = {
|
||||||
"Source port": s.readInt(2),
|
"Source port": s.readInt(2),
|
||||||
"Desination port": s.readInt(2),
|
"Destination port": s.readInt(2),
|
||||||
"Length": s.readInt(2),
|
"Length": s.readInt(2),
|
||||||
"Checksum": toHex(s.getBytes(2), "0x")
|
"Checksum": toHex(s.getBytes(2), "0x")
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ TestRegister.addTests([
|
|||||||
{
|
{
|
||||||
name: "Parse UDP: No Data - JSON",
|
name: "Parse UDP: No Data - JSON",
|
||||||
input: "04 89 00 35 00 2c 01 01",
|
input: "04 89 00 35 00 2c 01 01",
|
||||||
expectedOutput: "{\"Source port\":1161,\"Desination port\":53,\"Length\":44,\"Checksum\":\"0x010x01\"}",
|
expectedOutput: "{\"Source port\":1161,\"Destination port\":53,\"Length\":44,\"Checksum\":\"0x010x01\"}",
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "From Hex",
|
op: "From Hex",
|
||||||
@@ -30,7 +30,7 @@ TestRegister.addTests([
|
|||||||
}, {
|
}, {
|
||||||
name: "Parse UDP: With Data - JSON",
|
name: "Parse UDP: With Data - JSON",
|
||||||
input: "04 89 00 35 00 2c 01 01 02 02",
|
input: "04 89 00 35 00 2c 01 01 02 02",
|
||||||
expectedOutput: "{\"Source port\":1161,\"Desination port\":53,\"Length\":44,\"Checksum\":\"0x010x01\",\"Data\":\"0x020x02\"}",
|
expectedOutput: "{\"Source port\":1161,\"Destination port\":53,\"Length\":44,\"Checksum\":\"0x010x01\",\"Data\":\"0x020x02\"}",
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "From Hex",
|
op: "From Hex",
|
||||||
|
|||||||
Reference in New Issue
Block a user