mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 18:16:53 -04:00
fix bugs
This commit is contained in:
parent
54194f2cc1
commit
5b9665e8b9
3 changed files with 11 additions and 11 deletions
|
@ -303,7 +303,7 @@ const Categories = [
|
||||||
ops: [
|
ops: [
|
||||||
"From Tcpdump",
|
"From Tcpdump",
|
||||||
"HTTP gzip Decrypt",
|
"HTTP gzip Decrypt",
|
||||||
"Strip TCP Headers",
|
"Strip TCP Headers",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ let OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
|
||||||
|
|
||||||
OpModules.Packets = {
|
OpModules.Packets = {
|
||||||
"From Tcpdump": Packets.runFromTcpdump,
|
"From Tcpdump": Packets.runFromTcpdump,
|
||||||
"Strip TCP Headers": Packets.stripPacketHeader
|
"Strip TCP Headers": Packets.stripPacketHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
export default OpModules;
|
export default OpModules;
|
||||||
|
|
|
@ -33,7 +33,7 @@ const Packets = {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -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