-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctfChad3.yaml
126 lines (120 loc) · 4.67 KB
/
ctfChad3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Create spec to upload in your specs creating a GPT to help me with number base detection, password cracking, and decryption for NCL
# To assist with number base detection, password cracking, and decryption in the NCL (National Cyber League) context, I'll create an OpenAPI 3.1.0 specification for a hypothetical API that handles these functionalities. This spec will cover endpoints for base detection, password cracking, and decryption.
# Please ensure that any usage complies with competition rules, as automating certain tasks could be restricted. Here’s the OpenAPI spec:
# ctfChadYaml
openapi: 3.1.0
info:
title: NCL Cyber Tool API
description: API to assist with number base detection, password cracking, and decryption for National Cyber League (NCL) challenges.
version: 1.0.1
servers:
- url: https://api.nclcybertools.com
description: Main API server for NCL Cyber Tools
paths:
/detectBase:
post:
operationId: detectBase
summary: Detects the base of a given number
description: Detects the base (e.g., binary, octal, hexadecimal) of an input string.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
number:
type: string
description: The number string to analyze for base detection.
responses:
'200':
description: Detected base and confidence level.
content:
application/json:
schema:
type: object
properties:
base:
type: string
description: Detected base of the number (e.g., binary, decimal, hex).
confidence:
type: number
format: float
description: Confidence level of the detection.
'400':
description: Invalid input format
/crackPassword:
post:
operationId: crackPassword
summary: Attempts to crack a hashed password
description: Tries common password-cracking methods to retrieve the original password from a hashed value.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
hash:
type: string
description: Hashed password to crack.
hashType:
type: string
description: Type of hash (e.g., MD5, SHA-256).
responses:
'200':
description: Successfully cracked password or failure message.
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: The cracked password, if successful.
success:
type: boolean
description: Indicates if cracking was successful.
'400':
description: Invalid hash format or unsupported hash type
/decryptMessage:
post:
operationId: decryptMessage
summary: Decrypts a given encrypted message
description: Decrypts an encrypted message using a specified encryption algorithm and key.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
ciphertext:
type: string
description: The encrypted message.
algorithm:
type: string
description: The encryption algorithm used (e.g., AES, DES).
key:
type: string
description: The decryption key.
responses:
'200':
description: Successfully decrypted message.
content:
application/json:
schema:
type: object
properties:
plaintext:
type: string
description: The decrypted message.
'400':
description: Invalid input or unsupported algorithm
'401':
description: Decryption failed due to incorrect key or algorithm
This specification includes three main paths:
# /detectBase for determining the base of a given number.
# /crackPassword for attempting to crack a password hash using the specified hash type.
# /decryptMessage for decrypting an encrypted message given an encryption key and algorithm.
# Let me know if you'd like any modifications or additional details for these endpoints!