├── .gitignore ├── README.md ├── README_old.md ├── Reporting ├── WarBerryReporting │ ├── SQLiteConnection │ │ ├── app │ │ │ └── composer.json │ │ ├── home.php │ │ ├── ip.php │ │ ├── php │ │ │ ├── Config.php │ │ │ └── SQLiteWarberryConnection.php │ │ ├── reporting.php │ │ ├── service.php │ │ └── session.php │ └── Theme │ │ ├── assets │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── flexslider.css │ │ │ ├── font-style.css │ │ │ ├── login.css │ │ │ ├── main.css │ │ │ ├── register.css │ │ │ ├── table.css │ │ │ ├── table2.css │ │ │ └── test.c │ │ ├── fonts │ │ │ ├── linecons.eot │ │ │ ├── linecons.svg │ │ │ ├── linecons.ttf │ │ │ └── linecons.woff │ │ ├── fullcalendar │ │ │ ├── fullcalendar.css │ │ │ ├── fullcalendar.js │ │ │ ├── fullcalendar.min.js │ │ │ ├── fullcalendar.print.css │ │ │ ├── gcal.js │ │ │ └── jquery-ui-1.8.23.custom.min.js │ │ ├── img │ │ │ └── sep-half.png │ │ ├── js │ │ │ ├── admin.js │ │ │ ├── bootstrap.js │ │ │ ├── dash-charts.js │ │ │ ├── dash-noty.js │ │ │ ├── datatables │ │ │ │ ├── jquery.dataTables.js │ │ │ │ └── jquery.dataTables.min.js │ │ │ ├── gauge.js │ │ │ ├── highcharts.js │ │ │ ├── jquery.flexslider.js │ │ │ ├── jquery.js │ │ │ ├── jquery.validate.js │ │ │ ├── lineandbars.js │ │ │ ├── noty │ │ │ │ ├── jquery.noty.js │ │ │ │ ├── layouts │ │ │ │ │ ├── bottom.js │ │ │ │ │ ├── bottomCenter.js │ │ │ │ │ ├── bottomLeft.js │ │ │ │ │ ├── bottomRight.js │ │ │ │ │ ├── center.js │ │ │ │ │ ├── centerLeft.js │ │ │ │ │ ├── centerRight.js │ │ │ │ │ ├── inline.js │ │ │ │ │ ├── top.js │ │ │ │ │ ├── topCenter.js │ │ │ │ │ ├── topLeft.js │ │ │ │ │ └── topRight.js │ │ │ │ ├── promise.js │ │ │ │ └── themes │ │ │ │ │ └── default.js │ │ │ ├── reporting.js │ │ │ └── warberry.js │ │ └── manager │ │ │ ├── css │ │ │ ├── elfinder.css │ │ │ ├── elfinder.min.css │ │ │ └── theme.css │ │ │ ├── files │ │ │ ├── Brian_May.jpg │ │ │ └── LionLogoTheme.jpg │ │ │ ├── img │ │ │ ├── arrows-active.png │ │ │ ├── arrows-normal.png │ │ │ ├── crop.gif │ │ │ ├── dialogs.png │ │ │ ├── icons-big.png │ │ │ ├── icons-small.png │ │ │ ├── logo.png │ │ │ ├── progress.gif │ │ │ ├── quicklook-bg.png │ │ │ ├── quicklook-icons.png │ │ │ ├── resize.png │ │ │ ├── spinner-mini.gif │ │ │ └── toolbar.png │ │ │ ├── js │ │ │ ├── elfinder.full.js │ │ │ ├── elfinder.min.js │ │ │ ├── i18n │ │ │ │ ├── elfinder.LANG.js │ │ │ │ ├── elfinder.ar.js │ │ │ │ ├── elfinder.bg.js │ │ │ │ ├── elfinder.ca.js │ │ │ │ ├── elfinder.cs.js │ │ │ │ ├── elfinder.de.js │ │ │ │ ├── elfinder.es.js │ │ │ │ ├── elfinder.fr.js │ │ │ │ ├── elfinder.hu.js │ │ │ │ ├── elfinder.jp.js │ │ │ │ ├── elfinder.nl.js │ │ │ │ ├── elfinder.no.js │ │ │ │ ├── elfinder.pl.js │ │ │ │ ├── elfinder.pt_BR.js │ │ │ │ ├── elfinder.ru.js │ │ │ │ └── elfinder.zh_CN.js │ │ │ └── proxy │ │ │ │ └── elFinderSupportVer1.js │ │ │ └── php │ │ │ ├── MySQLStorage.sql │ │ │ ├── connector.php │ │ │ ├── elFinder.class.php │ │ │ ├── elFinderConnector.class.php │ │ │ ├── elFinderVolumeDriver.class.php │ │ │ ├── elFinderVolumeLocalFileSystem.class.php │ │ │ ├── elFinderVolumeMySQL.class.php │ │ │ └── mime.types │ │ └── indexReporting.html └── index.html ├── Warberry_Logo_Transparent.png ├── create.sh ├── empty.sh ├── restore.sh ├── run_responder.py ├── setup.sh ├── src ├── __init__.py ├── core │ ├── __init__.py │ ├── bypass │ │ ├── __init__.py │ │ └── static.py │ ├── enumeration │ │ ├── __init__.py │ │ ├── bluetooth_enum.py │ │ ├── hostnames.py │ │ ├── ip_enum.py │ │ ├── network_packets.py │ │ ├── services_enum.py │ │ └── wifi_enum.py │ ├── exploits │ │ ├── Responder.py │ │ └── __init__.py │ └── scanners │ │ ├── __init__.py │ │ ├── portlist_config │ │ ├── targetted_scanner.py │ │ └── thread_targetted_scanner.py ├── discover ├── utils │ ├── __init__.py │ ├── console_colors.py │ ├── info_banners.py │ ├── port_obj_Read.py │ ├── port_object.py │ └── utils.py └── warberrySetup │ ├── Warberry.py │ ├── WarberryArgs.py │ ├── WarberryDB.py │ ├── WarberryInformationGathered.py │ ├── WarberryStatus.py │ └── __init__.py ├── warberry.py ├── warberryDBCreation ├── warberryDBEmpty └── warberryModel.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.txt 3 | Tools/ 4 | Results/ 5 | warberry.db 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![alt tag](https://github.com/secgroundzero/warberry/blob/master/Warberry_Logo_Transparent.png) 2 | 3 | [![ToolsWatch Best Tools](https://www.toolswatch.org/badges/toptools/2016.svg)](https://www.toolswatch.org/2017/02/2016-top-security-tools-as-voted-by-toolswatch-org-readers/) 4 | [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2016.svg)](https://www.blackhat.com/us-16/arsenal.html) 5 | ![GPLv3 License](https://img.shields.io/badge/License-GPLv3-red.svg) 6 | [![Python 2.6|2.7](https://img.shields.io/badge/python-2.6|2.7-yellow.svg)](https://www.python.org/) 7 | [![Twitter](https://img.shields.io/badge/twitter-@sec_groundzero-blue.svg)](https://twitter.com/sec_groundzero) 8 | 9 | 10 | #### This project is no longer maintained by the developer 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /README_old.md: -------------------------------------------------------------------------------- 1 | # WarBerryPi 2 | ![alt tag](https://github.com/secgroundzero/warberry/blob/master/Warberry_Logo_Transparent.png) 3 | 4 | [![ToolsWatch Best Tools](https://www.toolswatch.org/badges/toptools/2016.svg)](https://www.toolswatch.org/2017/02/2016-top-security-tools-as-voted-by-toolswatch-org-readers/) 5 | [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2016.svg)](https://www.blackhat.com/us-16/arsenal.html) 6 | ![GPLv3 License](https://img.shields.io/badge/License-GPLv3-red.svg) 7 | [![Python 2.6|2.7](https://img.shields.io/badge/python-2.6|2.7-yellow.svg)](https://www.python.org/) 8 | [![Twitter](https://img.shields.io/badge/twitter-@sec_groundzero-blue.svg)](https://twitter.com/sec_groundzero) 9 | 10 | 11 | **WarBerryPi** was built to be used as a hardware implant during red teaming scenarios where we want to obtain as much information 12 | as possible in a short period of time with being as stealth as possible. 13 | Just find a network port and plug it in. The scripts have been designed in a way that the approach is targeted to avoid noise 14 | in the network that could lead to detection and to be as efficient as possible. 15 | The WarBerry script is a collection of scanning tools put together to provide that functionality. 16 | 17 | 18 | 19 | #### Disclaimer 20 | This tool is only for academic purposes and testing under controlled environments. Do not use without obtaining proper authorization 21 | from the network owner of the network under testing. 22 | The author bears no responsibility for any misuse of the tool. 23 | 24 | 25 | #### Usage 26 | 27 | To get a list of all options and switches use: 28 | 29 | ```python warberry.py -h``` 30 | ``` 31 | 32 | Options: 33 | 34 | --version show program's version number and exit 35 | -h, --help show this help message and exit 36 | -p PACKETS, --packets=PACKETS Number of Network Packets to capture. Default 20 37 | -x TIME, --expire=TIME Duration of packet capture. Default 20 seconds 38 | -I IFACE, --interface=IFACE Network Interface to use. Default: eth0 39 | -N NAME, --name=NAME Hostname to use. Default: WarBerry 40 | -i INTENSITY, --intensity=INTENSITY Port scan intensity. Default: T4 41 | -Q, --quick Scan using threats. Default: Off 42 | -P, --poison Turn Poisoning on/off. Default: On 43 | -t TIME, --time=TIME Poisoning Duration. Default 900 seconds 44 | -H, --hostname Do not Change WarBerry hostname Default: Off 45 | -e, --enumeration Disable Enumeration mode. Default: Off 46 | -B, --bluetooth Enable Bluetooth scanning. Default: Off 47 | -r, --recon Enable Recon only mode. Default: Off 48 | -W, --wifi Enable WiFi scanning. Default: Off 49 | -S, --sniffer Enable Sniffer only mode. Default: Off 50 | -C, --clear Clear previous output folders in ../Results 51 | 52 | 53 | ``` 54 | 55 | 56 | 57 | ### Installation 58 | 59 | Run ```sudo bash setup.sh``` 60 | 61 | 62 | #### To address the issue with ImportError: No module named dns follow these steps 63 | 64 | ``` 65 | git clone https://github.com/rthalley/dnspython 66 | cd dnspython/ 67 | python setup.py install 68 | ``` 69 | 70 | 71 | ### Reporting 72 | 73 | Download the **/RESULTS** folder into /var/www, /Library/Webserver/Documents/ or XAMPP web directory depending on your OS and setup. 74 | 75 | Download the warberry.db file locally and save it into **Reporting/** . 76 | 77 | Change file Config.php under Reporting/WarberryReporting/SQLiteConnection/php to use the correct path of warberry.db 78 | 79 | Run index.html under **Reporting/** 80 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/app/composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/secgroundzero/warberry/ce8b392831213a57283bd4f3837aeaa63388e6df/Reporting/WarBerryReporting/SQLiteConnection/app/composer.json -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/home.php: -------------------------------------------------------------------------------- 1 | connect(); 6 | if ($pdo != null) { 7 | $sessions = $sqlite->getSessions(); 8 | $warberry = $sqlite->getWarberry(); 9 | $response = array( 10 | "status" => "success", 11 | "warberry" => $warberry, 12 | "sessions" => $sessions, 13 | "sessionsCount" => count($sessions) 14 | ); 15 | } 16 | else { 17 | $response = array( 18 | "status" => "fail", 19 | "message" => "Could not connect to the SQLite Database" 20 | ); 21 | } 22 | 23 | header('Content-type: application/json'); 24 | echo json_encode($response); -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/ip.php: -------------------------------------------------------------------------------- 1 | connect(); 6 | if ($pdo != null) { 7 | $session=$_GET["sessionID"]; 8 | $ip=$_GET["ip"]; 9 | $hostnames = $sqlite->hostnameInfo($session,$ip); 10 | $scanners=$sqlite->getServices($session, $ip); 11 | $response = array( 12 | "status" => "success", 13 | "hostnames" => $hostnames, 14 | "scanners" => $scanners 15 | ); 16 | } 17 | else { 18 | $response = array( 19 | "status" => "fail", 20 | "message" => "Could not connect to the SQLite Database" 21 | ); 22 | } 23 | 24 | header('Content-type: application/json'); 25 | echo json_encode($response); -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/php/Config.php: -------------------------------------------------------------------------------- 1 | pdo == null) { 21 | try { 22 | //$this->pdo = new \PDO("jdbc:sqlite:" . Config::PATH_TO_SQLITE_FILE); 23 | $this->pdo = new \PDO("sqlite:" . Config::PATH_TO_SQLITE_FILE); 24 | return $this->pdo; 25 | } catch (\PDOException $e) { 26 | echo $e; 27 | return null; 28 | } 29 | } else { 30 | return $this->pdo; 31 | } 32 | } 33 | 34 | public function getSessions() 35 | { 36 | 37 | $stmt = $this->pdo->query('SELECT * FROM warberry_session '); 38 | $sessions = array(); 39 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 40 | $session["sessionID"]=$row["WarberrySessionID"]; 41 | $session["WarBerryID"] = $row['WarberryID']; 42 | $session["StartTime"] = $row["WarberryStart"]; 43 | $session['EndTime'] = $row["WarberryEnd"]; 44 | $session["Status"] = $row["WarberryStatus"]; 45 | array_push($sessions,$session); 46 | } 47 | return $sessions; 48 | } 49 | 50 | public function getSessionInfo($warberrySession) 51 | { 52 | $stmt = $this->pdo->query("SELECT * FROM warberry_session WHERE WarberrySessionID='$warberrySession'"); 53 | $sessionInfo = array(); 54 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 55 | $sessionInfo["sessionID"]= $row["WarberrySessionID"]; 56 | $sessionInfo["WarBerryID"] = $row['WarberryID']; 57 | $sessionInfo["StartTime"] = $row["WarberryStart"]; 58 | $sessionInfo["EndTime"] = $row["WarberryEnd"]; 59 | $sessionInfo["Status"] = $row["WarberryStatus"]; 60 | } 61 | return $sessionInfo; 62 | } 63 | 64 | public function getCommonInfo($warberrySession){ 65 | $stmt = $this->pdo->query("SELECT * FROM common_war_info WHERE WarberrySession='$warberrySession'"); 66 | $commonInfo=array(); 67 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 68 | $commonInfo['commonID'] = $row["WarberryCommonID"]; 69 | $commonInfo['WarberrySession'] = $row['WarberrySession']; 70 | $commonInfo['CIDR'] = $row["CIDR"]; 71 | $commonInfo['Netmask'] = $row["netmask"]; 72 | if ($row["internal_IP"]==null){ 73 | $commonInfo['InternalIP'] = "N/A"; 74 | } 75 | else{ 76 | $commonInfo['InternalIP'] = $row["internal_IP"]; 77 | } 78 | if ($row["external_ip"]==null){ 79 | $commonInfo['ExternalIP']="N/A"; 80 | } 81 | else{ 82 | $commonInfo['ExternalIP']=$row["external_ip"]; 83 | } 84 | 85 | } 86 | return $commonInfo; 87 | } 88 | 89 | public function getWifis($warberrySession){ 90 | $stmt = $this->pdo->query("SELECT * FROM war_wifis WHERE WarberrySession='$warberrySession'"); 91 | $wifis=array(); 92 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 93 | $w=array(); 94 | $w['wifiID'] =$row["Warberry_wifiID"]; 95 | $w['WarberrySession'] = $row['WarberrySession']; 96 | $w['WifiName'] = $row["wifiName"]; 97 | array_push($wifis, $w); 98 | } 99 | return $wifis; 100 | } 101 | 102 | public function getBlues($warberrySession){ 103 | $stmt = $this->pdo->query("SELECT * FROM war_blues WHERE WarberrySession='$warberrySession'"); 104 | $blues=array(); 105 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 106 | $blue=array(); 107 | $blue['blueID'] = $row["Warberry_blueID"]; 108 | $blue['WarberrySession'] = $row['WarberrySession']; 109 | $blue['blueName'] = $row["blueName"]; 110 | $blue['blueDevice'] =$row["blueDevice"]; 111 | array_push($blues,$blue); 112 | } 113 | return $blues; 114 | } 115 | 116 | public function getIPS($warberrySession){ 117 | $stmt = $this->pdo->query("SELECT * FROM war_ips WHERE WarberrySession='$warberrySession'"); 118 | $ips=array(); 119 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 120 | $ip=array(); 121 | $ip['ipID'] = $row["WarberryIPID"]; 122 | $ip['WarberrySession'] = $row['WarberrySession']; 123 | $ip['ip'] = $row["ip"]; 124 | array_push($ips, $ip); 125 | } 126 | return $ips; 127 | } 128 | 129 | /*public function getOS($warberrySession){ 130 | $stmt = $this->pdo->query("SELECT * FROM war_os WHERE WarberrySession='$warberrySession'"); 131 | $os=array(); 132 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 133 | $os=array(); 134 | $o['osID'] = $row["WarberryOSID"]; 135 | $o['WarberrySession'] = $row['WarberrySession']; 136 | $o['os'] = $row["os"]; 137 | array_push($os, $o); 138 | } 139 | return $os; 140 | } 141 | 142 | public function getDomains($warberrySession){ 143 | $stmt = $this->pdo->query("SELECT * FROM war_domain WHERE WarberrySession='$warberrySession'"); 144 | $domains=array(); 145 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 146 | $dom=array(); 147 | $dom['domainID'] = $row["WarberryDomainID"]; 148 | $dom['WarberrySession'] = $row['WarberrySession']; 149 | $dom['domain'] = $row["domain"]; 150 | array_push($domains, $dom); 151 | } 152 | return $domains; 153 | }*/ 154 | 155 | /*public function getHostnames($warberrySession){ 156 | $stmt = $this->pdo->query("SELECT * FROM war_hostnames WHERE WarberrySession='$warberrySession'"); 157 | $hostnames=array(); 158 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 159 | $host=array(); 160 | $host['hostnameID'] = $row["WarberryHostnamesID"]; 161 | $host['WarberrySession'] = $row['WarberrySession']; 162 | $host['hostname'] = $row["hostname"]; 163 | array_push($hostnames, $host); 164 | } 165 | return $hostnames; 166 | }*/ 167 | 168 | public function getScanners($warberrySession){ 169 | $stmt = $this->pdo->query("SELECT * FROM war_scanners WHERE WarberrySession='$warberrySession'"); 170 | $scanners=array(); 171 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 172 | $scanner=array(); 173 | $scanner['scannerID'] = $row["WarberryScannerID"]; 174 | $scanner['WarberrySession'] = $row['WarberrySession']; 175 | $scanner['name'] = $row["scannerName"]; 176 | $scanner['host'] =$row["host"]; 177 | array_push($scanners, $scanner); 178 | } 179 | 180 | $scannerNames=array(); 181 | $scannerKeys=array(); 182 | foreach ($scanners as $scanner) { 183 | $key = $scanner["name"]; 184 | if (array_key_exists($key, $scannerNames)) { 185 | array_push($scannerNames[$key], $scanner["host"]); 186 | } 187 | else{ 188 | 189 | $scannerNames[$key]=array(); 190 | array_push($scannerNames[$key], $scanner["host"]); 191 | array_push($scannerKeys, $key); 192 | 193 | } 194 | } 195 | return $scannerKeys; 196 | } 197 | 198 | public function getHosts($warberrySession, $service){ 199 | $stmt = $this->pdo->query("SELECT * FROM war_scanners WHERE WarberrySession='$warberrySession' AND scannerName='$service'"); 200 | $scanners=array(); 201 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 202 | array_push($scanners,$row["host"]); 203 | } 204 | 205 | return $scanners; 206 | } 207 | 208 | 209 | public function getServices( $warberrySession, $ip){ 210 | $stmt = $this->pdo->query("SELECT * FROM war_scanners WHERE WarberrySession='$warberrySession' AND host='$ip'"); 211 | $services=array(); 212 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 213 | array_push($services,$row["scannerName"]); 214 | } 215 | return $services; 216 | 217 | } 218 | 219 | public function hostnameInfo($warberrySession, $ip){ 220 | $stmt=$this->pdo->query("SELECT * FROM war_hostnames WHERE WarberrySession='$warberrySession' AND hostname_IP=='$ip'"); 221 | $hostnames=array(); 222 | $hostname=array(); 223 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 224 | $hostname["name"]=$row["hostname"]; 225 | $hostname["domain"]=$row["hostname_domain"]; 226 | $hostname["os"]=$row["hostname_os"]; 227 | array_push($hostnames, $hostname); 228 | } 229 | return $hostnames; 230 | } 231 | 232 | public function getWarberry() 233 | { 234 | $stmt = $this->pdo->query('SELECT * FROM warberry '); 235 | $warberry = array(); 236 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 237 | $warberry['WarBerryID'] = $row["WarBerryID"]; 238 | $warberry['WarBerryName'] = $row['WarBerryName']; 239 | $warberry['WarBerryModel'] = $row["WarBerryModel"]; 240 | } 241 | return $warberry; 242 | } 243 | 244 | public function getHashes($warberrySession){ 245 | $stmt=$this->pdo->query("SELECT * FROM war_hashes WHERE WarberrySession='$warberrySession'"); 246 | $hashes=[]; 247 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { 248 | $hash=array(); 249 | 250 | $str= str_replace("[0;33m", "", $row["client"]); 251 | $str=str_replace("[0m", "", $str); 252 | $hash['ip'] =$str; 253 | $str=str_replace("[1;34m", "",$row['username']); 254 | $str=str_replace("[0m", "", $str); 255 | $str=str_replace("[0;33m", "", $str); 256 | $hash['username'] = $str; 257 | $str= str_replace("[0;33m", "", $row["hash"]); 258 | $str=str_replace("[1;34m", "",$str); 259 | $str=str_replace("[0m", "", $str); 260 | $hash['hash'] =$str; 261 | 262 | array_push($hashes,$hash); 263 | } 264 | return $hashes; 265 | } 266 | 267 | } 268 | 269 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/reporting.php: -------------------------------------------------------------------------------- 1 | connect(); 6 | if ($pdo != null) { 7 | $session=$_GET["session"]; 8 | $sessions= $sqlite->getSessions(); 9 | $sessionInfo = $sqlite->getSessionInfo($session); 10 | $commonInfo = $sqlite->getCommonInfo($session); 11 | $wifis=$sqlite->getWifis($session); 12 | $blues=$sqlite->getBlues($session); 13 | $ips=$sqlite->getIPS($session); 14 | $scanners=$sqlite->getScanners($session); 15 | $hashes=$sqlite->getHashes($session); 16 | $response = array( 17 | "status" => "success", 18 | "sessions" => $sessions, 19 | "countSessions" =>count($sessions), 20 | "session" => $sessionInfo, 21 | "common" => $commonInfo, 22 | "wifis" => $wifis, 23 | "countWifis" => count($wifis), 24 | "blues" => $blues, 25 | "countBlues" => count($blues), 26 | "ips" => $ips, 27 | "countIPS" => count($ips), 28 | "scanners" => $scanners, 29 | "countScanners" => count($scanners), 30 | "hashes" => $hashes, 31 | "countHashes"=>count($hashes) 32 | ); 33 | } 34 | else { 35 | $response = array( 36 | 'status' => 'fail', 37 | 'message' => 'Could not connect to the SQLite Database' 38 | ); 39 | } 40 | 41 | header('Content-type: application/json'); 42 | 43 | echo json_encode($response); 44 | ?> -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/service.php: -------------------------------------------------------------------------------- 1 | connect(); 6 | if ($pdo != null) { 7 | $session=$_GET["sessionID"]; 8 | $service=$_GET["service"]; 9 | $hosts = $sqlite->getHosts($session,$service); 10 | $response = array( 11 | "status" => "success", 12 | "hosts" => $hosts, 13 | "countHosts" => sizeof($hosts) 14 | ); 15 | } 16 | else { 17 | $response = array( 18 | "status" => "fail", 19 | "message" => "Could not connect to the SQLite Database" 20 | ); 21 | } 22 | 23 | header('Content-type: application/json'); 24 | echo json_encode($response); -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/SQLiteConnection/session.php: -------------------------------------------------------------------------------- 1 | connect(); 6 | if ($pdo != null) { 7 | $sessions = $sqlite->getSessions(); 8 | $response = array( 9 | "status" => "success", 10 | "sessions" => $sessions, 11 | "sessionsCount"=>count($sessions) 12 | ); 13 | } 14 | else { 15 | $response = array( 16 | "status" => "fail", 17 | "message" => "Could not connect to the SQLite Database" 18 | ); 19 | } 20 | header('Content-type: application/json'); 21 | echo json_encode($response); -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/css/flexslider.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery FlexSlider v2.0 3 | * http://www.woothemes.com/flexslider/ 4 | * 5 | * Copyright 2012 WooThemes 6 | * Free to use under the GPLv2 license. 7 | * http://www.gnu.org/licenses/gpl-2.0.html 8 | * 9 | * Contributing author: Tyler Smith (@mbmufffin) 10 | */ 11 | 12 | 13 | /* Browser Resets */ 14 | .flex-container a:active, 15 | .flexslider a:active, 16 | .flex-container a:focus, 17 | .flexslider a:focus {outline: none;} 18 | .slides, 19 | .flex-control-nav, 20 | .flex-direction-nav {margin: 0; padding: 0; list-style: none;} 21 | 22 | /* FlexSlider Necessary Styles 23 | *********************************/ 24 | .flexslider {margin: 0; padding: 0;} 25 | .flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */ 26 | .flexslider .slides img {width: 100%; display: block;} 27 | .flex-pauseplay span {text-transform: capitalize;} 28 | 29 | /* Clearfix for the .slides element */ 30 | .slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;} 31 | html[xmlns] .slides {display: block;} 32 | * html .slides {height: 1%;} 33 | 34 | /* No JavaScript Fallback */ 35 | /* If you are not using another script, such as Modernizr, make sure you 36 | * include js that eliminates this class on page load */ 37 | .no-js .slides > li:first-child {display: block;} 38 | 39 | 40 | /* FlexSlider Default Theme 41 | *********************************/ 42 | .flexslider { 43 | margin: 0px; 44 | background:transparent; 45 | position: relative; 46 | } 47 | .flex-viewport {max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease;} 48 | .loading .flex-viewport {max-height: 300px;} 49 | .flexslider .slides {zoom: 1;} 50 | 51 | .carousel li {margin-right: 5px} 52 | 53 | 54 | /* Direction Nav */ 55 | .flex-direction-nav {*height: 0;} 56 | .flex-direction-nav a {width: 30px; height: 30px; margin: -20px 0 0; display: block; background: url(../img/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; cursor: pointer; text-indent: -9999px; opacity: 0; -webkit-transition: all .3s ease;} 57 | .flex-direction-nav .flex-next {background-position: 100% 0; right: -36px; } 58 | .flex-direction-nav .flex-prev {left: -36px;} 59 | .flexslider:hover .flex-next {opacity: 0.8; right: 5px;} 60 | .flexslider:hover .flex-prev {opacity: 0.8; left: 5px;} 61 | .flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover {opacity: 1;} 62 | .flex-direction-nav .flex-disabled {opacity: .3!important; filter:alpha(opacity=30); cursor: default;} 63 | 64 | /* Control Nav */ 65 | .flex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center; display: none;} 66 | .flex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;} 67 | .flex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; box-shadow: inset 0 0 3px rgba(0,0,0,0.3);} 68 | .flex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); } 69 | .flex-control-paging li a.flex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; } 70 | 71 | .flex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;} 72 | .flex-control-thumbs li {width: 25%; float: left; margin: 0;} 73 | .flex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;} 74 | .flex-control-thumbs img:hover {opacity: 1;} 75 | .flex-control-thumbs .flex-active {opacity: 1; cursor: default;} 76 | 77 | @media screen and (max-width: 860px) { 78 | .flex-direction-nav .flex-prev {opacity: 1; left: 0;} 79 | .flex-direction-nav .flex-next {opacity: 1; right: 0;} 80 | } -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/css/login.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * BLOCKS - Responsive Dashboard Theme 3 | * 4 | * Copyright 2013 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Created by: Carlos Esteban Alvarez 8 | * URL: http://www.basicoh.com 9 | * Designed and built based on Twitter Bootstrap. 10 | */ 11 | 12 | /*CONFIGURATION USED IN LOGIN.HTML*/ 13 | /*Login Page*/ 14 | 15 | html{ 16 | /* This image will be displayed fullscreen */ 17 | background:url('../img/bg.jpg') no-repeat center center; 18 | /* Ensure the html element always takes up the full height of the browser window */ 19 | min-height:100%; 20 | 21 | /* The Magic */ 22 | background-size:cover; 23 | } 24 | body { 25 | background:transparent; 26 | min-height:100%; 27 | font-family: 'Open Sans', sans-serif; 28 | } 29 | 30 | 31 | select, textarea, input[type=text], input[type=password], input[type=datetime], input[type=datetime-local], input[type=date], input[type=month], input[type=time], input[type=week], input[type=number], input[type=email], input[type=url], input[type=search], input[type=tel], input[type=color], .uneditable-input { 32 | display: inline-block; 33 | height: 26px; 34 | padding: 4px 6px; 35 | margin-bottom: 9px; 36 | font-size: 14px; 37 | line-height: 20px; 38 | color: #9e9d9d; 39 | -webkit-border-radius: 3px; 40 | -moz-border-radius: 3px; 41 | border-radius: 3px; 42 | } 43 | 44 | .block-unit { 45 | margin-bottom: 30px; 46 | padding-bottom:10px; 47 | border: 1px solid #6a6868; 48 | background: rgba(0, 0, 0, 0.4); 49 | -webkit-border-radius: 4px; 50 | -moz-border-radius: 4px; 51 | border-radius: 4px; 52 | } 53 | 54 | /*FORM ERROR MESSAGE*/ 55 | .error{ color:#b2c831;} 56 | 57 | @media (max-width: 979px) { 58 | .navbar-fixed-top { 59 | margin-bottom: 0px; 60 | } 61 | } -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/css/register.css: -------------------------------------------------------------------------------- 1 | /* $REGISTER */ 2 | #register-wraper { 3 | -webkit-border-radius: 15px; 4 | -moz-border-radius: 15px; 5 | -ms-border-radius: 15px; 6 | -o-border-radius: 15px; 7 | border-radius: 15px; 8 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); 9 | -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); 10 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); 11 | margin-top: 25px; 12 | margin-bottom: 70px; 13 | padding-top: 25px; 14 | padding-bottom: 25px; 15 | background: white; 16 | text-align: center; 17 | } 18 | 19 | #register-form { 20 | margin: 0 auto; 21 | width: 350px; 22 | } 23 | #register-form .control-inline { 24 | display: inline-block; 25 | } 26 | #register-form legend { 27 | margin-bottom: 15px; 28 | border-bottom: none; 29 | } 30 | #register-form input.input-huge { 31 | width: 318px; 32 | } 33 | #register-form .control-group { 34 | margin-bottom: 0; 35 | } 36 | #register-form .checkbox.inline { 37 | margin-bottom: 10px; 38 | padding: 0; 39 | font-size: 98%; 40 | } 41 | #register-form .checkbox.inline input { 42 | margin-right: 10px; 43 | } 44 | #register-form .body { 45 | overflow-y: auto; 46 | height: auto; 47 | } 48 | #register-form .btn { 49 | padding: 10px 40px; 50 | background-image: none; 51 | box-shadow: none; 52 | } 53 | 54 | .register-info-wraper { 55 | background: rgba(0, 0, 0, 0.2); 56 | } 57 | 58 | #register-info { 59 | position: relative; 60 | margin-top:25px; 61 | padding: 0px; 62 | padding-top:10px; 63 | } 64 | #register-info ul { 65 | margin-right: 25px; 66 | } 67 | #register-info ul li { 68 | margin-bottom: 25px; 69 | } 70 | 71 | 72 | /* login form */ 73 | .login-form legend { 74 | font-family: 'Raleway', sans-serif; 75 | font-size: 36px; 76 | font-weight: 300; 77 | color: #333333; 78 | -webkit-font-smoothing: subpixel-antialiased; 79 | } 80 | 81 | /* register form */ 82 | #register-form legend { 83 | font-family: 'Raleway', sans-serif; 84 | font-size: 36px; 85 | font-weight: 300; 86 | color: #333333; 87 | -webkit-font-smoothing: subpixel-antialiased; 88 | } 89 | #register-form label { 90 | font-family: 'Raleway', sans-serif; 91 | font-size: 18px; 92 | color: #333333; 93 | font-weight: 300; 94 | } 95 | 96 | /* register info */ 97 | #register-info h1 { 98 | font-size: 42px; 99 | font-family: "Open Sans", sans-serif; 100 | line-height: 55px; 101 | font-weight: 700; 102 | text-align: right; 103 | padding-bottom: 50px; 104 | color: white; 105 | } 106 | 107 | 108 | #register-info h2 { 109 | font-family: 'Raleway', sans-serif; 110 | font-size:26px; 111 | color:#fff; 112 | font-weight: 300; 113 | } 114 | 115 | #register-info ul { 116 | text-align: right; 117 | color: white; 118 | font-size: 24px; 119 | font-family: "Open Sans", Arial, Helvetica, sans-serif; 120 | } 121 | 122 | #register-info hr { 123 | border: 0; 124 | border-top: 1px solid silver; 125 | border-top-style: dashed; 126 | margin-top:3px; 127 | } 128 | 129 | .cont2 { 130 | text-align:center; 131 | margin-top:8px; 132 | } 133 | 134 | .cont3 { 135 | text-align:left; 136 | margin-left:8px; 137 | color:#bdbdbd; 138 | } 139 | 140 | .cont3 ok { 141 | color:#b2c831; 142 | } 143 | 144 | .info-user2 { 145 | text-align:center; 146 | font-size: 32px; 147 | color: #b2c831; 148 | padding-bottom:58px; 149 | } 150 | 151 | .fs1 { 152 | padding:5px 5px 5px 5px; 153 | position:relative; 154 | } 155 | 156 | .fs1:hover { 157 | position:relative; 158 | color: #fff; 159 | cursor:pointer 160 | } 161 | 162 | 163 | 164 | 165 | /* LOGIN PAGE CONFIGURATION */ 166 | 167 | 168 | 169 | 170 | 171 | @media (max-width: 980px) { 172 | 173 | #login-wraper { 174 | position: relative; 175 | top: 0; 176 | margin-top: 25px; 177 | } 178 | } 179 | @media (max-width: 495px) { 180 | #login-wraper { 181 | width: auto; 182 | height: auto; 183 | margin-left: 0; 184 | margin-right: 0; 185 | left: 0; 186 | } 187 | 188 | #register-form { 189 | width: auto; 190 | } 191 | #register-form .control-inline { 192 | display: block; 193 | } 194 | #register-form input { 195 | display: block; 196 | margin: 0 auto; 197 | } 198 | #register-form input.input-huge, #register-form input.input-medium { 199 | width: auto; 200 | display: block; 201 | } 202 | #register-form .btn { 203 | display: block; 204 | margin: 0 auto; 205 | } 206 | } 207 | 208 | @media (min-width: 979px) { 209 | body { 210 | padding-top: 80px; 211 | } 212 | } 213 | 214 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/css/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]){ 4 | FILE *fp; 5 | fp = fopen("movies.dat","r"); 6 | if(fp == NULL{ 7 | printf("Error: can't open file to read\n"); 8 | return -1; 9 | } 10 | 11 | // implied else, fopen successful 12 | 13 | printf("File people.dat opened successfully to read\n"); 14 | 15 | while ( 1 == fread( &key, 4, 1, fp ) ) 16 | { 17 | int bufFirst[4] = {'\0'}; 18 | 19 | // use lengths to determine how much more bytes to read for each field 20 | result = fread( bufFirst, key.first, 1, fp ); 21 | printf("%s\n", result); 22 | } 23 | 24 | fclose(fp); 25 | return 0; 26 | 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/fonts/linecons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/secgroundzero/warberry/ce8b392831213a57283bd4f3837aeaa63388e6df/Reporting/WarBerryReporting/Theme/assets/fonts/linecons.eot -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/fonts/linecons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/secgroundzero/warberry/ce8b392831213a57283bd4f3837aeaa63388e6df/Reporting/WarBerryReporting/Theme/assets/fonts/linecons.ttf -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/fonts/linecons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/secgroundzero/warberry/ce8b392831213a57283bd4f3837aeaa63388e6df/Reporting/WarBerryReporting/Theme/assets/fonts/linecons.woff -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/fullcalendar/fullcalendar.print.css: -------------------------------------------------------------------------------- 1 | /* 2 | * FullCalendar v1.5.4 Print Stylesheet 3 | * 4 | * Include this stylesheet on your page to get a more printer-friendly calendar. 5 | * When including this stylesheet, use the media='print' attribute of the tag. 6 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 7 | * 8 | * Copyright (c) 2011 Adam Shaw 9 | * Dual licensed under the MIT and GPL licenses, located in 10 | * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. 11 | * 12 | * Date: Tue Sep 4 23:38:33 2012 -0700 13 | * 14 | */ 15 | 16 | 17 | /* Events 18 | -----------------------------------------------------*/ 19 | 20 | .fc-event-skin { 21 | background: none !important; 22 | color: #000 !important; 23 | } 24 | 25 | /* horizontal events */ 26 | 27 | .fc-event-hori { 28 | border-width: 0 0 1px 0 !important; 29 | border-bottom-style: dotted !important; 30 | border-bottom-color: #000 !important; 31 | padding: 1px 0 0 0 !important; 32 | } 33 | 34 | .fc-event-hori .fc-event-inner { 35 | border-width: 0 !important; 36 | padding: 0 1px !important; 37 | } 38 | 39 | /* vertical events */ 40 | 41 | .fc-event-vert { 42 | border-width: 0 0 0 1px !important; 43 | border-left-style: dotted !important; 44 | border-left-color: #000 !important; 45 | padding: 0 1px 0 0 !important; 46 | } 47 | 48 | .fc-event-vert .fc-event-inner { 49 | border-width: 0 !important; 50 | padding: 1px 0 !important; 51 | } 52 | 53 | .fc-event-bg { 54 | display: none !important; 55 | } 56 | 57 | .fc-event .ui-resizable-handle { 58 | display: none !important; 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/fullcalendar/gcal.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FullCalendar v1.5.4 Google Calendar Plugin 3 | * 4 | * Copyright (c) 2011 Adam Shaw 5 | * Dual licensed under the MIT and GPL licenses, located in 6 | * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. 7 | * 8 | * Date: Tue Sep 4 23:38:33 2012 -0700 9 | * 10 | */ 11 | 12 | (function($) { 13 | 14 | 15 | var fc = $.fullCalendar; 16 | var formatDate = fc.formatDate; 17 | var parseISO8601 = fc.parseISO8601; 18 | var addDays = fc.addDays; 19 | var applyAll = fc.applyAll; 20 | 21 | 22 | fc.sourceNormalizers.push(function(sourceOptions) { 23 | if (sourceOptions.dataType == 'gcal' || 24 | sourceOptions.dataType === undefined && 25 | (sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) { 26 | sourceOptions.dataType = 'gcal'; 27 | if (sourceOptions.editable === undefined) { 28 | sourceOptions.editable = false; 29 | } 30 | } 31 | }); 32 | 33 | 34 | fc.sourceFetchers.push(function(sourceOptions, start, end) { 35 | if (sourceOptions.dataType == 'gcal') { 36 | return transformOptions(sourceOptions, start, end); 37 | } 38 | }); 39 | 40 | 41 | function transformOptions(sourceOptions, start, end) { 42 | 43 | var success = sourceOptions.success; 44 | var data = $.extend({}, sourceOptions.data || {}, { 45 | 'start-min': formatDate(start, 'u'), 46 | 'start-max': formatDate(end, 'u'), 47 | 'singleevents': true, 48 | 'max-results': 9999 49 | }); 50 | 51 | var ctz = sourceOptions.currentTimezone; 52 | if (ctz) { 53 | data.ctz = ctz = ctz.replace(' ', '_'); 54 | } 55 | 56 | return $.extend({}, sourceOptions, { 57 | url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?', 58 | dataType: 'jsonp', 59 | data: data, 60 | startParam: false, 61 | endParam: false, 62 | success: function(data) { 63 | var events = []; 64 | if (data.feed.entry) { 65 | $.each(data.feed.entry, function(i, entry) { 66 | var startStr = entry['gd$when'][0]['startTime']; 67 | var start = parseISO8601(startStr, true); 68 | var end = parseISO8601(entry['gd$when'][0]['endTime'], true); 69 | var allDay = startStr.indexOf('T') == -1; 70 | var url; 71 | $.each(entry.link, function(i, link) { 72 | if (link.type == 'text/html') { 73 | url = link.href; 74 | if (ctz) { 75 | url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz; 76 | } 77 | } 78 | }); 79 | if (allDay) { 80 | addDays(end, -1); // make inclusive 81 | } 82 | events.push({ 83 | id: entry['gCal$uid']['value'], 84 | title: entry['title']['$t'], 85 | url: url, 86 | start: start, 87 | end: end, 88 | allDay: allDay, 89 | location: entry['gd$where'][0]['valueString'], 90 | description: entry['content']['$t'] 91 | }); 92 | }); 93 | } 94 | var args = [events].concat(Array.prototype.slice.call(arguments, 1)); 95 | var res = applyAll(success, this, args); 96 | if ($.isArray(res)) { 97 | return res; 98 | } 99 | return events; 100 | } 101 | }); 102 | 103 | } 104 | 105 | 106 | // legacy 107 | fc.gcalFeed = function(url, sourceOptions) { 108 | return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' }); 109 | }; 110 | 111 | 112 | })(jQuery); 113 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/img/sep-half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/secgroundzero/warberry/ce8b392831213a57283bd4f3837aeaa63388e6df/Reporting/WarBerryReporting/Theme/assets/img/sep-half.png -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/admin.js: -------------------------------------------------------------------------------- 1 | // Interactiveness now 2 | 3 | (function() { 4 | 5 | var clock = document.querySelector('digiclock'); 6 | 7 | // But there is a little problem 8 | // we need to pad 0-9 with an extra 9 | // 0 on the left for hours, seconds, minutes 10 | 11 | var pad = function(x) { 12 | return x < 10 ? '0'+x : x; 13 | }; 14 | 15 | var ticktock = function() { 16 | var d = new Date(); 17 | 18 | var h = pad( d.getHours() ); 19 | var m = pad( d.getMinutes() ); 20 | var s = pad( d.getSeconds() ); 21 | 22 | var current_time = [h,m,s].join(':'); 23 | 24 | clock.innerHTML = current_time; 25 | 26 | }; 27 | 28 | ticktock(); 29 | 30 | // Calling ticktock() every 1 second 31 | setInterval(ticktock, 1000); 32 | 33 | }()); 34 | 35 | /* ---------- Notifications ---------- */ 36 | $('.noty').click(function(e){ 37 | e.preventDefault(); 38 | var options = $.parseJSON($(this).attr('data-noty-options')); 39 | noty(options); 40 | }); 41 | 42 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/dash-charts.js: -------------------------------------------------------------------------------- 1 | /*** First Chart in Dashboard page ***/ 2 | 3 | $(document).ready(function() { 4 | info = new Highcharts.Chart({ 5 | chart: { 6 | renderTo: 'load', 7 | margin: [0, 0, 0, 0], 8 | backgroundColor: null, 9 | plotBackgroundColor: 'none', 10 | 11 | }, 12 | 13 | title: { 14 | text: null 15 | }, 16 | 17 | tooltip: { 18 | formatter: function() { 19 | return this.point.name +': '+ this.y +' %'; 20 | 21 | } 22 | }, 23 | series: [ 24 | { 25 | borderWidth: 2, 26 | borderColor: '#F1F3EB', 27 | shadow: false, 28 | type: 'pie', 29 | name: 'Income', 30 | innerSize: '65%', 31 | data: [ 32 | { name: 'load percentage', y: 45.0, color: '#b2c831' }, 33 | { name: 'rest', y: 55.0, color: '#3d3d3d' } 34 | ], 35 | dataLabels: { 36 | enabled: false, 37 | color: '#000000', 38 | connectorColor: '#000000' 39 | } 40 | }] 41 | }); 42 | 43 | }); 44 | 45 | /*** second Chart in Dashboard page ***/ 46 | 47 | $(document).ready(function() { 48 | info = new Highcharts.Chart({ 49 | chart: { 50 | renderTo: 'space', 51 | margin: [0, 0, 0, 0], 52 | backgroundColor: null, 53 | plotBackgroundColor: 'none', 54 | 55 | }, 56 | 57 | title: { 58 | text: null 59 | }, 60 | 61 | tooltip: { 62 | formatter: function() { 63 | return this.point.name +': '+ this.y +' %'; 64 | 65 | } 66 | }, 67 | series: [ 68 | { 69 | borderWidth: 2, 70 | borderColor: '#F1F3EB', 71 | shadow: false, 72 | type: 'pie', 73 | name: 'SiteInfo', 74 | innerSize: '65%', 75 | data: [ 76 | { name: 'Used', y: 65.0, color: '#fa1d2d' }, 77 | { name: 'Rest', y: 35.0, color: '#3d3d3d' } 78 | ], 79 | dataLabels: { 80 | enabled: false, 81 | color: '#000000', 82 | connectorColor: '#000000' 83 | } 84 | }] 85 | }); 86 | 87 | }); 88 | 89 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/dash-noty.js: -------------------------------------------------------------------------------- 1 |  var n = noty({ 2 | text: ' Marcel Newman
Hi! Welcome. This is CUBES, the new Dashboard panel created for WrapBootstrap. Please take a look and enjoy.', 3 | type: 'alert', 4 | layout: 'topRight', 5 | closeWith: ['hover'], 6 | }); 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/gauge.js: -------------------------------------------------------------------------------- 1 | window.onload = function(){ 2 | //canvas initialization 3 | var canvas = document.getElementById("canvas"); 4 | var ctx = canvas.getContext("2d"); 5 | //dimensions 6 | var W = canvas.width; 7 | var H = canvas.height; 8 | //Variables 9 | var degrees = 0; 10 | var new_degrees = 0; 11 | var difference = 0; 12 | var color = "#b2c831"; //green looks better to me 13 | var bgcolor = "#222"; 14 | var text; 15 | var animation_loop, redraw_loop; 16 | 17 | function init() 18 | { 19 | //Clear the canvas everytime a chart is drawn 20 | ctx.clearRect(0, 0, W, H); 21 | 22 | //Background 360 degree arc 23 | ctx.beginPath(); 24 | ctx.strokeStyle = bgcolor; 25 | ctx.lineWidth = 30; 26 | ctx.arc(W/2, H/2, 100, 0, Math.PI*2, false); //you can see the arc now 27 | ctx.stroke(); 28 | 29 | //gauge will be a simple arc 30 | //Angle in radians = angle in degrees * PI / 180 31 | var radians = degrees * Math.PI / 180; 32 | ctx.beginPath(); 33 | ctx.strokeStyle = color; 34 | ctx.lineWidth = 30; 35 | //The arc starts from the rightmost end. If we deduct 90 degrees from the angles 36 | //the arc will start from the topmost end 37 | ctx.arc(W/2, H/2, 100, 0 - 90*Math.PI/180, radians - 90*Math.PI/180, false); 38 | //you can see the arc now 39 | ctx.stroke(); 40 | 41 | //Lets add the text 42 | ctx.fillStyle = color; 43 | ctx.font = "50px open sans"; 44 | text = Math.floor(degrees/360*100) + "%"; 45 | //Lets center the text 46 | //deducting half of text width from position x 47 | text_width = ctx.measureText(text).width; 48 | //adding manual value to position y since the height of the text cannot 49 | //be measured easily. There are hacks but we will keep it manual for now. 50 | ctx.fillText(text, W/2 - text_width/2, H/2 + 15); 51 | } 52 | 53 | function draw() 54 | { 55 | //Cancel any movement animation if a new chart is requested 56 | if(typeof animation_loop != undefined) clearInterval(animation_loop); 57 | 58 | //random degree from 0 to 360 59 | new_degrees = Math.round(Math.random()*360); 60 | difference = new_degrees - degrees; 61 | //This will animate the gauge to new positions 62 | //The animation will take 1 second 63 | //time for each frame is 1sec / difference in degrees 64 | animation_loop = setInterval(animate_to, 1000/difference); 65 | } 66 | 67 | //function to make the chart move to new degrees 68 | function animate_to() 69 | { 70 | //clear animation loop if degrees reaches to new_degrees 71 | if(degrees == new_degrees) 72 | clearInterval(animation_loop); 73 | 74 | if(degrees < new_degrees) 75 | degrees++; 76 | else 77 | degrees--; 78 | 79 | init(); 80 | } 81 | 82 | //Lets add some animation for fun 83 | draw(); 84 | redraw_loop = setInterval(draw, 2000); //Draw a new chart every 2 seconds 85 | 86 | 87 | 88 | 89 | } -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/lineandbars.js: -------------------------------------------------------------------------------- 1 |  // LINE AND BARS CHARTS 2 | 3 | $(function () { 4 | 5 | function generateNumber(min, max) { 6 | min = typeof min !== 'undefined' ? min : 1; 7 | max = typeof max !== 'undefined' ? max : 100; 8 | 9 | return Math.floor((Math.random() * max) + min); 10 | } 11 | 12 | var chart, 13 | categories = ['Categorie 1', 'Categorie 2', 'Categorie 3', 'Categorie 4', 'Categorie 5','Categorie 6', 'Categorie 7', 'Categorie 8', 'Categorie 9', 'Categorie 10', 'Categorie 11', 'Categorie 12', 'Categorie 13', 'Categorie 14', 'Categorie 15', 'Categorie 16', 'Categorie 17', 'Categorie 18', 'Categorie 19','Categorie 20', 'Categorie 21','Categorie 22', 'Categorie 23', 'Categorie 24', 'Categorie 25', 'Categorie 26', 'Categorie 27', 'Categorie 28', 'Categorie 29', 'Categorie 30'], 14 | serie1 = [13, 13, 46, 61, 23,12, 24, 16, 14, 12, 12, 24, 19, 13, 11, 11, 14, 11, 11, 11, 11, 13, 22, 10, 18, 15, 24, 31, 19, 10], 15 | serie2 = [52, 41, 58, 63, 55, 46, 45, 41, 38, 54, 50, 39, 48, 70, 63, 60, 58, 63, 83, 89, 83, 79, 83, 100, 104, 108, 52, 46, 83, 89], 16 | $aapls; 17 | 18 | $(document).ready(function() { 19 | 20 | chart = new Highcharts.Chart({ 21 | chart: { 22 | renderTo: 'importantchart', 23 | type: 'column', 24 | backgroundColor: 'transparent', 25 | height: 140, 26 | marginLeft: 3, 27 | marginRight: 3, 28 | marginBottom: 0, 29 | marginTop: 0 30 | }, 31 | title: { 32 | text: '' 33 | }, 34 | xAxis: { 35 | lineWidth: 0, 36 | tickWidth: 0, 37 | labels: { 38 | enabled: false 39 | }, 40 | categories: categories 41 | }, 42 | yAxis: { 43 | labels: { 44 | enabled: false 45 | }, 46 | gridLineWidth: 0, 47 | title: { 48 | text: null, 49 | }, 50 | }, 51 | series: [{ 52 | name: 'Awesomness', 53 | data: serie1 54 | }, { 55 | name: 'More Awesomness', 56 | color: '#fff', 57 | type: 'line', 58 | data: serie2 59 | }], 60 | credits: { 61 | enabled: false 62 | }, 63 | legend: { 64 | enabled: false 65 | }, 66 | plotOptions: { 67 | column: { 68 | borderWidth: 0, 69 | color: '#b2c831', 70 | shadow: false 71 | }, 72 | line: { 73 | marker: { 74 | enabled: false 75 | }, 76 | lineWidth: 3 77 | } 78 | }, 79 | tooltip: { 80 | enabled: false 81 | } 82 | }); 83 | 84 | setInterval(function() { 85 | chart.series[0].addPoint(generateNumber(), true, true); 86 | chart.series[1].addPoint(generateNumber(50, 150), true, true); 87 | }, 1000); 88 | 89 | 90 | 91 | setInterval(function() { 92 | $('.info-aapl span').each(function(index, elem) { 93 | $(elem).animate({ 94 | height: generateNumber(1, 40) 95 | }); 96 | }); 97 | 98 | }, 3000); 99 | }); 100 | 101 | }); 102 | -------------------------------------------------------------------------------- /Reporting/WarBerryReporting/Theme/assets/js/noty/layouts/bottom.js: -------------------------------------------------------------------------------- 1 | ;(function($) { 2 | 3 | $.noty.layouts.bottom = { 4 | name: 'bottom', 5 | options: {}, 6 | container: { 7 | object: '