Skip to content

Commit

Permalink
API Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Savallator committed Jun 4, 2020
1 parent debf2bf commit d06b001
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions enochecker_cli/__init__.py
Expand Up @@ -18,23 +18,23 @@ def main():
help="The URL of the checker")
parser.add_argument("-a", '--address', type=str, default="localhost",
help="The ip or address of the remote team to check")
parser.add_argument("-t", '--team', type=str, default="team",
parser.add_argument("-t", '--team_name', type=str, default="team1",
help="The name of the target team to check")
parser.add_argument("-T", '--team_id', type=int, default=1,
help="The Team_id belonging to the specified Team")
parser.add_argument("-I", "--run_id", type=int, default=1,
help="An id for this run. Used to find it in the DB later.")
parser.add_argument("-r", '--round', type=int, default=1,
parser.add_argument("-r", '--round_id', type=int, default=1,
help="The round we are in right now")
parser.add_argument("-R", "--round_length", type=int, default=300,
help="The round length in seconds (default 300)")
parser.add_argument("-f", '--flag', type=str, default="ENOFLAGENOFLAG=",
help="The Flag, a Fake flag or a Unique ID, depending on the mode")
parser.add_argument("-F", '--flag_round', type=int, default=1,
parser.add_argument("-F", '--related_round_id', type=int, default=1,
help="The Round the Flag belongs to (was placed)")
parser.add_argument("-x", '--timeout', type=int, default=30,
help="The maximum amount of time the script has to execute in seconds")
parser.add_argument("-i", '--flag_idx', type=int, default=0,
parser.add_argument("-i", '--flag_index', type=int, default=0,
help="Unique numerical index per round. Each id occurs once and is tighly packed, "
"starting with 0. In a service supporting multiple flags, this would be used to "
"decide which flag to place.")
Expand All @@ -46,11 +46,11 @@ def main():
0, # service_id
"", # ns.service_name,
ns.team_id,
ns.team,
ns.flag_round,
ns.round,
ns.team_name,
ns.round_id,
ns.related_round_id,
ns.flag,
ns.flag_idx)
ns.flag_index)

result = requests.post(ns.checker_address, data=jsons.dumps(msg), headers = { 'content-type': 'application/json' })
if result.ok:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
argparse>=1.4
requests>=2.20
enochecker_core>=0.2.0
enochecker_core==0.4
jsons>=1.0.0
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name='enochecker_cli',
version='0.2.1',
version='0.4.0',
entry_points = {
"console_scripts": ['enochecker_cli = enochecker_cli:main']
},
Expand Down

0 comments on commit d06b001

Please sign in to comment.