Closed potatoqualitee closed 3 years ago
Invoke-WebRequest -Uri "https://securitycenter/rest/file/upload" ` -Method "POST" ` -Headers @{ "Accept"="application/json, text/javascript, */*; q=0.01" "X-Requested-With"="XMLHttpRequest" } ` -ContentType "multipart/form-data; boundary=----WebKitFormBoundaryEn5zqqXVxLNArW5n" ` -Body ([System.Text.Encoding]::UTF8.GetBytes("------WebKitFormBoundaryEn5zqqXVxLNArW5n$([char]13)$([char]10)Content-Disposition: form-data; name=`"Filedata`"; filename=`"plugin.tar.gz`"$([char]13)$([char]10)Content-Type: application/x-gzip$([char]13)$([char]10)$([char]13)$([char]10)$([char]13)$([char]10)------WebKitFormBoundaryEn5zqqXVxLNArW5n--$([char]13)$([char]10)")) Invoke-WebRequest -Uri "https://securitycenter/rest/customPlugins/active/process" ` -Method "POST" ` -ContentType "application/x-www-form-urlencoded; charset=UTF-8" ` -Body "{`"filename`":`"SnPasX`"}"
filename is randomly generated and different each time
While you're at it
import dashboard import asset lists import nessus scan policy and xml scan
done done done
filename is randomly generated and different each time