Fix Carriage Return

This commit is contained in:
Giulio 2020-05-21 16:44:20 +02:00
parent d0b6b58313
commit 11ea9972b6
13 changed files with 197 additions and 197 deletions

View File

@ -1,20 +1,20 @@
#!/usr/bin/env bash
# for dependencies
# apt install -t build-essential libncurses-dev bison flex libssl-dev libelf-dev
echo "[+] Starting build script..."
mkdir target/overlay/var/www/html
echo "[+] Cloning buildroot"
git clone https://github.com/buildroot/buildroot.git target
echo "[+] Building the keygen"
echo "[+] Adding customization files"
cp -R buildroot/* target/buildroot # copy buildroot configs
cp -R conf/* target/ovarlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/* target/ovarlay #copy the update script and certificate
echo "[+] Building the image"
N=`grep -c '^processor' /proc/cpuinfo`
cd target/buildroot
make -j$N
#!/usr/bin/env bash
# for dependencies
# apt install -t build-essential libncurses-dev bison flex libssl-dev libelf-dev
echo "[+] Starting build script..."
mkdir target/overlay/var/www/html
echo "[+] Cloning buildroot"
git clone https://github.com/buildroot/buildroot.git target
echo "[+] Building the keygen"
echo "[+] Adding customization files"
cp -R buildroot/* target/buildroot # copy buildroot configs
cp -R conf/* target/ovarlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/* target/ovarlay #copy the update script and certificate
echo "[+] Building the image"
N=`grep -c '^processor' /proc/cpuinfo`
cd target/buildroot
make -j$N

View File

@ -1,23 +1,23 @@
#!/bin/sh
case "$1" in
start)
printf "Starting hostapd: "
start-stop-daemon -S -x /usr/sbin/hostapd -- -B /etc/hostapd.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping hostapd: "
start-stop-daemon -K -q -x /usr/sbin/hostapd
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
#!/bin/sh
case "$1" in
start)
printf "Starting hostapd: "
start-stop-daemon -S -x /usr/sbin/hostapd -- -B /etc/hostapd.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping hostapd: "
start-stop-daemon -K -q -x /usr/sbin/hostapd
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

View File

@ -1,5 +1,5 @@
# /etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 192.168.77.1
# /etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 192.168.77.1
netmask 255.255.255.0

View File

@ -1,33 +1,33 @@
user www-data;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /var/www/html;
index index.html index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
include fastcgi_params;
}
}
user www-data;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /var/www/html;
index index.html index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
include fastcgi_params;
}
}
}

View File

@ -1,12 +1,12 @@
interface=wlan0
hw_mode=g
channel=1
wmm_enabled=1
ssid=Challenge-A2D0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=somepassword
interface=wlan0
hw_mode=g
channel=1
wmm_enabled=1
ssid=Challenge-A2D0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=somepassword
ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?php
$site = "crOS";
$flag = "ccIT{my_super_flag_1}";
$interface = "eth0";
$blacklist = array(';', '#', '(', ')', '|', '&', ' ', "\t", '<', '>');
<?php
$site = "crOS";
$flag = "ccIT{my_super_flag_1}";
$interface = "eth0";
$blacklist = array(';', '#', '(', ')', '|', '&', ' ', "\t", '<', '>');
?>

View File

@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $site ?> | <?php echo $title ?></title>
<link href="css/min.css" rel="stylesheet" type="text/css">
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $site ?> | <?php echo $title ?></title>
<link href="css/min.css" rel="stylesheet" type="text/css">
</head>
<body>

View File

@ -1,9 +1,9 @@
<nav class="nav" tabindex="-1" onclick="this.focus()">
<div class="container">
<a class="pagename current" href="#">ccOS</a>
<a href="index.php">Index</a>
<a href="utils.php">Utils</a>
<a href="update.php">Update</a>
</div>
</nav>
<nav class="nav" tabindex="-1" onclick="this.focus()">
<div class="container">
<a class="pagename current" href="#">ccOS</a>
<a href="index.php">Index</a>
<a href="utils.php">Utils</a>
<a href="update.php">Update</a>
</div>
</nav>
<button class="btn-close btn btn-sm">×</button>

View File

@ -1,30 +1,30 @@
<?php
$title = "Update";
require_once("includes/config.php");
require_once("includes/header.php");
require_once("includes/nav.php");
if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) {
move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc')
exec("/usr/bin/sudo /update.sh", $result);
}
?>
<div class="container">
<h2>System Update</h2>
<form id="update" enctype="multipart/form-data" method="post" action="">
<fieldset>
<input type="file" name="update">
<input type="submit" class="btn btn-b btn-sm smooth" value="Upload">
<p>
<ul>
<li>Please select the file <i>ccOS-ver-xxxx.tgz.cc</i></li>
<li>The update will take about 2 minutes</li>
<li>Updates are cryptographically signed for integrity and authenticity</li>
</ul>
</p>
</fieldset>
</form>
</div>
</body>
</html>
<?php
$title = "Update";
require_once("includes/config.php");
require_once("includes/header.php");
require_once("includes/nav.php");
if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) {
move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc')
exec("/usr/bin/sudo /update.sh", $result);
}
?>
<div class="container">
<h2>System Update</h2>
<form id="update" enctype="multipart/form-data" method="post" action="">
<fieldset>
<input type="file" name="update">
<input type="submit" class="btn btn-b btn-sm smooth" value="Upload">
<p>
<ul>
<li>Please select the file <i>ccOS-ver-xxxx.tgz.cc</i></li>
<li>The update will take about 2 minutes</li>
<li>Updates are cryptographically signed for integrity and authenticity</li>
</ul>
</p>
</fieldset>
</form>
</div>
</body>
</html>

View File

@ -1,53 +1,53 @@
<?php
$title = "Utils";
require_once("includes/config.php");
require_once("includes/header.php");
require_once("includes/nav.php");
if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] === 'ping' || $_POST['action'] === 'traceroute') && isset($_POST['host']) && !empty($_POST['host'])) {
switch ($_POST['action']) {
case 'ping':
$cmd = '/usr/bin/'.$_POST['action']. ' -c 4';
break;
case 'traceroute':
$cmd = '/usr/bin/'.$_POST['action'];
break;
}
$action = $_POST['action'];
$host = str_replace($blacklist, '', $_POST['host']);
exec($cmd.' '.$host, $result);
}
?>
<div class="container">
<h2>Utils</h2>
<h3>Ping</h3>
<form id="ping" method="post" action="">
<fieldset>
<input type="hidden" name="action" value="ping">
<input type="text" name="host" required>
<input type="submit" class="btn btn-b btn-sm smooth" value="Run">
</fieldset>
</form>
<?php
if (isset($action) && $action === "ping" && isset($result)) {
echo '<pre>'; foreach($result as $line) { echo $line."\n"; } echo '</pre>';
}
?>
<h3>Traceroute</h3>
<form id="traceroute" method="post" action="">
<fieldset>
<input type="hidden" name="action" value="traceroute" required>
<input type="text" name="host">
<input type="submit" class="btn btn-b btn-sm smooth" value="Run">
</fieldset>
</form>
<?php
if (isset($action) && $action === "traceroute" && isset($result)) {
echo '<pre>'; foreach($result as $line) { echo $line."\n"; } echo '</pre>';
}
?>
</div>
</body>
</html>
<?php
$title = "Utils";
require_once("includes/config.php");
require_once("includes/header.php");
require_once("includes/nav.php");
if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] === 'ping' || $_POST['action'] === 'traceroute') && isset($_POST['host']) && !empty($_POST['host'])) {
switch ($_POST['action']) {
case 'ping':
$cmd = '/usr/bin/'.$_POST['action']. ' -c 4';
break;
case 'traceroute':
$cmd = '/usr/bin/'.$_POST['action'];
break;
}
$action = $_POST['action'];
$host = str_replace($blacklist, '', $_POST['host']);
exec($cmd.' '.$host, $result);
}
?>
<div class="container">
<h2>Utils</h2>
<h3>Ping</h3>
<form id="ping" method="post" action="">
<fieldset>
<input type="hidden" name="action" value="ping">
<input type="text" name="host" required>
<input type="submit" class="btn btn-b btn-sm smooth" value="Run">
</fieldset>
</form>
<?php
if (isset($action) && $action === "ping" && isset($result)) {
echo '<pre>'; foreach($result as $line) { echo $line."\n"; } echo '</pre>';
}
?>
<h3>Traceroute</h3>
<form id="traceroute" method="post" action="">
<fieldset>
<input type="hidden" name="action" value="traceroute" required>
<input type="text" name="host">
<input type="submit" class="btn btn-b btn-sm smooth" value="Run">
</fieldset>
</form>
<?php
if (isset($action) && $action === "traceroute" && isset($result)) {
echo '<pre>'; foreach($result as $line) { echo $line."\n"; } echo '</pre>';
}
?>
</div>
</body>
</html>