Skip to main content

volgactf.final

PyPI PyPI - License

VolgaCTF Final is an automatic checking system (ACS) for A/D CTF contests.

This repository contains a CLI & public API library for Python 3.

Installation

$ pip install volgactf.final

Flag API

CLI mode

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final flag info 18adda0e7637fe8a3270808222b3a514= 023897b20007996a0563ab92381f38cc=
18adda0e7637fe8a3270808222b3a514= SUCCESS
  Team: Lorem
  Service: Ipsum
  Round: 1
  Not before: 5/30 16:19:37
  Expires: 5/30 16:24:37
023897b20007996a0563ab92381f38cc= SUCCESS
  Team: Dolor
  Service: Sit
  Round: 1
  Not before: 5/30 16:19:37
  Expires: 5/30 16:24:37

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final flag submit 18adda0e7637fe8a3270808222b3a514= 023897b20007996a0563ab92381f38cc=
18adda0e7637fe8a3270808222b3a514= SUCCESS
023897b20007996a0563ab92381f38cc= SUCCESS

Note 1. https://final.volgactf.ru stands for an ACS endpoint.

You can submit several flags at once. Please take flag API rate limits into consideration.

Library mode

from volgactf.final.flag_api import FlagAPIHelper

h = FlagAPIHelper('https://final.volgactf.ru')

flags = [
    '18adda0e7637fe8a3270808222b3a514=',
    '023897b20007996a0563ab92381f38cc='
]

r1 = h.get_info(*flags)
# [{'flag': '18adda0e7637fe8a3270808222b3a514=', 'code': <GetInfoResult.SUCCESS: 0>, 'exp': datetime.datetime(2018, 5, 30, 16, 24, 37, tzinfo=tzlocal()), 'service': u'Ipsum', 'team': u'Lorem', 'round': 1, 'nbf': datetime.datetime(2018, 5, 30, 16, 19, 37, tzinfo=tzlocal())}, {'flag': '023897b20007996a0563ab92381f38cc=', 'code': <GetInfoResult.SUCCESS: 0>, 'exp': datetime.datetime(2018, 5, 30, 16, 24, 37, tzinfo=tzlocal()), 'service': u'Sit', 'team': u'Dolor', 'round': 1, 'nbf': datetime.datetime(2018, 5, 30, 16, 19, 37, tzinfo=tzlocal())}]

r2 = h.submit(*flags)
# [{'flag': u'18adda0e7637fe8a3270808222b3a514=', 'code': <SubmitResult.SUCCESS: 0>}, {'flag': u'023897b20007996a0563ab92381f38cc=', 'code': <SubmitResult.SUCCESS: 0>}]

Result codes are specified in volgactf.final.flag_api.GetInfoResult and volgactf.final.flag_api.SubmitResult enums.

Capsule API

CLI mode

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final capsule public_key
SUCCESS
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6O4HeeDG/p7CYoHrDh54SBV2RoYW
oOvajNCsb0tBWPC6VZK2jTFhwzShgAnkwkUvzZMMdDiSmHCZOm5x6KZ25Q==
-----END PUBLIC KEY-----

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final capsule decode eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJmbGFnIjoiZTI0MWNhZDgwZmE1YzFlZGVlYTE1ZjllNjc4YWU4OTA9In0.5lRNzKi_EPcT_wm6i8X0uhwSrV8y8JW0HAATC0dURV8WIEkHsYWoDACd4laaqWdzkS8No-2QREvEF4f5eg4HFw
SUCCESS
Flag: e241cad80fa5c1edeea15f9e678ae890=

Library mode

from volgactf.final.capsule_api import CapsuleAPIHelper

h = CapsuleAPIHelper('https://final.volgactf.ru')

r1 = h.get_public_key()
# {'public_key': u'-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6O4HeeDG/p7CYoHrDh54SBV2RoYW\noOvajNCsb0tBWPC6VZK2jTFhwzShgAnkwkUvzZMMdDiSmHCZOm5x6KZ25Q==\n-----END PUBLIC KEY-----\n', 'code': <GetPublicKeyResult.SUCCESS: 0>}

r2 = h.decode('eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJmbGFnIjoiZTI0MWNhZDgwZmE1YzFlZGVlYTE1ZjllNjc4YWU4OTA9In0.5lRNzKi_EPcT_wm6i8X0uhwSrV8y8JW0HAATC0dURV8WIEkHsYWoDACd4laaqWdzkS8No-2QREvEF4f5eg4HFw')
# {'decoded': {u'flag': u'e241cad80fa5c1edeea15f9e678ae890='}, 'code': <DecodeResult.SUCCESS: 0>}

Result codes are specified in volgactf.final.capsule_api.GetPublicKeyResult and volgactf.final.capsule_api.DecodeResult enums.

Service API

CLI mode

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final service list
SUCCESS
#1 Lorem
#2 Ipsum

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final service status 1 2
#1 UP
#2 NOT_UP

Library mode

from volgactf.final.service_api import ServiceAPIHelper

h = ServiceAPIHelper('https://final.volgactf.ru')

r1 = h.list()
# {'code': <ListResult.SUCCESS: 0>, 'list': [{'id': 1, 'name': 'Lorem'},{'id': 2, 'name': 'Ipsum'}]}

r2 = h.get_status(1, 2)
# [{'service_id': 1, 'code': <GetServiceStatusResult.UP: 0>}, {'service_id': 2, 'code': <GetServiceStatusResult.NOT_UP: 2>}]

r3 = h.is_up(1)
# True

