Skip to content

Commit 11bd146

Browse files
authored
Merge branch 'dev' into 1152-implement-fetching-sparse-fieldsets
2 parents 1818850 + d6444f1 commit 11bd146

File tree

169 files changed

+2257
-1314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+2257
-1314
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN cd / && git rev-parse --short HEAD > /HEAD; exit 0
66

77
# BASE image
88
# ----BEGIN----
9-
FROM php:8-apache AS hashtopolis-server-base
9+
FROM php:8.4-apache AS hashtopolis-server-base
1010

1111
# Enable possible build args for injecting user commands
1212
ARG CONTAINER_USER_CMD_PRE
@@ -104,7 +104,7 @@ ENTRYPOINT [ "docker-entrypoint.sh" ]
104104
FROM hashtopolis-server-base AS hashtopolis-server-dev
105105

106106
# Setting up development requirements, install xdebug
107-
RUN yes | pecl install xdebug-3.4.0beta1 && docker-php-ext-enable xdebug \
107+
RUN yes | pecl install xdebug && docker-php-ext-enable xdebug \
108108
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
109109
&& echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
110110
&& echo "xdebug.start_with_request = yes" >> /usr/local/etc/php/conf.d/xdebug.ini \

ci/apiv2/hashtopolis.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# PoC testing/development framework for APIv2
55
# Written in python to work on creation of hashtopolis APIv2 python binding.
66
#
7+
import base64
78
from base64 import b64encode
89
import copy
910
import json
@@ -51,9 +52,9 @@ def __init__(self, *args, **kwargs):
5152
class HashtopolisConfig(object):
5253
def __init__(self):
5354
# Request access TOKEN, used throughout the test
54-
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults.{extension}')),) \
55+
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults{suffix}')),) \
5556
+ confidence.DEFAULT_LOAD_ORDER
56-
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order)
57+
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order, format=confidence.YAML())
5758
self._hashtopolis_uri = self._cfg['hashtopolis_uri']
5859
self._api_endpoint = self._hashtopolis_uri + '/api/v2'
5960
self.username = self._cfg['username']
@@ -1022,10 +1023,10 @@ def export_wordlist(self, hashlist):
10221023
response = self._helper_request("exportWordlist", payload)
10231024
return File(**response['data'])
10241025

1025-
def import_cracked_hashes(self, hashlist, source_data, separator):
1026+
def import_cracked_hashes(self, hashlist, source_data: str, separator):
10261027
payload = {
10271028
'hashlistId': hashlist.id,
1028-
'sourceData': source_data,
1029+
'sourceData': base64.b64encode(source_data.encode()).decode(),
10291030
'separator': separator,
10301031
}
10311032
response = self._helper_request("importCrackedHashes", payload)

ci/apiv2/hashtopolis_agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class ProcessState(enum.IntEnum):
4646
class HashtopolisConfig(object):
4747
def __init__(self):
4848
# Request access TOKEN, used throughout the test
49-
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults.{extension}')),) \
49+
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults{suffix}')),) \
5050
+ confidence.DEFAULT_LOAD_ORDER
51-
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order)
51+
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order, format=confidence.YAML())
5252
self._hashtopolis_uri = self._cfg['hashtopolis_uri']
5353
self._api_endpoint = self._hashtopolis_uri + '/api/v2'
5454
self.username = self._cfg['username']
@@ -60,9 +60,9 @@ class DummyAgent(object):
6060
# State: Early Alpha
6161
def __init__(self, token=None, voucher=None):
6262
# Request access TOKEN, used throughout the test
63-
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults.{extension}')),) \
63+
load_order = (str(Path(__file__).parent.joinpath('{name}-defaults{suffix}')),) \
6464
+ confidence.DEFAULT_LOAD_ORDER
65-
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order)
65+
self._cfg = confidence.load_name('hashtopolis-test', load_order=load_order, format=confidence.YAML())
6666
self._hashtopolis_uri = self._cfg['hashtopolis_uri']
6767
self._api_endpoint = self._hashtopolis_uri + '/api/server.php'
6868

ci/apiv2/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
click
22
click_log
3-
confidence
3+
confidence==0.17
44
pytest
55
tuspy

ci/tests/integration/MaxAgentsTest.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function testTaskMaxAgents($hashlistId) {
126126
"action" => "getChunk",
127127
"taskId" => $task1Id,
128128
"token" => $agent2["token"]]);
129-
if ($response["response"] !== "ERROR" || $response["message"] != "Task already saturated by other agents, no other task available!") {
129+
if ($response["response"] !== "ERROR" || $response["message"] != "You are not assigned to this task!") {
130130
$this->testFailed("MaxAgentsTest:testTaskMaxAgents()", sprintf("Expected getChunk to fail, instead got: %s", implode(", ", $response)));
131131
return;
132132
}
@@ -607,4 +607,4 @@ public function getTestName() {
607607
}
608608
}
609609

610-
HashtopolisTestFramework::register(new MaxAgentsTest());
610+
HashtopolisTestFramework::register(new MaxAgentsTest());

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^8.0",
20+
"php": "^8.2",
2121
"ext-json": "*",
2222
"ext-pdo": "*",
23+
"composer/semver": "^3.4",
2324
"crell/api-problem": "^3.6",
25+
"jimtools/jwt-auth": "^2.3",
2426
"middlewares/encoder": "^2.1",
2527
"middlewares/negotiation": "^2.1",
2628
"monolog/monolog": "^2.8",
2729
"php-di/php-di": "7.0.7",
2830
"slim/psr7": "^1.5",
2931
"slim/slim": "^4.10",
30-
"tuupola/slim-basic-auth": "^3.3",
31-
"tuupola/slim-jwt-auth": "^3.6",
32-
"composer/semver": "^3.4"
32+
"tuupola/slim-basic-auth": "^3.3"
3333
},
3434
"require-dev": {
3535
"jangregor/phpstan-prophecy": "^1.0.0",
@@ -44,7 +44,10 @@
4444
"phpstan/extension-installer": true
4545
},
4646
"process-timeout": 0,
47-
"sort-packages": true
47+
"sort-packages": true,
48+
"audit": {
49+
"block-insecure": false
50+
}
4851
},
4952
"autoload": {
5053
"psr-4": {

0 commit comments

Comments
 (0)