mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 07:21:02 -04:00
Fix linebreak-style
Strip TCP Header now supports Wireshark format
This commit is contained in:
parent
fde87fd95c
commit
d5aca252a9
1 changed files with 3 additions and 3 deletions
|
@ -65,13 +65,13 @@ const Packets = {
|
||||||
stripTCP = args[2];
|
stripTCP = args[2];
|
||||||
|
|
||||||
if (stripEthernet) {
|
if (stripEthernet) {
|
||||||
output = output.replace(/^(([0-9a-f]{4} ){6,8}0800 )/igm, "");
|
output = output.replace(/^(([0-9a-f]{4} ?){6,8}0800 ?)/igm, "");
|
||||||
}
|
}
|
||||||
if (stripIP) {
|
if (stripIP) {
|
||||||
output = output.replace(/^((45[0-9a-f]{2} ([0-9a-f]{4} ){9}))/igm, "");
|
output = output.replace(/^((45[0-9a-f]{2} ?([0-9a-f]{4} ?){9}))/igm, "");
|
||||||
}
|
}
|
||||||
if (stripTCP) {
|
if (stripTCP) {
|
||||||
output = output.replace(/^([0-9a-f]{4} ){6}((80[0-9a-f]{2} ([0-9a-f]{4} ?){9})|(50[0-9a-f]{2} ([0-9a-f]{4} ?){3}))/igm, "");
|
output = output.replace(/^([0-9a-f]{4} ?){6}((80[0-9a-f]{2} ?([0-9a-f]{4} ?){9})|(50[0-9a-f]{2} ?([0-9a-f]{4} ?){3}))/igm, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue