File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,24 @@ if (Test-Path -PathType Container $SHOOK_DIR) {
46
46
}
47
47
}
48
48
49
+ try {
50
+ $HEADERS = @ {
51
+ " Referer" = ($DOMAIN + $LINK );
52
+ " User-Agent" = " RL/1.0"
53
+ }
54
+
55
+ $RESP = Invoke-WebRequest - URI ($DOMAIN + $LINK )
56
+ } catch {
57
+ Write-Warning " Failed to download SDK from the AB's site, falling back to own server..."
58
+ $HEADERS = @ {
59
+ " User-Agent" = " RL/1.0"
60
+ }
49
61
50
- $HEADERS = @ {
51
- " Referer" = ($DOMAIN + $LINK );
52
- " User-Agent" = " RL/1.0"
62
+ $DOMAIN = " https://igvx.ru"
63
+ $RESP = Invoke-WebRequest - URI ($DOMAIN + " /shsdk/" )
53
64
}
54
65
55
- Foreach ($elem in (Invoke-WebRequest - URI ( $DOMAIN + $LINK ) ).Links.Href) {
66
+ Foreach ($elem in ($RESP ).Links.Href) {
56
67
if ($elem.IndexOf (" ScriptHook$ ( $VARIANT ) _SDK" ) -ige 0 ) {
57
68
$outFile = " $SCR_DIR /temp.zip" ;
58
69
Invoke-WebRequest - Uri ($DOMAIN + $elem ) - OutFile $outFile - Headers $HEADERS
You can’t perform that action at this time.
0 commit comments