-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit eb4b1b8
Showing
72 changed files
with
8,219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
iptables-persistent iptables-persistent/autosave_v6 boolean false | ||
iptables-persistent iptables-persistent/autosave_v4 boolean false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
keyboard-configuration keyboard-configuration/model select Generic 105-key PC (intl.) | ||
keyboard-configuration keyboard-configuration/compose select No compose key | ||
keyboard-configuration keyboard-configuration/toggle select No toggling | ||
keyboard-configuration keyboard-configuration/store_defaults_in_debconf_db boolean true | ||
keyboard-configuration keyboard-configuration/unsupported_config_options boolean true | ||
keyboard-configuration keyboard-configuration/xkb-keymap select gb | ||
keyboard-configuration keyboard-configuration/optionscode string | ||
keyboard-configuration keyboard-configuration/switch select No temporary switch | ||
keyboard-configuration keyboard-configuration/layout select German | ||
keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout | ||
keyboard-configuration keyboard-configuration/modelcode string pc105 | ||
keyboard-configuration keyboard-configuration/unsupported_options boolean true | ||
keyboard-configuration keyboard-configuration/unsupported_layout boolean true | ||
keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean false | ||
keyboard-configuration keyboard-configuration/unsupported_config_layout boolean true | ||
keyboard-configuration keyboard-configuration/variant select German | ||
keyboard-configuration keyboard-configuration/layoutcode string de | ||
keyboard-configuration keyboard-configuration/variantcode string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tzdata tzdata/Zones/Europe select Berlin | ||
tzdata tzdata/Zones/Indian select | ||
tzdata tzdata/Zones/Pacific select | ||
tzdata tzdata/Zones/Atlantic select | ||
tzdata tzdata/Zones/Africa select | ||
tzdata tzdata/Zones/Asia select | ||
tzdata tzdata/Zones/Etc select UTC | ||
tzdata tzdata/Zones/SystemV select | ||
tzdata tzdata/Zones/Arctic select | ||
tzdata tzdata/Zones/US select | ||
tzdata tzdata/Zones/Australia select | ||
tzdata tzdata/Areas select Europe | ||
tzdata tzdata/Zones/America select | ||
tzdata tzdata/Zones/Antarctica select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wireshark-common wireshark-common/install-setuid boolean true |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dir-listing.encoding = "utf-8" | ||
$HTTP["url"] =~ "^/~pi/caps($|/)" { | ||
dir-listing.activate = "enable" | ||
} | ||
$HTTP["url"] =~ "^/~pi/scans($|/)" { | ||
dir-listing.activate = "enable" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$SERVER["socket"] == ":81" { | ||
server.document-root = "/home/pi/public_html" | ||
dir-listing.encoding = "utf-8" | ||
$HTTP["url"] =~ "^/caps($|/)" { | ||
dir-listing.activate = "enable" | ||
} | ||
$HTTP["url"] =~ "^/scans($|/)" { | ||
dir-listing.activate = "enable" | ||
} | ||
$HTTP["url"] =~ "^/admin" { | ||
proxy.server = ( "" => (( "host" => "192.168.24.1", "port" => "80")) ) | ||
} | ||
} | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=broadwayd | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=pi | ||
ExecStart=/usr/bin/broadwayd --port 10000 | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
$json = file_get_contents('php://input'); | ||
$data = json_decode($json); | ||
|
||
switch ($data[0]) { | ||
case 'mitmstart': | ||
executeCommand('sudo mitmon.sh'); | ||
break; | ||
|
||
case 'mitmstop': | ||
executeCommand('sudo mitmoff.sh'); | ||
break; | ||
|
||
case 'contcapstart': | ||
$filename = preg_replace('/[^\w-]/', '_', $data[1]); | ||
if ($filename == "") { | ||
$filename = date('d_m_Y-h_i_s', time()); | ||
} | ||
$time = filter_var($data[2], FILTER_SANITIZE_NUMBER_INT); | ||
if ((int) $time !== $time) { | ||
$time = 600; | ||
}; | ||
executeCommand("sudo contcap.sh " . $filename . " " . $time); | ||
break; | ||
|
||
case 'contcapstop': | ||
executeCommand("sudo killall dumpcap"); | ||
break; | ||
|
||
case 'systemdstart': | ||
$service = sanitizeSystemdService($data[1]); | ||
executeCommand("sudo systemctl start " . $service); | ||
break; | ||
|
||
case 'systemdstop': | ||
$service = sanitizeSystemdService($data[1]); | ||
executeCommand("sudo systemctl stop " . $service); | ||
break; | ||
|
||
case 'systemdrestart': | ||
$service = sanitizeSystemdService($data[1]); | ||
executeCommand("sudo systemctl restart " . $service); | ||
break; | ||
|
||
case 'poweroff': | ||
executeCommand("sudo systemctl poweroff"); | ||
break; | ||
|
||
default: | ||
http_response_code(404); | ||
echo "Unbekannter Befehl."; | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
|
||
//Array of linked services | ||
$services = array( | ||
array( | ||
'id' => 'pihole', | ||
'url' => '/admin', | ||
'title' => 'Pi-hole', | ||
'description' => 'DNS-Anfragen zeigen<br>Einstellungen ändern' | ||
), | ||
|
||
array( | ||
'id' => 'ntopng', | ||
'url' => ':3000', | ||
'title' => 'ntopng', | ||
'description' => 'Live-Netzwerkverkehr anzeigen' | ||
), | ||
|
||
array( | ||
'id' => 'wireshark', | ||
'url' => ':10000', | ||
'title' => 'Wireshark', | ||
'description' => 'Mitschnitt und Analyse' | ||
), | ||
|
||
array( | ||
'id' => 'mitm', | ||
'url' => ':9090', | ||
'title' => 'mitmproxy', | ||
'description' => 'HTTP(S)-Verkehr einsehen<br><a href=#tools>ein/ausschalten</a>' | ||
), | ||
|
||
array( | ||
'id' => 'caps', | ||
'url' => '/caps', | ||
'title' => 'pcap-Dateien', | ||
'description' => 'Gespeicherte Mitschnitte' | ||
), | ||
|
||
array( | ||
'id' => 'console', | ||
'url' => ':4200', | ||
'title' => 'Konsole', | ||
'description' => 'Kommandozeile öffnen' | ||
), | ||
|
||
); | ||
|
||
$interfaces = array(array('eth0', 'Uplink zum Internet'), array('br0', 'Testnetzwerk')); | ||
|
||
//array of controllable systemd services | ||
$systemd_services = array('hostapd', 'wireshark', 'broadwayd', 'mitmweb', 'shellinabox'); | ||
|
||
//array of integrated tools | ||
$tools = array( | ||
array( | ||
'id' => 'mitmon', | ||
'title' => 'mitm-Proxy aktivieren', | ||
'description' => 'Firewall-Regeln für Umleitung von Webzugriffen (Port 80 und 443) auf mitmproxy', | ||
'parameters' => array(), | ||
'buttons' => array( | ||
//id, class, title | ||
array('mitmstart', 'btn-success mr-3', 'Aktivieren'), | ||
array('mitmstop', 'btn-danger', 'Deaktivieren'), | ||
), | ||
), | ||
|
||
array( | ||
'id' => 'contcap', | ||
'title' => 'Schnüffeln im Hintergrund', | ||
'description' => 'Paketmitschnitt anstoßen', | ||
'parameters' => array( | ||
//title, text, default value | ||
array('Dateiname', 'text', date('d_m_Y-h_i_s', time())), | ||
array('Laufzeit', 'number', 600) | ||
), | ||
'buttons' => array( | ||
array('contcapstart', 'btn-success mr-3', 'Starten'), | ||
array('contcapstop', 'btn-danger', 'Abbrechen'), | ||
), | ||
), | ||
array( | ||
'id' => 'systemd', | ||
'title' => 'Dienste beeinflussen', | ||
'description' => 'Vorübergehend beenden oder neu starten', | ||
'parameters' => array( | ||
array('Dienst', 'select', $systemd_services) | ||
), | ||
'buttons' => array( | ||
array('systemdstart', 'btn-success mr-3', 'Start'), | ||
array('systemdstop', 'btn-danger mr-3', 'Stop'), | ||
array('systemdrestart', 'btn-warning', 'Neustart'), | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
block_global: False | ||
console_focus_follow: True | ||
ssl_insecure: True | ||
stream_websockets: True | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
// parse output of ip commands for given network device to get ip-addresses | ||
function getIPAddresses($device) | ||
{ | ||
exec('ip -o -4 a | awk \'$2 == "' . $device . '" { gsub(/\/.*/, "", $4); print $4 }\'', $ipv4_addr); | ||
exec('ip -o -6 a | awk \'$2 == "' . $device . '" { gsub(/\/.*/, "", $4); print $4 }\'', $ipv6_addr); | ||
|
||
$ipv4_addr = '<th class="thead-light">IPv4:</th><td>' . implode('</td><td>', $ipv4_addr) . '</td>'; | ||
$ipv6_addr = '<th class="thead-light">IPv6:</th><td>' . implode('</td><td>', $ipv6_addr) . '</td>'; | ||
return '<table class="table table-bordered"><tbody><tr>' . $ipv4_addr . '</tr><tr>' . $ipv6_addr . '</tr></tbody></table>'; | ||
} | ||
|
||
// echo divs that cause breaks in the card groups for certain screen widths | ||
function responsiveCardBreaks($i, $w = 'small') | ||
{ | ||
if ($w == 'small') { | ||
echo '<div class="w-100 d-block d-sm-none d-md-none d-lg-none"></div>'; | ||
if (($i + 1) % 2 == 0) { | ||
echo '<div class="w-100 d-none d-sm-block d-md-none d-lg-none"></div>'; | ||
} | ||
if (($i + 1) % 3 == 0) { | ||
echo '<div class="w-100 d-none d-sm-none d-md-block d-lg-none"></div>'; | ||
} | ||
if (($i + 1) % 4 == 0) { | ||
echo '<div class="w-100 d-block d-sm-none d-md-none d-lg-block d-xl-block"></div>'; | ||
} | ||
}; | ||
if ($w == 'wide') { | ||
echo '<div class="w-100 d-block d-sm-block d-md-block d-lg-none"></div>'; | ||
if (($i + 1) % 2 == 0) { | ||
echo '<div class="w-100 d-none d-sm-none d-md-none d-lg-block"></div>'; | ||
} | ||
}; | ||
if ($w == 'full') { | ||
echo '<div class="w-100 d-block"></div>'; | ||
}; | ||
} | ||
|
||
//create a select form from given data | ||
function buildSelect($title, $id, $options) | ||
{ | ||
$html_select = '<div class="form-group"> | ||
<label>%s</label> | ||
<select class="form-control parameter" id="%s"> | ||
%s | ||
</select> | ||
</div>'; | ||
$options_html = ""; | ||
for ($i = 0; $i < count($options); ++$i) { | ||
$options_html .= '<option value="' . $options[$i] . '"> | ||
' . $options[$i] . ' | ||
</option>'; | ||
}; | ||
|
||
return sprintf($html_select, $title, $id, $options_html); | ||
}; | ||
|
||
function sanitizeSystemdService($string) | ||
{ | ||
global $systemd_services; | ||
$sservice = preg_replace('/[^a-z_\-0-9]/i', '', $string); | ||
if (in_array($sservice, $systemd_services)) { | ||
return $sservice; | ||
} | ||
} | ||
|
||
function executeCommand($command) | ||
{ | ||
exec($command, $output, $return); | ||
if ($return != 0) { | ||
http_response_code(500); | ||
echo "Fehler beim Ausführen von: " . $command; | ||
} else { | ||
http_response_code(200); | ||
}; | ||
echo (implode("<br/>", $output)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
interface=wlan0 | ||
bridge=br0 | ||
ssid=raspion | ||
country_code=DE | ||
wpa=2 | ||
wpa_key_mgmt=WPA-PSK | ||
wpa_pairwise=CCMP | ||
rsn_pairwise=CCMP | ||
channel=5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
raspion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
127.0.0.1 localhost | ||
::1 localhost ip6-localhost ip6-loopback | ||
ff02::1 ip6-allnodes | ||
ff02::2 ip6-allrouters | ||
|
||
127.0.1.1 raspion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
a.btn { | ||
cursor: pointer; | ||
} | ||
.card-deck.card-full-width .card { | ||
max-width: calc(100% - 30px); | ||
} | ||
|
||
#footerlink { | ||
font-size:9px; | ||
} | ||
|
||
@media (min-width: 576px) { | ||
.card-deck.card-small-width) .card { | ||
max-width: calc(50% - 30px); | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.card-deck.card-small-width .card { | ||
max-width: calc(33.333% - 30px); | ||
} | ||
} | ||
|
||
@media (min-width: 992px) { | ||
.card-deck.card-small-width .card { | ||
max-width: calc(25% - 30px); | ||
} | ||
.card-deck.card-double-width .card { | ||
max-width: calc(50% - 30px); | ||
} | ||
} |
Oops, something went wrong.