mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-22 03:58:50 -07:00
more bugfix
This commit is contained in:
+10
-8
@@ -2,33 +2,35 @@ $global:adb = "./platform-tools-latest-windows/platform-tools/adb.exe"
|
||||
$global:serial = ".\installer-windows-x86_64\installer.exe"
|
||||
|
||||
function _adb_push {
|
||||
& $global:adb -d push @args
|
||||
& $global:adb -d push @args | Out-Null
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
write-host "push exited with exit code $($exitCode)"
|
||||
}
|
||||
return $proc.exitcode
|
||||
return $exitCode
|
||||
}
|
||||
|
||||
function _adb_shell {
|
||||
& $global:adb -d shell @args
|
||||
& $global:adb -d shell @args | Out-Null
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
write-host "shell exited with exit code $($exitCode)"
|
||||
}
|
||||
return $proc.exitcode
|
||||
return $exitCode
|
||||
}
|
||||
|
||||
function _wait_for_adb_shell {
|
||||
do {
|
||||
start-sleep -seconds 1
|
||||
} until ((_adb_shell "uname -a") -eq 0)
|
||||
$success = _adb_shell "uname -a"
|
||||
} until ($success -eq 0)
|
||||
}
|
||||
|
||||
function _wait_for_atfwd_daemon {
|
||||
do {
|
||||
start-sleep -seconds 1
|
||||
} until ((_adb_shell "pgrep atfwd_daemon") -eq 0)
|
||||
$success = _adb_shell "pgrep atfwd_daemon"
|
||||
} until ($success -eq 0)
|
||||
}
|
||||
|
||||
function force_debug_mode {
|
||||
@@ -97,10 +99,10 @@ function setup_rayhunter {
|
||||
|
||||
function test_rayhunter {
|
||||
$URL = "http://localhost:8080"
|
||||
& $global:adb -d shell forward tcp:8080 tcp:8080
|
||||
& $global:adb -d forward tcp:8080 tcp:8080
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
write-host "adb forward tcp:8080 tcp:8080 failed with exit code $($proc.exitcode)"
|
||||
write-host "adb forward tcp:8080 tcp:8080 failed with exit code $($exitCode)"
|
||||
return
|
||||
}
|
||||
write-host "checking for rayhunter server..." -nonewline
|
||||
|
||||
Reference in New Issue
Block a user