old htb folders
This commit is contained in:
2023-08-29 21:53:22 +02:00
parent 62ab804867
commit 82b0759f1e
21891 changed files with 6277643 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,23 @@
FROM ruby:2.7.5-alpine3.15
# Install supervisor
RUN apk add --update --no-cache supervisor
# Setup user
RUN adduser -D -u 1000 -g 1000 -s /bin/sh www
# Copy challenge files
RUN mkdir /app
COPY challenge/ /app
COPY config/supervisord.conf /etc/supervisord.conf
# Install dependencies
WORKDIR /app
RUN bundle install
RUN gem install shotgun
# Expose the app port
EXPOSE 1337
# Start supervisord
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

View File

@@ -0,0 +1,2 @@
docker build -t web_neonify .
docker run --name=web_neonify --rm -p1337:1337 -it web_neonify

View File

@@ -0,0 +1,5 @@
source "http://rubygems.org"
gem "sinatra"
gem 'require_all'
gem 'shotgun'

View File

@@ -0,0 +1,22 @@
class NeonControllers < Sinatra::Base
configure do
set :views, "app/views"
set :public_dir, "public"
end
get '/' do
@neon = "Glow With The Flow"
erb :'index'
end
post '/' do
if params[:neon] =~ /^[0-9a-z ]+$/i
@neon = ERB.new(params[:neon]).result(binding)
else
@neon = "Malicious Input Detected"
end
erb :'index'
end
end

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>Neonify</title>
<link rel="stylesheet" href="stylesheets/style.css">
<link rel="icon" type="image/gif" href="/images/gem.gif">
</head>
<body>
<div class="wrapper">
<h1 class="title">Amazing Neonify Generator</h1>
<form action="/" method="post">
<p>Enter Text to Neonify</p><br>
<input type="text" name="neon" value="">
<input type="submit" value="Submit">
</form>
<h1 class="glow"><%= @neon %></h1>
</div>
</body>
</html>

View File

@@ -0,0 +1,2 @@
require_relative './config/environment'
run NeonControllers

View File

@@ -0,0 +1,10 @@
require 'bundler/setup'
APP_ENV = ENV["RACK_ENV"] || "development"
Bundler.require :default, APP_ENV.to_sym
require 'rubygems'
require 'bundler'
require_rel '../app'

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,73 @@
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
background-color: black;
color: white;
background-image: url(/images/gem.gif), url(/images/gem.gif), url(/images/gem.gif), url(/images/gem.gif);
background-position: top left, top right, bottom left, bottom right;
background-repeat: no-repeat;
background-attachment: fixed;
text-align: center;
font-family: 'Press Start 2P', cursive;
}
.wrapper {
width: 50%;
height:100%;
margin-top: 10%;
text-align: center;
margin-left: 25%;
margin-right: 25%;
}
.wrapper input[type=submit] {
background-color: #d01716;
border: none;
color: white;
height: 40px;
width: 130px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-family: 'Press Start 2P', cursive;
}
.wrapper input[type=text] {
border: none;
height: 35px;
width: 454px;
font-family: 'Press Start 2P', cursive;
font-size: 18px;
}
.title {
color: white;
font-size: 30px;
position: relative;
margin-left: auto;
margin-right: auto;
top: 0%;
text-align: center;
margin-top: 10%;
}
.glow {
font-size: 30px;
padding-top: 20px;
color: #FFF;
text-align: center;
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
}
@keyframes glow {
from {
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e84e40, 0 0 40px #e84e40, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
}
to {
text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
}
}

View File

@@ -0,0 +1,17 @@
[supervisord]
user=root
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
pidfile=/run/supervisord.pid
[program:shotgun]
directory=/app
user=www
command=shotgun -o0.0.0.0 -p1337 config.ru
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0