Skip to content
Snippets Groups Projects
Commit 6d2ce6cb authored by Ruben Anthony Gonzalez's avatar Ruben Anthony Gonzalez
Browse files

Add statistics

parent 66abfa1f
No related branches found
No related tags found
No related merge requests found
# ZerfiXOR
Very simple exploit launcher in < 200 lines of code.
Offers:
* Configurable Amount of workers
* Statistics output
* Automatic exploit dicovery
* State preserving
Start with: `python3 main.py`
## Adding an exploit
To add an exploit, just copy it into the `exploits` folder **and set the eXecute bit**.
The exploit can be written in any language, but needs a shebang line.
## Align for CTF
Adjust the `changeme.py` file to use the tool in a ctf.
## Statistics
To receive statistics, just do a `python3 statistics.py` (also works will launcher is running).
It will give you something like:
```
----------------------------------------------------------------------------------------------------------
|team_id |SUCCESS |INVALID |ALREADY_SUBMITTED |ERROR |
----------------------------------------------------------------------------------------------------------
|0 |2 |0 |1 |3 |
|1 |2 |2 |3 |0 |
|2 |3 |0 |1 |2 |
|3 |4 |1 |1 |0 |
|4 |3 |1 |1 |1 |
|5 |3 |0 |2 |1 |
|6 |2 |1 |1 |2 |
|7 |3 |0 |0 |3 |
|8 |2 |3 |0 |1 |
|9 |2 |1 |3 |0 |
|10 |2 |0 |1 |3 |
|11 |3 |1 |0 |2 |
|12 |2 |0 |2 |2 |
|13 |4 |0 |1 |1 |
|14 |3 |2 |0 |1 |
|15 |2 |2 |1 |1 |
----------------------------------------------------------------------------------------------------------
```
import changeme
import os
team_vals = {}
if not os.path.isfile(changeme.res_file_path):
print("No results given yet")
exit(1)
with open(changeme.res_file_path) as f:
for l in f:
ret_val, team_id, flag = l.strip().split(" ", 2)
ret_val = int(ret_val)
team_id = int(team_id)
if team_id not in team_vals:
team_vals[team_id] = [0] * len(changeme.MESSAGES)
team_vals[team_id][ret_val] += 1
def make_row(entries):
column_width = 3 + max(map(len, changeme.MESSAGES))
return "|" + "|".join([x.ljust(column_width, " ") for x in entries]) + "|"
header = make_row(["team_id"] + changeme.MESSAGES)
print("-" * len(header))
print(header)
print("-" * len(header))
for t in sorted(team_vals.keys()):
print(make_row([str(t)] + list(map(str, team_vals[t]))))
print("-" * len(header))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment