mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
'Extract file paths' operation now handles 8.3 windows file paths correctly.
This commit is contained in:
parent
fe8f8bc712
commit
bb077c87b3
2 changed files with 2 additions and 2 deletions
|
@ -287,7 +287,7 @@ const Extract = {
|
||||||
includeUnixPath = args[1],
|
includeUnixPath = args[1],
|
||||||
displayTotal = args[2],
|
displayTotal = args[2],
|
||||||
winDrive = "[A-Z]:\\\\",
|
winDrive = "[A-Z]:\\\\",
|
||||||
winName = "[A-Z\\d][A-Z\\d\\- '_\\(\\)]{0,61}",
|
winName = "[A-Z\\d][A-Z\\d\\- '_\\(\\)~]{0,61}",
|
||||||
winExt = "[A-Z\\d]{1,6}",
|
winExt = "[A-Z\\d]{1,6}",
|
||||||
winPath = winDrive + "(?:" + winName + "\\\\?)*" + winName +
|
winPath = winDrive + "(?:" + winName + "\\\\?)*" + winName +
|
||||||
"(?:\\." + winExt + ")?",
|
"(?:\\." + winExt + ")?",
|
||||||
|
|
|
@ -44,7 +44,7 @@ const Regex = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Windows file path",
|
name: "Windows file path",
|
||||||
value: "([A-Za-z]):\\\\((?:[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)]{0,61}\\\\?)*[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)]{0,61})(\\.[A-Za-z\\d]{1,6})?"
|
value: "([A-Za-z]):\\\\((?:[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)~]{0,61}\\\\?)*[A-Za-z\\d][A-Za-z\\d\\- \\x27_\\(\\)]{0,61})(\\.[A-Za-z\\d]{1,6})?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "UNIX file path",
|
name: "UNIX file path",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue