Add modules to repository
21
RandomRoll/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Foxtrot (Marc) <foxtrotnull@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
108
RandomRoll/api/module.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php namespace pineapple;
|
||||
|
||||
class RandomRoll extends Module
|
||||
{
|
||||
public function route()
|
||||
{
|
||||
switch ($this->request->action) {
|
||||
case 'checkStatus':
|
||||
$this->checkStatus();
|
||||
break;
|
||||
case 'startRandomRoll':
|
||||
$this->startRandomRoll();
|
||||
break;
|
||||
|
||||
case 'stopRandomRoll':
|
||||
$this->stopRandomRoll();
|
||||
break;
|
||||
|
||||
case 'getRandomRollRolls':
|
||||
$this->getRandomRollRolls();
|
||||
break;
|
||||
|
||||
case 'getRandomRollLogs':
|
||||
$this->getRandomRollLogs();
|
||||
break;
|
||||
|
||||
case 'clearRandomRollLogs':
|
||||
$this->clearRandomRollLogs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function checkStatus()
|
||||
{
|
||||
$running = file_get_contents('/pineapple/modules/RandomRoll/assets/running');
|
||||
if($running == 1){
|
||||
$this->response = array("running" => true);
|
||||
} else {
|
||||
$this->response = array("running" => false);
|
||||
}
|
||||
}
|
||||
|
||||
private function startRandomRoll()
|
||||
{
|
||||
$date = date("Ymd H:i:s -- ");
|
||||
file_put_contents("/pineapple/modules/RandomRoll/assets/logs/randomroll.log", $date . "RandomRoll Started\n", FILE_APPEND);
|
||||
|
||||
foreach($this->request->selected as $roll){
|
||||
$title = $roll->randomRollTitle;
|
||||
$checked = $roll->randomRollChecked;
|
||||
if ($checked){
|
||||
exec('iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $(uci get network.lan.ipaddr):80');
|
||||
exec('iptables -t nat -A POSTROUTING -j MASQUERADE');
|
||||
exec('mv /www/index.php /pineapple/modules/RandomRoll/assets/www/index.php');
|
||||
symlink('/pineapple/modules/RandomRoll/assets/selector.php', '/www/index.php');
|
||||
@mkdir('/www/Rolls');
|
||||
symlink("/pineapple/modules/RandomRoll/assets/Rolls/{$title}", "/www/Rolls/{$title}");
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents('/pineapple/modules/RandomRoll/assets/running', '1');
|
||||
|
||||
$this->response = array("success" => true);
|
||||
}
|
||||
|
||||
private function stopRandomRoll()
|
||||
{
|
||||
$date = date("Ymd H:i:s -- ");
|
||||
file_put_contents("/pineapple/modules/RandomRoll/assets/logs/randomroll.log", $date . "RandomRoll Stopped\n\n", FILE_APPEND);
|
||||
|
||||
exec('iptables -t nat -D PREROUTING -p tcp --dport 80 -j DNAT --to-destination $(uci get network.lan.ipaddr):80');
|
||||
unlink('/www/index.php');
|
||||
exec('mv /pineapple/modules/RandomRoll/assets/www/index.php /www/index.php');
|
||||
exec('rm -rf /www/Rolls/');
|
||||
|
||||
file_put_contents('/pineapple/modules/RandomRoll/assets/running', '0');
|
||||
|
||||
$this->response = array("success" => true);
|
||||
}
|
||||
|
||||
private function getRandomRollRolls()
|
||||
{
|
||||
$rolls = array();
|
||||
|
||||
foreach(glob("/pineapple/modules/RandomRoll/assets/Rolls/*") as $roll){
|
||||
$rollname = basename($roll);
|
||||
array_push($rolls, array("randomRollTitle" => $rollname, "randomRollChecked" => false));
|
||||
}
|
||||
|
||||
$this->response = $rolls;
|
||||
}
|
||||
|
||||
private function getRandomRollLogs()
|
||||
{
|
||||
$randomRollLogOutput = file_get_contents('/pineapple/modules/RandomRoll/assets/logs/randomroll.log');
|
||||
$this->response = array("randomRollLogOutput" => $randomRollLogOutput);
|
||||
}
|
||||
|
||||
private function clearRandomRollLogs()
|
||||
{
|
||||
file_put_contents("/pineapple/modules/RandomRoll/assets/logs/randomroll.log", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
RandomRoll/assets/Rolls/ASCIIRoll/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/ASCIIRoll/asset/song.ogg
Normal file
59
RandomRoll/assets/Rolls/ASCIIRoll/index.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
|
||||
<!-- RickRoll for RandomRoll Created by Foxtrot -->
|
||||
|
||||
<head>
|
||||
<title>Never gonna give you up!</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="black">
|
||||
<font color="white">
|
||||
<table width="60%" border="0" align="center">
|
||||
|
||||
<tr>
|
||||
</h1>
|
||||
..................... Y O U H A V E B E E N R I C K R O L L E D ..............................<br>
|
||||
.........................................................................................,-~~'''''''~~--,,_<br>
|
||||
....................................................................................,-~''-,:::::::::::::::::::''-,<br>
|
||||
...............................................................................,~''::::::::',::::::::::::::::::::|',<br>
|
||||
...............................................................................|::::::,-~'''___''''~~--~''':}<br>
|
||||
...............................................................................'|:::::|: : : : : : : : : : : : : : :|<br>
|
||||
...............................................................................|:::::|: : :-~o---: : : --o--: |<br>
|
||||
..............................................................................(_''~-': : : : : : :| : : : : : :|<br>
|
||||
.............................................................................'''~-,|: : : : : : ~_---': : : :,' --NEVER GONNA<br>
|
||||
...................................................................................|,: : : : : : :-( )~~--::/ -----GIVE YOU UP!<br>
|
||||
..............................................................................,-''\':\: :'~,,_: : --: : : _,-'<br>
|
||||
........................................................................__,-';;;;;\:''-,: : : :'~---~''/|<br>
|
||||
...............................................................__,-~'';;;;;;/;;;;;;;\: :\: : :____/: :',__<br>
|
||||
...................................................,-~~~''''_;;;;;;;;;;;;;;;;;;;;;;;;;',. .''-,:|:::::::|. . |;;;;''-,__<br>
|
||||
................................................../;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;;;;;;;;\. . .''|::::::::|. .,';;;;;;;;;;''-,<br>
|
||||
................................................,';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;;;;;;;;\. . .\:::::,'. ./|;;;;;;;;;;;;;|<br>
|
||||
.............................................,-'';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\;;;;;;;;;;;',: : __|. . .|;;;;;;;;;,';;|<br>
|
||||
...........................................,-";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;',;;;;;;;;;;;\. . |:::|. . .'',;;;;;;;;|;;/<br>
|
||||
........................................../;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;;;;;;;;;;;\;;;;;;;;;;;\. .|:::|. . . |;;;;;;;;|/<br>
|
||||
......................................../;;,-';;;;;;;;;;;;;;;;;;;;;;,';;;;;;;;;;;;;;;;;,;;;;;;;;;;|. .\:/. . . .|;;;;;;;;|<br>
|
||||
......................................./;;;;;;;;;;;;;;;;;;;;;;;;;;,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'',: |;|. . . . \;;;;;;;|<br>
|
||||
....................................,~'';;;;;;;;;;;;;;;;;;;;;,-'';;;;;;;;;;;;;;;;;;;;;;;;;;\;;;;;;;;|.|;|. . . . .|;;;;;;;|<br>
|
||||
................................,~'';;;;;;;;;;;;;;;;;;;;;;,-';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;',;;;;;;| |:|. . . . |\;;;;;;;|<br>
|
||||
...............................,';;;;;;;;;;;;;;;;;;;;;;;;/;;;,-';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;;;;| |:|. . . .'|;;',;;;;;|<br>
|
||||
..............................|;,-';;;;;;;;;;;;;;;;;;;,-';;;,-';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;;;| |:|. . .,';;;;;',;;;;|_<br>
|
||||
............................../;;;;;;;;;;;;;;;;;,-'_;;;;;;,';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;|.|:|. . .|;;;;;;;|;;;;|''''~-,<br>
|
||||
............................/;;;;;;;;;;;;;;;;;;/_'',;;;,';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;| |:|. . ./;;;;;;;;|;;;|;;;;;;|-,,__<br>
|
||||
........................../;;;;;;;;;;;;;;;;;,-'...|;;,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;| |:|._,-';;;;;;;;;|;;;;|;;;;;;;;;;;'''-,_<br>
|
||||
......................../;;;;;;;;;;;;;;;;,-'....,';;,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|.|:|::::'''~--~'''||;;;;;|;;;;;;;;;;,-~''''~--,<br>
|
||||
......................,';;;;;;;;;;;;;;;;,'....../;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|.|:|::::::::::::::|;;;;;',;;;;;;;;;''-,: : : : : :'''~-,:'''~~--,<br>
|
||||
...................../;;;;;;;;;;;;;;;,-'......,';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|:|:|::::::::::::::',;;;;;;|_''''~--,,-~---,,___, -~~'''__''~-\<br>
|
||||
..................,-';;;;;;;;;;;;;;;,'......../;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|:|:|:::::::::::::::|;;;;;;|..................... ''-,\_''-,''-,''~<br>
|
||||
................../;;;;;;;;;;;;;;;;/.......,-';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|:|:|:::::::::::::::|;;;;;|..................... ........._''<br>
|
||||
|
||||
<hr color="#CCCCCC" align="left" size="1">
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/ASCIIRoll/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/ASCIIRoll/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
RandomRoll/assets/Rolls/ASCIIRoll/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
RandomRoll/assets/Rolls/Afro/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
RandomRoll/assets/Rolls/Afro/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/Afro/asset/song.ogg
Normal file
17
RandomRoll/assets/Rolls/Afro/index.php
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Afro Circus Afro Circus Afro Circus Afro Circus</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#0C31C4">
|
||||
<center>
|
||||
<img src="Rolls/Afro/asset/gif.gif" />
|
||||
</center>
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/Afro/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/Afro/asset/.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
</body>
|
||||
|
||||
<!-- Foxtrot, sebkinne -->
|
||||
BIN
RandomRoll/assets/Rolls/Afro/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
RandomRoll/assets/Rolls/BSOD/asset/bsodknipper.gif
Normal file
|
After Width: | Height: | Size: 915 B |
BIN
RandomRoll/assets/Rolls/BSOD/asset/knipperbsod.gif
Normal file
|
After Width: | Height: | Size: 920 B |
BIN
RandomRoll/assets/Rolls/BSOD/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/BSOD/asset/song.ogg
Normal file
69
RandomRoll/assets/Rolls/BSOD/index.php
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>0x800000300000600000</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background:#0000aa;
|
||||
color:#ffffff;
|
||||
font-family:courier;
|
||||
font-size:12pt;
|
||||
text-align:center;
|
||||
margin:100px;
|
||||
font-style:bold;
|
||||
}
|
||||
|
||||
blink {
|
||||
color:yellow;
|
||||
}
|
||||
|
||||
.neg {
|
||||
background:#fff;
|
||||
color:#0000aa;
|
||||
padding:2px 8px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
p {
|
||||
margin:30px 100px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
a,a:hover {
|
||||
color:inherit;
|
||||
font:inherit;
|
||||
}
|
||||
|
||||
.menu {
|
||||
text-align:center;
|
||||
margin-top:50px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<span class="neg">WINDOWS</span>
|
||||
<p>
|
||||
An exception 06 has occured at 0028:C11B3ADC in VxD DiskTSD(03) +<br />
|
||||
00001660. This was called from 0028:C11B40CB in VxD voltrack(04) +<br />
|
||||
00000000. It may be possible to continue normally.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
* Press any key to attempt to continue.<br />
|
||||
|
||||
* Press CTRL+ALT+DEL to restart your computer. You will<br />
|
||||
lose unsaved information in any programs that are running.
|
||||
</p>
|
||||
Press any key to continue<img src="Rolls/BSOD/asset/bsodknipper.gif" name="knipper" />
|
||||
</center>
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/BSOD/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/BSOD/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
RandomRoll/assets/Rolls/BSOD/logo.jpg
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
RandomRoll/assets/Rolls/NyanCat/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
RandomRoll/assets/Rolls/NyanCat/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/NyanCat/asset/song.ogg
Normal file
18
RandomRoll/assets/Rolls/NyanCat/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<!-- NyanRoll by Foxtrot -->
|
||||
<title>Nyan Nyan Nyan Nyan Ny-argh give it a rest.</title>
|
||||
</head>
|
||||
<body bgcolor="blue">
|
||||
<center>
|
||||
<img src="Rolls/NyanCat/asset/gif.gif">
|
||||
</center>
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/NyanCat/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/NyanCat/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
BIN
RandomRoll/assets/Rolls/NyanCat/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
RandomRoll/assets/Rolls/PBJT/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
RandomRoll/assets/Rolls/PBJT/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/PBJT/asset/song.ogg
Normal file
18
RandomRoll/assets/Rolls/PBJT/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<!-- PBJTRoll for RandomRoll Created by Foxtrot -->
|
||||
|
||||
<title>PEANUT BUTTER JELLY PEANUT BUTTER JELLY PEANUT BUTTER JELLY</title>
|
||||
</head>
|
||||
<body bgcolor="yellow">
|
||||
<center>
|
||||
<img src="Rolls/PBJT/asset/gif.gif">
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/PBJT/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/PBJT/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
BIN
RandomRoll/assets/Rolls/PBJT/logo.jpg
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
RandomRoll/assets/Rolls/RCM/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 4.9 MiB |
BIN
RandomRoll/assets/Rolls/RCM/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/RCM/asset/song.ogg
Normal file
17
RandomRoll/assets/Rolls/RCM/index.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<!-- RCMRoll originally made by petertfm -- Modified by Foxtrot -->
|
||||
<title>RAINBOW CHICKEN MAN AAAHHHH!!</title>
|
||||
</head>
|
||||
<body bgcolor="black">
|
||||
<center>
|
||||
<img src="Rolls/RCM/asset/gif.gif">
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/RCM/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/RCM/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
BIN
RandomRoll/assets/Rolls/RCM/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
RandomRoll/assets/Rolls/RickRoll/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 494 KiB |
BIN
RandomRoll/assets/Rolls/RickRoll/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/RickRoll/asset/song.ogg
Normal file
22
RandomRoll/assets/Rolls/RickRoll/index.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Expires: Sat, 30 Sep 1998 03:13:37");
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<head>
|
||||
<title>Never gonna give you up!</title>
|
||||
</head>
|
||||
<body bgcolor="black">
|
||||
<center>
|
||||
<img src="Rolls/RickRoll/asset/gif.gif">
|
||||
</center>
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/RickRoll/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/RickRoll/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
BIN
RandomRoll/assets/Rolls/RickRoll/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
RandomRoll/assets/Rolls/Troll/asset/gif.gif
Normal file
|
After Width: | Height: | Size: 966 KiB |
BIN
RandomRoll/assets/Rolls/Troll/asset/song.mp3
Normal file
BIN
RandomRoll/assets/Rolls/Troll/asset/song.ogg
Normal file
18
RandomRoll/assets/Rolls/Troll/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<HTML>
|
||||
<head>
|
||||
|
||||
<title>Troll lol lol lolllll!!</title>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="black">
|
||||
<center>
|
||||
<img src="Rolls/Troll/asset/gif.gif">
|
||||
|
||||
<audio loop autoplay>
|
||||
<source src="Rolls/Troll/asset/song.mp3" type="audio/mpeg">
|
||||
<source src="Rolls/Troll/asset/song.ogg" type="audio/ogg">
|
||||
</audio>
|
||||
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
BIN
RandomRoll/assets/Rolls/Troll/logo.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
2
RandomRoll/assets/logs/randomroll.log
Normal file
@@ -0,0 +1,2 @@
|
||||
Welcome to RandomRoll!
|
||||
|
||||
15
RandomRoll/assets/selector.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Expires: Sat, 30 Sep 1998 03:13:37");
|
||||
|
||||
|
||||
$loop = 0;
|
||||
foreach(glob("/www/Rolls/*/index.php") as $roll){
|
||||
$rolls[$loop] = $roll;
|
||||
$loop++;
|
||||
}
|
||||
|
||||
$element = rand(0, count($rolls)-1);
|
||||
|
||||
require($rolls[$element]);
|
||||
84
RandomRoll/js/module.js
Normal file
@@ -0,0 +1,84 @@
|
||||
registerController("RandomRollController", ['$api', '$scope', '$timeout', function($api, $scope, $timeout) {
|
||||
$scope.randomRolls = [];
|
||||
$scope.running = false;
|
||||
$scope.randomRollStarted = false;
|
||||
$scope.randomRollStopped = false;
|
||||
|
||||
$scope.randomRollStart = (function(){
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "startRandomRoll",
|
||||
selected: $scope.randomRolls
|
||||
}, function(response) {
|
||||
if (response.error === undefined){
|
||||
$scope.running = true;
|
||||
}
|
||||
if (response.success === true) {
|
||||
$scope.randomRollStarted = true;
|
||||
$timeout(function(){
|
||||
$scope.randomRollStarted = false;
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$scope.randomRollStop = (function(){
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "stopRandomRoll"
|
||||
}, function(response) {
|
||||
if (response.error === undefined){
|
||||
$scope.running = false;
|
||||
}
|
||||
if (response.success === true) {
|
||||
$scope.randomRollStopped = true;
|
||||
$timeout(function(){
|
||||
$scope.randomRollStopped = false;
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "checkStatus"
|
||||
}, function(response) {
|
||||
if (response.running === true){
|
||||
$scope.running = true;
|
||||
} else {
|
||||
$scope.running = false;
|
||||
};
|
||||
});
|
||||
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "getRandomRollRolls"
|
||||
}, function(response) {
|
||||
$scope.randomRolls = response;
|
||||
console.log(response);
|
||||
});
|
||||
}])
|
||||
|
||||
registerController("RandomRollLogs", ['$api', '$scope', function($api, $scope) {
|
||||
$scope.randomRollLogOutput = ""
|
||||
|
||||
$scope.getRandomRollLogs = (function(){
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "getRandomRollLogs"
|
||||
}, function(response) {
|
||||
$scope.randomRollLogOutput = response.randomRollLogOutput;
|
||||
});
|
||||
});
|
||||
|
||||
$scope.clearRandomRollLogs = (function(){
|
||||
$api.request({
|
||||
module: "RandomRoll",
|
||||
action: "clearRandomRollLogs"
|
||||
}, function(response) {
|
||||
$scope.getRandomRollLogs();
|
||||
});
|
||||
});
|
||||
|
||||
$scope.getRandomRollLogs();
|
||||
}])
|
||||
82
RandomRoll/module.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<div ng-controller="RandomRollController">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<p class="well well-sm alert-success" ng-show="randomRollStarted">Successfully Started RandomRoll.</p>
|
||||
<p class="well well-sm alert-success" ng-show="randomRollStopped">Successfully Stopped RandomRoll.</p>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">RandomRoll
|
||||
<button type="button" class="close pull-right" data-toggle="modal" data-target="#information" aria-label="Close"><span aria-hidden="true">i</span></button></h3></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<button class="btn" ng-hide="running" ng-click="randomRollStart();">Start</button>
|
||||
<button class="btn" ng-show="running" ng-click="randomRollStop();">Stop</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Select Rolls</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-1" ng-repeat="roll in randomRolls">
|
||||
<div>
|
||||
<center>
|
||||
<label>{{roll.randomRollTitle}}</label><br/>
|
||||
<img style="border-radius: 5px;" ng-src="/modules/RandomRoll/assets/Rolls/{{roll.randomRollTitle}}/logo.jpg">
|
||||
|
||||
<input type="checkbox" ng-model="roll.randomRollChecked">
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-controller="RandomRollLogs">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title" title="/pineapple/modules/RandomRoll/assets/logs/randomroll.log">Logs
|
||||
<span class="pull-right">
|
||||
<button type="button" class="btn btn-danger" style="padding: 0px 5px;" ng-click="clearRandomRollLogs();">
|
||||
Clear
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" style="padding: 0px 5px;" ng-click="getRandomRollLogs();">
|
||||
Refresh
|
||||
</button>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" rows="10" ng-model="randomRollLogOutput" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="information" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Information</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3><center>RandomRoll 1.1</center></h3>
|
||||
<h5><center>Written by Foxtrot</center></h5>
|
||||
<h5><center>This module allows you to spoof web pages for clients connected to your WiFi Pineapple in order to troll them with some dank memes.</center></h5>
|
||||
<br/><br/>
|
||||
<h5 class="text-danger"><center>Please use Responsibly!</center></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
10
RandomRoll/module.info
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Foxtrot",
|
||||
"description": "This module allows you to troll unsuspecting clients connected to your WiFi Pineapple.",
|
||||
"devices": [
|
||||
"nano",
|
||||
"tetra"
|
||||
],
|
||||
"title": "RandomRoll",
|
||||
"version": "1.2"
|
||||
}
|
||||