[extensions] Add new CLI: Windows' PowerShell

This commit is contained in:
Faisal Salman
2025-12-15 21:10:00 +07:00
parent 37d9b3c981
commit 634e13f627
3 changed files with 23 additions and 2 deletions

View File

@@ -448,6 +448,7 @@ const Extension = Object.freeze({
ELINKS: 'ELinks',
HTTPIE: 'HTTPie',
LYNX: 'Lynx',
POWERSHELL: 'PowerShell',
WGET: 'Wget'
},
Crawler: {

View File

@@ -28,8 +28,8 @@ const LIBRARY = 'library';
const CLIs = Object.freeze({
browser : [
// wget / curl / Lynx / ELinks / HTTPie
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
// wget / curl / Lynx / ELinks / HTTPie / PowerShell
[/(wget|curl|lynx|elinks|httpie|powershell)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
]
});

View File

@@ -59,6 +59,26 @@
"type" : "cli"
}
},
{
"desc" : "PowerShell",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.15063; en-US) PowerShell/6.0.0",
"expect" :
{
"name" : "PowerShell",
"version" : "6.0.0",
"type" : "cli"
}
},
{
"desc" : "PowerShell",
"ua" : "Mozilla/5.0 (Windows NT; Windows NT 10.0; de-DE) WindowsPowerShell/5.1.19041.5737",
"expect" :
{
"name" : "PowerShell",
"version" : "5.1.19041.5737",
"type" : "cli"
}
},
{
"desc" : "wget",
"ua" : "Wget/1.21.1",