23 lines
1.5 KiB
PowerShell
23 lines
1.5 KiB
PowerShell
$ErrorActionPreference = "Continue"
|
|
Select-String -Path "E:\wwwroot\inquiry-new\logs\stdout.log" -Pattern "redis_parse=" | Select-Object -Last 3 | ForEach-Object { Write-Host $_.Line }
|
|
$bodyPath = Join-Path $env:TEMP "login-body.json"
|
|
Set-Content -Path $bodyPath -Value '{"username":"admin","password":"123456","captcha":"","checkKey":""}' -Encoding ASCII
|
|
$login = Invoke-RestMethod -Uri "http://127.0.0.1:8180/jeecgboot/sys/login" -Method POST -InFile $bodyPath -ContentType "application/json;charset=UTF-8"
|
|
Write-Host ("login_ok=" + $login.success + " code=" + $login.code)
|
|
$h = @{ "X-Access-Token" = $login.result.token }
|
|
$r = Invoke-WebRequest -Uri "http://127.0.0.1:8180/jeecgboot/inquiry/quoteTemplate/list?pageNo=1&pageSize=20" -Headers $h -UseBasicParsing
|
|
$j = $r.Content | ConvertFrom-Json
|
|
Write-Host ("list_success=" + $j.success + " code=" + $j.code + " total=" + $j.result.total + " records=" + @($j.result.records).Count)
|
|
if (-not $j.success) {
|
|
$msg = [string]$j.message
|
|
if ($msg.Length -gt 150) { $msg = $msg.Substring(0,150) }
|
|
Write-Host ("list_msg=" + $msg)
|
|
} else {
|
|
@($j.result.records) | Select-Object -First 5 | ForEach-Object {
|
|
Write-Host (" mode=" + $_.mode + " status=" + $_.status + " points=" + $_.mappingPointCount + " name_len=" + ([string]$_.name).Length)
|
|
}
|
|
}
|
|
$tail = Get-Content "E:\wwwroot\inquiry-new\logs\stdout.log" -Tail 50
|
|
$wp = @($tail | Select-String "WRONGPASS")
|
|
Write-Host ("tail50_WRONGPASS_count=" + $wp.Count)
|
|
Write-Host "VERIFY_DONE" |