This file contains hidden or 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
function getLabId() { | |
return /\d+$/.exec(location.pathname)[0] | |
} | |
async function getActivity() { | |
const lab_id = getLabId(); | |
let page = 1; | |
let data = await (await fetch(`https://enterprise.hackthebox.com/api/v1/product/labs/${lab_id}/activity?page=${page}`)).json(); | |
const activities = data.data; | |
for (page++; page <= data.meta.last_page; page++) { |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import argparse | |
import dataclasses | |
import datetime | |
import os | |
import subprocess | |
import tarfile | |
import tempfile | |
from collections.abc import Generator |
OlderNewer