Skip to content

Commit 30b2da0

Browse files
committed
Add Hash verification to pester,Update binaries an VirusTotal Scans
1) i've updated the WebDriver.dll and WebDriver.Support.dll to the latest stable version 3.141.0 2) I added sha256 files where it was missing. 3) I've added hash verifications to pester tests. 4) i've removed the file InternetExplorerDriver.exe since it seems redundent and IE tests work without it.
1 parent 10bcdac commit 30b2da0

8 files changed

+42
-0
lines changed

Selenium.tests.ps1

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
Import-Module (Join-Path $PSScriptRoot "Selenium.psd1") -Force
22

3+
Describe "Verify the Binaries SHA256 Hash" {
4+
It "Check WebDriver.dll Hash"{
5+
# VirusTotal Scan URL = https://www.virustotal.com/gui/file/0ee619b1786cf5971c0f9c6ee1859497aecba93a4953cf92fea998e8eefadf3c/detection
6+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\WebDriver.dll).Hash
7+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\WebDriver.dll.sha256)
8+
}
9+
10+
It "Check WebDriver.Support.dll Hash"{
11+
# VirusTotal Scan URL = https://www.virustotal.com/gui/file/b59ba7d0cffe43e722b13ad737cf596f030788b86b5b557cb479f0b6957cce8a/detection
12+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\WebDriver.Support.dll).Hash
13+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\WebDriver.Support.dll.sha256)
14+
}
15+
16+
It "Check ChromeDriver.exe Hash"{
17+
# The ChromeDriver.exe was extracted from https://chromedriver.storage.googleapis.com/76.0.3809.68/chromedriver_win32.zip its VirusTotal Scan URL - https://www.virustotal.com/gui/url/69ffe387a3fa4fbf8a108391580f1a0befb8b96b82486da4417cfcdab4add4d4/detection
18+
# ChromeDriver.exe - VirusTotal Scan URL = https://www.virustotal.com/gui/file/66cfa645f83fde41720beac7061a559fd57b6f5caa83d7918f44de0f4dd27845/detection
19+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\chromedriver.exe).Hash
20+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\chromedriver.exe.sha256)
21+
}
22+
23+
It "Check GeckoDriver.exe Hash"{
24+
# VirusTotal Scan URL = https://www.virustotal.com/gui/file/1ae81b2a6f40f7d11be3c91c4d83977ae0c0897bd5d154c02a6d869b58866b58/detection
25+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\geckodriver.exe).Hash
26+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\geckodriver.exe.sha256)
27+
}
28+
29+
It "Check IEDriverServer.exe Hash"{
30+
# VirusTotal Scan URL = https://www.virustotal.com/gui/file/a1e26b0e8cb5f8db1cd784bac71bbf540485d81e697293b0b4586e25a31a8187/detection - this driver seems to have 2 false positives and is marked as clean in the comments
31+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\IEDriverServer.exe).Hash
32+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\IEDriverServer.exe.sha256)
33+
}
34+
35+
It "Check MicrosoftWebDriver.exe Hash"{
36+
# VirusTotal Scan URL = https://www.virustotal.com/gui/file/6e8182697ea5189491b5519d8496a3392e43741b7c0515130f2f8205881d208e/detection
37+
$Hash = (Get-FileHash -Algorithm SHA256 -Path $PSScriptRoot\assemblies\MicrosoftWebDriver.exe).Hash
38+
$Hash |Should Be (Get-Content -Path $PSScriptRoot\assemblies\MicrosoftWebDriver.exe.sha256)
39+
}
40+
}
41+
342
Describe "Start-SeChrome" {
443
Context "Should Start Chrome Driver" {
544
$Driver = Start-SeChrome

assemblies/IEDriverServer.exe

-298 KB
Binary file not shown.

assemblies/IEDriverServer.exe.sha256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A1E26B0E8CB5F8DB1CD784BAC71BBF540485D81E697293B0B4586E25A31A8187

assemblies/InternetExplorerDriver.exe

-3.15 MB
Binary file not shown.

assemblies/WebDriver.Support.dll

0 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
B59BA7D0CFFE43E722B13AD737CF596F030788B86B5B557CB479F0B6957CCE8A

assemblies/WebDriver.dll

1.5 KB
Binary file not shown.

assemblies/WebDriver.dll.sha256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0EE619B1786CF5971C0F9C6EE1859497AECBA93A4953CF92FEA998E8EEFADF3C

0 commit comments

Comments
 (0)