added official hacktheboo2024 writeups

This commit is contained in:
eplots 2024-10-23 11:10:43 +02:00
parent 1f7a9b0566
commit e3c46450f7
327 changed files with 14303 additions and 0 deletions

View file

@ -0,0 +1,7 @@
FROM registry.htbsvc.net/hackthebox/htb:coding_template
COPY --chown=root challenge/challenge.py /root/checker
COPY --chown=root challenge/flag.txt /root/checker
COPY --chown=www-data challenge/index.html /app/templates
EXPOSE 1337

View file

@ -0,0 +1,28 @@
![img](../../../../../assets/htb.png)
<img src='../../../../../assets/logo.png' style='zoom: 80%;' align=left /> <font size='10'>Addition</font>
1<sup>st</sup> October 2024
Prepared By: ir0nstone
Challenge Author(s): ir0nstone
Difficulty: <font color='green'>Very Easy</font>
# Synopsis
Given two numbers, return the sum.
## Skills Required
* Basic Python
# Solution
Take in the inputs, parse them to integers and then print the sum.
```py
a = int(input())
b = int(input())
print(a+b)
```

View file

@ -0,0 +1,3 @@
#!/bin/bash
docker build --tag=coding_addition .
docker run -p 1337:1337 --rm --name=coding_addition -it coding_addition

View file

@ -0,0 +1,6 @@
import random
def gen_question():
a, b = random.randint(1, 10_000), random.randint(1, 10_000)
return f'{a}\n{b}', f'{a+b}'

View file

@ -0,0 +1 @@
HTB{aDd1nG_4lL_tH3_waY}

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block title %}
Addition
{% endblock %}
{% block content %}
<p>
Take in two numbers, \( a \) and \( b \). Return \( a + b \).
</p>
{% endblock %}
{% block example_input %}
<p>
3
4
</p>
{% endblock %}
{% block example_output %}
<p>7</p>
{% endblock %}

View file

@ -0,0 +1,4 @@
a = int(input())
b = int(input())
print(a+b)