-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
report: Support --every flag for live updates
This commit introduces the `--every` flag in the report command which enables reports to be written out at specified interval. This allows inspection of results as attacks are happening, instead of after they finish. Fixes #345
- Loading branch information
Showing
3 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// +build !windows | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
var escCodes = []byte("\033[2J\033[0;0H") | ||
|
||
func clearScreen() error { | ||
_, err := os.Stdout.Write(escCodes) | ||
return err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// +build windows | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
"os/exec" | ||
) | ||
|
||
func clearScreen() error { | ||
cmd := exec.Command("cmd", "/c", "cls") | ||
cmd.Stdout = os.Stdout | ||
return cmd.Run() | ||
} |