-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStart.ps1
51 lines (40 loc) · 1.43 KB
/
Start.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Check if the current PS session is running as an administrator
$IsAdmin = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
$IsAdmin = $IsAdmin.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
# if statment to check if result is true or false
if ($IsAdmin -eq $true) {
# Tool can continue working.
}
else {
Write-Output ""
Write-Output "[!] LikeParser requires Administrator privileges to function."
Write-Output "[!] Please run LikeParser from an elevated Administrator terminal."
Write-Output ""
exit
}
# First variable load
$RunPath = Get-Location
$Username = $env:USERNAME
$SystemDrive = $env:SystemDrive
$WebDriverPath = "$RunPath\ChromeDriverWin64\"
$ChromePath = "$SystemDrive\Program Files\Google\Chrome\Application\chrome.exe"
# Dotsource LoadControl.ps1
. "$RunPath\DotSource\LoadControl.ps1"
# First load control variable check
if ($LoadControlFlag -eq "fail") {
exit
}
# Dotsource ReadConfig.ps1
. "$RunPath\DotSource\ReadConfig.ps1"
# Second Load control variable check
if ($LoadControlFlag -eq "fail") {
exit
}
# Dotsource DownloadConvertExcel.ps1
. "$RunPath\DotSource\DownloadConvertExcel.ps1"
# Dotsource ExtractURLs.ps1
. "$RunPath\DotSource\ExtractURLs.ps1"
# Dotsource ForeachURL.ps1
. "$RunPath\DotSource\ForeachURL.ps1"
# Dotsource StartFiltering.ps1
. "$RunPath\DotSource\StartFiltering.ps1"