Skip to content

Commit

Permalink
Try to display error message in status panel
Browse files Browse the repository at this point in the history
  • Loading branch information
albinowax committed Jan 17, 2019
1 parent 6a96c1d commit 4df8545
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RequestEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ abstract class RequestEngine {
fun queue(template: String, payload: String?, learnBoring: Int?) {

if (payload != null && !template.contains("%s")) {
Utils.out("Aborting attack - no payload position specified. Add %s where you want the payload to go.")
throw Exception("Aborting attack - no payload position specified. Add %s where you want the payload to go.")
Utils.out("Add %s to the request where you want the payload to go.")
throw Exception("Add %s to the request where you want the payload to go.")
}

val request = buildRequest(template, payload, learnBoring)
Expand Down
7 changes: 6 additions & 1 deletion fast-http.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ fun evalJython(code: String, baseRequest: String, endpoint: String, baseInput: S
Utils.out("Attack aborted with items waiting to be queued.")
}
else {
handler.overrideStatus("Error launching attack - check extension output")
var message = ex.cause?.message

if (message == null) {
message = ex.toString()
}
handler.overrideStatus("Error, check extender for full details: "+message)
Utils.out("Error launching attack - bad python?")
Utils.out(stackTrace.toString())
}
Expand Down

0 comments on commit 4df8545

Please sign in to comment.