Result codes are specified in volgactf.final.service_api.ListResult and volgactf.final.service_api.GetServiceStatusResult enums.

Open Data API

CLI mode

$ VOLGACTF_FINAL_API_ENDPOINT=https://final.volgactf.ru volgactf-final open_data --team-id 2 --service-id 1
SUCCESS
[
  {
    "round_id": 34,
    "team_id": 2,
    "service_id": 1,
    "open_data": {
      "username": "chk_c59edf8b4cf94c099037994ccf607858"
    },
    "expires": "2026-09-09T13:50:05+00:00"
  },
  {
    "round_id": 35,
    "team_id": 2,
    "service_id": 1,
    "open_data": {
      "username": "chk_c99065f44fdd4f5ea76cfaeb16aae93a"
    },
    "expires": "2026-09-09T13:52:06+00:00"
  },
  {
    "round_id": 36,
    "team_id": 2,
    "service_id": 1,
    "open_data": {
      "username": "chk_31a358df429e4b9faa440dbcdeda3a66"
    },
    "expires": "2026-09-09T13:54:06+00:00"
  }
]

$ volgactf-final open_data --team-id 2 --service-id 1 --no-decode
SUCCESS
[
  {
    "round_id": 34,
    "team_id": 2,
    "service_id": 1,
    "open_data": "{\"username\": \"chk_c59edf8b4cf94c099037994ccf607858\"}",
    "expires": "2026-09-09T13:50:05+00:00"
  },
  {
    "round_id": 35,
    "team_id": 2,
    "service_id": 1,
    "open_data": "{\"username\": \"chk_c99065f44fdd4f5ea76cfaeb16aae93a\"}",
    "expires": "2026-09-09T13:52:06+00:00"
  },
  {
    "round_id": 36,
    "team_id": 2,
    "service_id": 1,
    "open_data": "{\"username\": \"chk_31a358df429e4b9faa440dbcdeda3a66\"}",
    "expires": "2026-09-09T13:54:06+00:00"
  }
]

Both --team-id and --service-id filters are optional. The command prints SUCCESS followed by the JSON list, or ERROR on failure. Use --no-decode to preserve the original payload strings. TLS verification is enabled by default.

Library mode

from volgactf.final.open_data_api import OpenDataAPIHelper, OpenDataResult

h = OpenDataAPIHelper('https://final.volgactf.test')
r1 = h.open_data(team_id=2, service_id=1)
# {'code': <OpenDataResult.SUCCESS: 0>, 'list': [{'round_id': 34, 'team_id': 2, 'service_id': 1, 'open_data': {'username': 'chk_c59edf8b4cf94c099037994ccf607858'}, 'expires': '2026-09-09T13:50:05+00:00'}, {'round_id': 35, 'team_id': 2, 'service_id': 1, 'open_data': {'username': 'chk_c99065f44fdd4f5ea76cfaeb16aae93a'}, 'expires': '2026-09-09T13:52:06+00:00'}, {'round_id': 36, 'team_id': 2, 'service_id': 1, 'open_data': {'username': 'chk_31a358df429e4b9faa440dbcdeda3a66'}, 'expires': '2026-09-09T13:54:06+00:00'}]}

r2 = h.open_data(team_id=2, service_id=1, decode=False)
# {'code': <OpenDataResult.SUCCESS: 0>, 'list': [{'round_id': 34, 'team_id': 2, 'service_id': 1, 'open_data': '{"username": "chk_c59edf8b4cf94c099037994ccf607858"}', 'expires': '2026-09-09T13:50:05+00:00'}, {'round_id': 35, 'team_id': 2, 'service_id': 1, 'open_data': '{"username": "chk_c99065f44fdd4f5ea76cfaeb16aae93a"}', 'expires': '2026-09-09T13:52:06+00:00'}, {'round_id': 36, 'team_id': 2, 'service_id': 1, 'open_data': '{"username": "chk_31a358df429e4b9faa440dbcdeda3a66"}', 'expires': '2026-09-09T13:54:06+00:00'}]}

team_id and service_id accept integers or None (no filter). When both are supplied, both must match. Filtering happens before decoding. By default, each selected row's open_data string is first decoded as strict base64 if valid; otherwise the original string is used. The resulting payload is then parsed as JSON and must be a dictionary, which replaces the row's open_data string. Other fields and row order are preserved. Set decode=False to skip payload decoding entirely.

Successful calls return {'code': OpenDataResult.SUCCESS, 'list': [...]}. Any request, filtering, or decoding failure returns only {'code': OpenDataResult.ERROR}. Decoding stops at the first failed row; no partial list is returned.

License

MIT @ VolgaCTF

Release files for volgactf.final 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for volgactf.final 3.1.0
File Size Uploaded
volgactf_final-3.1.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for volgactf.final 3.1.0
File Interpreter ABI Platform
volgactf_final-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / volgactf_final-3.1.0.tar.gz

Download URL volgactf_final-3.1.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63dec647bb8e1466b19cc90aa0d0611da393218cb7866a7931ba0fb141be1670
BLAKE2b-256 checksum
How to use checksums
34633326ffffcb48b1e176cd6fc35fc7510651221bc9c15c3a0a06e5831072c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / volgactf_final-3.1.0-py3-none-any.whl

Download URL volgactf_final-3.1.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef350fb8aa20511a139073b1ce8711ddcc76a2eca6a0a313bb45ebf1b6769d09
BLAKE2b-256 checksum
How to use checksums
bce31fe8b52a4b0bffda77f03426070cd0a8e38321da5fce9209fdc7e770d10a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.0

2 release files

2.0.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page