├── .gitignore ├── LICENSE ├── README.md ├── bin └── pvs_anon.py ├── config ├── default.json └── example.json ├── docs ├── CNAME ├── categories │ └── index.xml ├── css │ ├── animate.min.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── creative.css │ ├── modals.css │ └── style.css ├── favicon.ico ├── font-awesome │ ├── css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── dofler-header.png │ ├── dofler-logo.png │ ├── header.jpg │ ├── marker.png │ └── portfolio │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ └── 6.jpg ├── index.html ├── index.xml ├── js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── cbpAnimatedHeader.js │ ├── classie.js │ ├── creative.js │ ├── gmaps.init.js │ ├── hpneo.gmaps.js │ ├── jquery.easing.min.js │ ├── jquery.fittext.js │ ├── jquery.js │ └── wow.min.js ├── sitemap.xml └── tags │ └── index.xml ├── hugo ├── archetypes │ └── default.md ├── config.toml ├── layouts │ └── partials │ │ ├── head.html │ │ └── js.html ├── publish_to_ghpages.sh ├── static │ ├── CNAME │ ├── css │ │ └── style.css │ └── img │ │ ├── dofler-header.png │ │ └── dofler-logo.png └── themes │ └── creative │ ├── .editorconfig │ ├── LICENSE │ ├── README.md │ ├── archetypes │ └── .stub │ ├── exampleSite │ ├── .gitignore │ ├── config.toml │ ├── content │ │ └── .gitkeep │ ├── data │ │ └── projects │ │ │ ├── 2014-07-05-project-1.yaml │ │ │ ├── 2014-07-06-project-2.yaml │ │ │ ├── 2014-07-07-project-3.yaml │ │ │ ├── 2014-07-08-project-5.yaml │ │ │ ├── 2014-07-09-project-4.yaml │ │ │ └── 2014-07-10-project-6.yaml │ └── static │ │ └── .gitkeep │ ├── images │ ├── screenshot.png │ └── tn.png │ ├── layouts │ ├── index.html │ └── partials │ │ ├── about.html │ │ ├── aside.html │ │ ├── contact.html │ │ ├── head.html │ │ ├── hero.html │ │ ├── js.html │ │ ├── location.html │ │ ├── modals.html │ │ ├── nav.html │ │ ├── portfolio.html │ │ └── services.html │ ├── static │ ├── css │ │ ├── animate.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ ├── creative.css │ │ └── modals.css │ ├── favicon.ico │ ├── font-awesome │ │ ├── css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── img │ │ ├── header.jpg │ │ ├── marker.png │ │ └── portfolio │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ ├── 5.jpg │ │ │ └── 6.jpg │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── cbpAnimatedHeader.js │ │ ├── classie.js │ │ ├── creative.js │ │ ├── gmaps.init.js │ │ ├── hpneo.gmaps.js │ │ ├── jquery.easing.min.js │ │ ├── jquery.fittext.js │ │ ├── jquery.js │ │ └── wow.min.js │ └── theme.toml ├── lib ├── models.js ├── parsers │ ├── driftnet.js │ ├── dsniff.js │ ├── ettercap.js │ ├── index.js │ ├── ngrep.js │ ├── pvs.js │ └── tshark.js └── web.js ├── nsfw_container ├── Dockerfile ├── nsfw │ ├── config.py │ ├── deploy.prototxt │ ├── nsfw.py │ ├── requirements.txt │ └── resnet_50_1by2_nsfw.caffemodel └── nsfw_service.py ├── package.json ├── server.js ├── static ├── css │ ├── bootstrap.min.css │ ├── display.min.css │ ├── dofler.css │ └── paper.min.css ├── img │ └── logo.png └── js │ ├── bootstrap.min.js │ ├── bootswatch.js │ ├── dofler.js │ ├── jQuery-1.10.2.min.js │ ├── jquery.flot.min.js │ ├── jquery.flot.time.min.js │ └── string.js ├── systemd.dofler.service ├── systemd.nsfw.service └── views ├── index.jade └── report.jade /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | .DS_Store 3 | devsync.sh 4 | config/development.json 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DoFler v5 2 | 3 | ## Introduction 4 | 5 | DoFler (short for Dashboard Of Fail) is a Web-Based front-end tying data from a wide variety of different network sniffing and analysis tools. The WebUI is intended to be displayed on a projector at Hacking/Information Security conferences, however I have heard of numerous people running DoFler in their own home labs, PwnPads, etc. 6 | 7 | ## Some Notes on v5 8 | 9 | DoFler version 5.x is a complete rewrite leveraging Node.js to attain a lot of the Asynchronous goals that I had initially set forth with Python's Tornado framework. Unfortunately, while Tornado would have let me re-use a lot of the parser code, it was ending up to be kludgey and it made more sense to simply switch over to a language and framework that was better suited to the workload that I'm attempting to do. This does mean that I abandoned the scapy work I was doing, but as is life. 10 | 11 | One of the biggest things thats new with v5 is that the WebUI is now Bootstrap-enabled and makes heavy use of web-sockets. The heavy web-socket use allows the UI to be more real-time and more responsive. It will no longer feel like everything is "batched" into the UI, but instead will generally flow into the UI in a more organic way. 12 | 13 | I decided to stick with a relational back-end (even though I was heavily considering heading back to Mongo) as it gives a lot more flexibility to the deployed architectures (e.g. you could deploy this on a Raspberry Pi). 14 | 15 | As I'm relatively new to Node.JS and Javascript, I'm sure there are a lot of inefficiencies that need ironing out, but so far in my testing it's been working pretty solidly. 16 | 17 | ## Installation 18 | 19 | The pre-reqs for DoFler vary depending on what parsers you want to enable. The default parsers use the following tools: 20 | 21 | * ngrep 22 | * ettercap 23 | * tshark 24 | 25 | There are optional parsers as well: 26 | 27 | * Tenable's PVS (via API calls) 28 | * driftnet (See recommended version below for driftnet) 29 | 30 | In general installing the pre-requisite tools should be a simple matter of installing them through your package manager. Here is the command for installing the primary tools on Ubuntu 31 | 32 | ```` 33 | sudo apt-get install ngrep ettercap-text-only tshark 34 | ```` 35 | 36 | For the database backend, DoFler supports MySQL, Postgres, or just about anything else that the [Sequelize](http://docs.sequelizejs.com/en/latest/) library supports. For the purposes of this guide, we will cover MariaDB on Ubuntu. 37 | 38 | ```` 39 | # Install the binaries 40 | sudo apt-get install mariadb-client mariadb-server 41 | 42 | # Run the initial conifguration 43 | mysql_secure_installation 44 | 45 | # Create the database 46 | mysqladmin -u root -p create dofler 47 | 48 | # Create the dofler user 49 | mysql -u root -p 50 | > GRANT ALL PRIVILEGES ON dofler.* TO 'dofler'@'localhost' IDENTIFIED BY 'NEW_PASSWORD'; 51 | > exit 52 | ```` 53 | 54 | 55 | In regards to Node.JS itself, I recommend using NVM to install Node.JS as it allows you to keep multiple version if needed, and allows for downloading the latest stable versions as well. There is an awesome walk-through for Ubuntu that Digital Ocean provides and it is located [HERE](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server#how-to-install-using-nvm). 56 | 57 | Once you have Node.JS installed and the pre-requisites, you simply need to download the repository and then run npm to install the needed libraries to get dofler into a runnable state. 58 | 59 | ```` 60 | cd /opt 61 | git clone https://github.com/SteveMcGrath/DoFler.git 62 | cd DoFler 63 | npm install ./ 64 | ```` 65 | 66 | As we are using MySQL/MariaDB, we do have to install the appropriate Node.JS database interface library. To do so, we will do this: 67 | 68 | ```` 69 | npm install mysql 70 | ```` 71 | 72 | Lastly, copy the default.json config file in the config folder and call the copy "production.json". Change the Database.uri parameter to match what you have configured. From here, your ready to start up the binary! 73 | 74 | ```` 75 | export NODE_ENV=production 76 | ./server.js 77 | ```` 78 | 79 | You should see a bunch of console output at this point. the default port DoFler listens on is port 3000, so just connect your browser to http://SERVER_ADDRESS:3000 and you should be good to go! 80 | 81 | ### Installing Driftnet 82 | 83 | Installing driftnet is a little more complicated. While there are many variants, and some of them may be in your package manager's system repositories, the fork of driftnet that I have seen the most success with is a version that has PNG support added in. To install this version, you will need to build it yourself from source. 84 | 85 | ```` 86 | sudo apt-get install libpng-dev libjpeg-dev libgif-dev libpcap-dev build-essential 87 | sudo /usr/src 88 | git clone https://github.com/bldewolf/driftnet.git 89 | cd driftnet 90 | vi Makefile 91 | # You will want to look for the "-DNO_DISPLAY_WINDOW" cflag. 92 | # Uncomment this flag in the make file. 93 | make 94 | ln -s driftnet /usr/local/bin/driftnet 95 | cp driftnet.1 /usr/share/man/man1/ 96 | ```` 97 | 98 | ### Installing the Systemd service file 99 | 100 | __Coming soon__ 101 | -------------------------------------------------------------------------------- /bin/pvs_anon.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | import re 4 | 5 | pvs_anon = open(sys.argv[1] + '.ANON.html', 'w') 6 | with open(sys.argv[1]) as pvs_original: 7 | pvs_anon.write(re.sub(r'\.\d{1,3}\.\d{1,3} \(', '.XXX.XXX (', 8 | pvs_original.read())) 9 | pvs_anon.close() -------------------------------------------------------------------------------- /config/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "WebUI": { 3 | "title": "ExampleCon", 4 | "slogan": "Example Slogan" 5 | }, 6 | "Database": { 7 | "uri": "mysql://dofler:dofler@localhost/dofler", 8 | "logging": false 9 | }, 10 | "AppServer": { 11 | "port": 3000, 12 | "debug": false, 13 | "static": "static", 14 | "templates": "templates", 15 | "images": "images" 16 | }, 17 | "NSFW": { 18 | "address": "http://localhost:4000" 19 | }, 20 | "Monitoring": { 21 | "interface": "eth1", 22 | "Driftnet": { 23 | "autostart": false, 24 | "tmp": "/tmp/driftnet", 25 | "nsfw_filter": true 26 | }, 27 | "TShark": { 28 | "autostart": true 29 | }, 30 | "NGrep": { 31 | "autostart": true, 32 | "nsfw_filter": true 33 | }, 34 | "Ettercap": { 35 | "autostart": true 36 | }, 37 | "PVS": { 38 | "autostart": false, 39 | "hostname": "PVS_HOSTNAME", 40 | "username": "PVS_USERNAME", 41 | "password": "PVS_PASSWORD" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /config/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "WebUI": { 3 | "title": "DevelopmentCon", 4 | "slogan": "This is what an example slogan looks like!" 5 | }, 6 | "Database": { 7 | "uri": "mysql://dofler:dofler@localhost/dofler" 8 | }, 9 | "Monitoring": { 10 | "interface": "eth1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | dofler.net -------------------------------------------------------------------------------- /docs/categories/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Categories on Dofler 5 | http://dofler.net/categories/ 6 | Recent content in Categories on Dofler 7 | Hugo -- gohugo.io 8 | en-us 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/css/creative.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) 3 | * Code licensed under the Apache License v2.0. 4 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 5 | */ 6 | 7 | html, 8 | body { 9 | width: 100%; 10 | height: 100%; 11 | } 12 | 13 | body { 14 | font-family: Merriweather,'Helvetica Neue',Arial,sans-serif; 15 | } 16 | 17 | hr { 18 | max-width: 50px; 19 | border-color: #f05f40; 20 | border-width: 3px; 21 | } 22 | 23 | hr.light { 24 | border-color: #fff; 25 | } 26 | 27 | a { 28 | color: #f05f40; 29 | -webkit-transition: all .35s; 30 | -moz-transition: all .35s; 31 | transition: all .35s; 32 | } 33 | 34 | a:hover, 35 | a:focus { 36 | color: #eb3812; 37 | } 38 | 39 | #about a { 40 | color: rgba(52, 52, 52, .7); 41 | } 42 | 43 | #about a:hover, 44 | #about a:focus { 45 | color: rgb(52, 52, 52); 46 | } 47 | 48 | h1, 49 | h2, 50 | h3, 51 | h4, 52 | h5, 53 | h6 { 54 | font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; 55 | } 56 | 57 | p { 58 | margin-bottom: 20px; 59 | font-size: 16px; 60 | line-height: 1.5; 61 | } 62 | 63 | .bg-primary { 64 | background-color: #f05f40; 65 | } 66 | 67 | .bg-dark { 68 | color: #fff; 69 | background-color: #222; 70 | } 71 | 72 | .text-faded { 73 | color: rgba(255,255,255,.7); 74 | } 75 | 76 | section { 77 | padding: 100px 0; 78 | } 79 | 80 | aside { 81 | padding: 50px 0; 82 | } 83 | 84 | .no-padding { 85 | padding: 0; 86 | } 87 | 88 | .navbar-default { 89 | border-color: rgba(34,34,34,.05); 90 | font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; 91 | background-color: #fff; 92 | -webkit-transition: all .35s; 93 | -moz-transition: all .35s; 94 | transition: all .35s; 95 | } 96 | 97 | .navbar-default .navbar-header .navbar-brand { 98 | text-transform: uppercase; 99 | font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; 100 | font-weight: 700; 101 | color: #f05f40; 102 | } 103 | 104 | .navbar-default .navbar-header .navbar-brand:hover, 105 | .navbar-default .navbar-header .navbar-brand:focus { 106 | color: #eb3812; 107 | } 108 | 109 | .navbar-default .nav > li>a, 110 | .navbar-default .nav>li>a:focus { 111 | text-transform: uppercase; 112 | font-size: 13px; 113 | font-weight: 700; 114 | color: #222; 115 | } 116 | 117 | .navbar-default .nav > li>a:hover, 118 | .navbar-default .nav>li>a:focus:hover { 119 | color: #f05f40; 120 | } 121 | 122 | .navbar-default .nav > li.active>a, 123 | .navbar-default .nav>li.active>a:focus { 124 | color: #f05f40!important; 125 | background-color: transparent; 126 | } 127 | 128 | .navbar-default .nav > li.active>a:hover, 129 | .navbar-default .nav>li.active>a:focus:hover { 130 | background-color: transparent; 131 | } 132 | 133 | @media(min-width:768px) { 134 | .navbar-default { 135 | border-color: rgba(255,255,255,.3); 136 | background-color: transparent; 137 | } 138 | 139 | .navbar-default .navbar-header .navbar-brand { 140 | color: rgba(255,255,255,.7); 141 | } 142 | 143 | .navbar-default .navbar-header .navbar-brand:hover, 144 | .navbar-default .navbar-header .navbar-brand:focus { 145 | color: #fff; 146 | } 147 | 148 | .navbar-default .nav > li>a, 149 | .navbar-default .nav>li>a:focus { 150 | color: rgba(255,255,255,.7); 151 | } 152 | 153 | .navbar-default .nav > li>a:hover, 154 | .navbar-default .nav>li>a:focus:hover { 155 | color: #fff; 156 | } 157 | 158 | .navbar-default.affix { 159 | border-color: rgba(34,34,34,.05); 160 | background-color: #fff; 161 | } 162 | 163 | .navbar-default.affix .navbar-header .navbar-brand { 164 | font-size: 14px; 165 | color: #f05f40; 166 | } 167 | 168 | .navbar-default.affix .navbar-header .navbar-brand:hover, 169 | .navbar-default.affix .navbar-header .navbar-brand:focus { 170 | color: #eb3812; 171 | } 172 | 173 | .navbar-default.affix .nav > li>a, 174 | .navbar-default.affix .nav>li>a:focus { 175 | color: #222; 176 | } 177 | 178 | .navbar-default.affix .nav > li>a:hover, 179 | .navbar-default.affix .nav>li>a:focus:hover { 180 | color: #f05f40; 181 | } 182 | } 183 | 184 | header { 185 | position: relative; 186 | width: 100%; 187 | min-height: auto; 188 | text-align: center; 189 | color: #fff; 190 | background-image: url(../img/header.jpg); 191 | background-position: center; 192 | -webkit-background-size: cover; 193 | -moz-background-size: cover; 194 | background-size: cover; 195 | -o-background-size: cover; 196 | } 197 | 198 | header .header-content { 199 | position: relative; 200 | width: 100%; 201 | padding: 100px 15px; 202 | text-align: center; 203 | } 204 | 205 | header .header-content .header-content-inner h1 { 206 | margin-top: 0; 207 | margin-bottom: 0; 208 | text-transform: uppercase; 209 | font-weight: 700; 210 | } 211 | 212 | header .header-content .header-content-inner hr { 213 | margin: 30px auto; 214 | } 215 | 216 | header .header-content .header-content-inner p { 217 | margin-bottom: 50px; 218 | font-size: 16px; 219 | font-weight: 300; 220 | color: rgba(255,255,255,.7); 221 | } 222 | 223 | @media(min-width:768px) { 224 | header { 225 | min-height: 100%; 226 | } 227 | 228 | header .header-content { 229 | position: absolute; 230 | top: 50%; 231 | padding: 0 50px; 232 | -webkit-transform: translateY(-50%); 233 | -ms-transform: translateY(-50%); 234 | transform: translateY(-50%); 235 | } 236 | 237 | header .header-content .header-content-inner { 238 | margin-right: auto; 239 | margin-left: auto; 240 | max-width: 1000px; 241 | } 242 | 243 | header .header-content .header-content-inner p { 244 | margin-right: auto; 245 | margin-left: auto; 246 | max-width: 80%; 247 | font-size: 18px; 248 | } 249 | } 250 | 251 | .section-heading { 252 | margin-top: 0; 253 | } 254 | 255 | .service-box { 256 | margin: 50px auto 0; 257 | max-width: 400px; 258 | } 259 | 260 | @media(min-width:992px) { 261 | .service-box { 262 | margin: 20px auto 0; 263 | } 264 | } 265 | 266 | .service-box p { 267 | margin-bottom: 0; 268 | } 269 | 270 | .portfolio-box { 271 | display: block; 272 | position: relative; 273 | margin: 0 auto; 274 | max-width: 650px; 275 | } 276 | 277 | .portfolio-box .portfolio-box-caption { 278 | display: block; 279 | position: absolute; 280 | bottom: 0; 281 | width: 100%; 282 | height: 100%; 283 | text-align: center; 284 | color: #fff; 285 | opacity: 0; 286 | background: rgba(240,95,64,.9); 287 | -webkit-transition: all .35s; 288 | -moz-transition: all .35s; 289 | transition: all .35s; 290 | } 291 | 292 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content { 293 | position: absolute; 294 | top: 50%; 295 | width: 100%; 296 | text-align: center; 297 | transform: translateY(-50%); 298 | } 299 | 300 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category, 301 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { 302 | padding: 0 15px; 303 | font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; 304 | } 305 | 306 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category { 307 | text-transform: uppercase; 308 | font-size: 14px; 309 | font-weight: 600; 310 | } 311 | 312 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { 313 | font-size: 18px; 314 | } 315 | 316 | .portfolio-box:hover .portfolio-box-caption { 317 | opacity: 1; 318 | } 319 | 320 | @media(min-width:768px) { 321 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category { 322 | font-size: 16px; 323 | } 324 | 325 | .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { 326 | font-size: 22px; 327 | } 328 | } 329 | 330 | .call-to-action h2 { 331 | margin: 0 auto 20px; 332 | } 333 | 334 | .text-primary { 335 | color: #f05f40; 336 | } 337 | 338 | .no-gutter > [class*=col-] { 339 | padding-right: 0; 340 | padding-left: 0; 341 | } 342 | 343 | .btn-default { 344 | border-color: #fff; 345 | color: #222; 346 | background-color: #fff; 347 | -webkit-transition: all .35s; 348 | -moz-transition: all .35s; 349 | transition: all .35s; 350 | } 351 | 352 | .btn-default:hover, 353 | .btn-default:focus, 354 | .btn-default.focus, 355 | .btn-default:active, 356 | .btn-default.active, 357 | .open > .dropdown-toggle.btn-default { 358 | border-color: #ededed; 359 | color: #222; 360 | background-color: #f2f2f2; 361 | } 362 | 363 | .btn-default:active, 364 | .btn-default.active, 365 | .open > .dropdown-toggle.btn-default { 366 | background-image: none; 367 | } 368 | 369 | .btn-default.disabled, 370 | .btn-default[disabled], 371 | fieldset[disabled] .btn-default, 372 | .btn-default.disabled:hover, 373 | .btn-default[disabled]:hover, 374 | fieldset[disabled] .btn-default:hover, 375 | .btn-default.disabled:focus, 376 | .btn-default[disabled]:focus, 377 | fieldset[disabled] .btn-default:focus, 378 | .btn-default.disabled.focus, 379 | .btn-default[disabled].focus, 380 | fieldset[disabled] .btn-default.focus, 381 | .btn-default.disabled:active, 382 | .btn-default[disabled]:active, 383 | fieldset[disabled] .btn-default:active, 384 | .btn-default.disabled.active, 385 | .btn-default[disabled].active, 386 | fieldset[disabled] .btn-default.active { 387 | border-color: #fff; 388 | background-color: #fff; 389 | } 390 | 391 | .btn-default .badge { 392 | color: #fff; 393 | background-color: #222; 394 | } 395 | 396 | .btn-primary { 397 | border-color: #f05f40; 398 | color: #fff; 399 | background-color: #f05f40; 400 | -webkit-transition: all .35s; 401 | -moz-transition: all .35s; 402 | transition: all .35s; 403 | } 404 | 405 | .btn-primary:hover, 406 | .btn-primary:focus, 407 | .btn-primary.focus, 408 | .btn-primary:active, 409 | .btn-primary.active, 410 | .open > .dropdown-toggle.btn-primary { 411 | border-color: #ed431f; 412 | color: #fff; 413 | background-color: #ee4b28; 414 | } 415 | 416 | .btn-primary:active, 417 | .btn-primary.active, 418 | .open > .dropdown-toggle.btn-primary { 419 | background-image: none; 420 | } 421 | 422 | .btn-primary.disabled, 423 | .btn-primary[disabled], 424 | fieldset[disabled] .btn-primary, 425 | .btn-primary.disabled:hover, 426 | .btn-primary[disabled]:hover, 427 | fieldset[disabled] .btn-primary:hover, 428 | .btn-primary.disabled:focus, 429 | .btn-primary[disabled]:focus, 430 | fieldset[disabled] .btn-primary:focus, 431 | .btn-primary.disabled.focus, 432 | .btn-primary[disabled].focus, 433 | fieldset[disabled] .btn-primary.focus, 434 | .btn-primary.disabled:active, 435 | .btn-primary[disabled]:active, 436 | fieldset[disabled] .btn-primary:active, 437 | .btn-primary.disabled.active, 438 | .btn-primary[disabled].active, 439 | fieldset[disabled] .btn-primary.active { 440 | border-color: #f05f40; 441 | background-color: #f05f40; 442 | } 443 | 444 | .btn-primary .badge { 445 | color: #f05f40; 446 | background-color: #fff; 447 | } 448 | 449 | .btn { 450 | border: 0; 451 | border-radius: 300px; 452 | text-transform: uppercase; 453 | font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; 454 | font-weight: 700; 455 | } 456 | 457 | .btn-xl { 458 | padding: 15px 30px; 459 | } 460 | 461 | ::-moz-selection { 462 | text-shadow: none; 463 | color: #fff; 464 | background: #222; 465 | } 466 | 467 | ::selection { 468 | text-shadow: none; 469 | color: #fff; 470 | background: #222; 471 | } 472 | 473 | img::selection { 474 | color: #fff; 475 | background: 0 0; 476 | } 477 | 478 | img::-moz-selection { 479 | color: #fff; 480 | background: 0 0; 481 | } 482 | 483 | body { 484 | webkit-tap-highlight-color: #222; 485 | } 486 | 487 | #map { 488 | height: 300px; 489 | overflow: visible; 490 | position: relative; 491 | } 492 | -------------------------------------------------------------------------------- /docs/css/modals.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * The code below adds the modal functionality of the Freelancer Bootstrap Theme 3 | * and was originally part of this theme. 4 | * 5 | * 6 | * Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com) 7 | * Code licensed under the Apache License v2.0. 8 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 9 | */ 10 | 11 | body { 12 | overflow-x: hidden; 13 | } 14 | 15 | .img-centered { 16 | margin: 0 auto; 17 | } 18 | 19 | .portfolio-modal .modal-content { 20 | padding: 100px 0; 21 | min-height: 100%; 22 | border: 0; 23 | border-radius: 0; 24 | text-align: center; 25 | background-clip: border-box; 26 | -webkit-box-shadow: none; 27 | box-shadow: none; 28 | } 29 | 30 | .portfolio-modal .modal-content h2 { 31 | margin: 0; 32 | font-size: 3em; 33 | } 34 | 35 | .portfolio-modal .modal-content img { 36 | margin-bottom: 30px; 37 | } 38 | 39 | .portfolio-modal .modal-content .item-details { 40 | margin: 30px 0; 41 | } 42 | 43 | .portfolio-modal .close-modal { 44 | position: absolute; 45 | top: 25px; 46 | right: 25px; 47 | width: 75px; 48 | height: 75px; 49 | background-color: transparent; 50 | cursor: pointer; 51 | } 52 | 53 | .portfolio-modal .close-modal:hover { 54 | opacity: .3; 55 | } 56 | 57 | .portfolio-modal .close-modal .lr { 58 | z-index: 1051; 59 | width: 1px; 60 | height: 75px; 61 | margin-left: 35px; 62 | background-color: #2c3e50; 63 | -webkit-transform: rotate(45deg); 64 | -ms-transform: rotate(45deg); 65 | transform: rotate(45deg); 66 | } 67 | 68 | .portfolio-modal .close-modal .lr .rl { 69 | z-index: 1052; 70 | width: 1px; 71 | height: 75px; 72 | background-color: #2c3e50; 73 | -webkit-transform: rotate(90deg); 74 | -ms-transform: rotate(90deg); 75 | transform: rotate(90deg); 76 | } 77 | 78 | .portfolio-modal .modal-backdrop { 79 | display: none; 80 | opacity: 0; 81 | } 82 | -------------------------------------------------------------------------------- /docs/css/style.css: -------------------------------------------------------------------------------- 1 | hr { 2 | border-color: #449718; 3 | } 4 | 5 | a { 6 | color: #449718; 7 | } 8 | 9 | .bg-primary { 10 | background-color: #449718; 11 | } 12 | 13 | .navbar-default .navbar-header .navbar-brand { 14 | color: #449718; 15 | } 16 | 17 | .navbar-default .nav > li>a:hover, 18 | .navbar-default .nav>li>a:focus:hover { 19 | color: #449718; 20 | } 21 | 22 | .navbar-default .nav > li.active>a, 23 | .navbar-default .nav>li.active>a:focus { 24 | color: #449718!important; 25 | } 26 | 27 | @media(min-width:768px) { 28 | .navbar-default.affix .navbar-header .navbar-brand { 29 | color: #449718; 30 | } 31 | 32 | .navbar-default.affix .nav > li>a:hover, 33 | .navbar-default.affix .nav>li>a:focus:hover { 34 | color: #449718; 35 | } 36 | } 37 | 38 | .text-primary { 39 | color: #449718; 40 | } 41 | 42 | .btn-primary { 43 | border-color: #449718; 44 | background-color: #449718; 45 | } 46 | 47 | .btn-primary:hover, 48 | .btn-primary:focus, 49 | .btn-primary.focus, 50 | .btn-primary:active, 51 | .btn-primary.active, 52 | .open > .dropdown-toggle.btn-primary { 53 | border-color: #55C11E; 54 | background-color: #55C11E; 55 | } 56 | 57 | .btn-primary.disabled, 58 | .btn-primary[disabled], 59 | fieldset[disabled] .btn-primary, 60 | .btn-primary.disabled:hover, 61 | .btn-primary[disabled]:hover, 62 | fieldset[disabled] .btn-primary:hover, 63 | .btn-primary.disabled:focus, 64 | .btn-primary[disabled]:focus, 65 | fieldset[disabled] .btn-primary:focus, 66 | .btn-primary.disabled.focus, 67 | .btn-primary[disabled].focus, 68 | fieldset[disabled] .btn-primary.focus, 69 | .btn-primary.disabled:active, 70 | .btn-primary[disabled]:active, 71 | fieldset[disabled] .btn-primary:active, 72 | .btn-primary.disabled.active, 73 | .btn-primary[disabled].active, 74 | fieldset[disabled] .btn-primary.active { 75 | border-color: #449718; 76 | background-color: #449718; 77 | } 78 | 79 | .btn-primary .badge { 80 | color: #449718; 81 | } -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/favicon.ico -------------------------------------------------------------------------------- /docs/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /docs/img/dofler-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/dofler-header.png -------------------------------------------------------------------------------- /docs/img/dofler-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/dofler-logo.png -------------------------------------------------------------------------------- /docs/img/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/header.jpg -------------------------------------------------------------------------------- /docs/img/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/marker.png -------------------------------------------------------------------------------- /docs/img/portfolio/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/1.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/2.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/3.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/4.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/5.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/docs/img/portfolio/6.jpg -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Dofler 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 74 | 75 | 76 | 77 | 78 | 79 |
80 |
81 |
82 | 83 |

84 | 85 | 86 | 87 | 88 | Learn More 89 | 90 |
91 |
92 |
93 | 94 | 95 | 96 | 97 | 98 |
99 |
100 |
101 |
102 | 103 |

What is dofler?

104 | 105 | 106 |
107 | 108 | 109 |

Dofler is an automated wall of shame designed for general entertainment at conferences. It has been 110 | slowly developed over the last several years to include things such as account carving (via ettercap), 111 | image carving (via driftnet), network stats (via some badly hacked up tshark command), and vulnerability 112 | sniffing (via Tenable’s very awesome Nessus Network Monitor). All of this data is then 113 | aggregated down and presented through an HTML interface.

114 | 115 |

Dofler got started a few years ago at BSides Chicago (I think it was 2012). It started as a simple ncurses 116 | front-end to ettercap in a transparent window with the driftnet window sitting behind it. To say that 117 | it was a hit was an understatement. People were trolling the system so heavily, I decided to try to make 118 | something a little more scalable.

119 | 120 |

I originally was going to start by leveraging some of the existing code that people had written for this 121 | exact purpose. However after looking around, I noticed that most of the code that was in existance was 122 | unmaintained PHP code, and overly complicated hacked together systems. I wanted something that could be 123 | easy to deploy, scalable, and entertaining to look at.

124 | 125 |

The continuing effort of that result is what you see today as Dofler. It’s a Python framework that can 126 | be easily extended, supports the ability to have multiple sensors that report back to a single console, 127 | and can support a veriety of the database backends. Dofler is very much in active development as well 128 | and has undergone several rewrites to help make the code portable and easy to use.

129 | 130 |

I always welcome any thoughts, suggestions, ideas, code, etc. Please feel free to contact me through any 131 | of the mechanisms mentioned on my blog SteveMcGrath.io.

132 | 133 | 134 |
135 |
136 |
137 |
138 | 139 | 140 | 141 | 142 | 143 |
144 | 145 |
146 |
147 |
148 |

Built with things

149 |
150 |
151 |
152 |
153 | 154 |
155 |
156 | 157 |
158 |
159 | 160 |

HTML Frontend

161 | 162 |
163 |
164 | 165 |
166 |
167 | 168 |

node.js & python

169 | 170 |
171 |
172 | 173 |
174 |
175 | 176 |

docker micro-services

177 | 178 |
179 |
180 | 181 |
182 |
183 | 184 |

Quick to deploy

185 | 186 |
187 |
188 | 189 |
190 |
191 |
192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 241 | 242 | 243 | 244 | -------------------------------------------------------------------------------- /docs/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dofler 5 | http://dofler.net/ 6 | Recent content on Dofler 7 | Hugo -- gohugo.io 8 | en-us 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/js/cbpAnimatedHeader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cbpAnimatedHeader.js v1.0.0 3 | * http://www.codrops.com 4 | * 5 | * Licensed under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * Copyright 2013, Codrops 9 | * http://www.codrops.com 10 | */ 11 | var cbpAnimatedHeader = (function() { 12 | 13 | var docElem = document.documentElement, 14 | header = document.querySelector( '.navbar-default' ), 15 | didScroll = false, 16 | changeHeaderOn = 300; 17 | 18 | function init() { 19 | window.addEventListener( 'scroll', function( event ) { 20 | if( !didScroll ) { 21 | didScroll = true; 22 | setTimeout( scrollPage, 250 ); 23 | } 24 | }, false ); 25 | } 26 | 27 | function scrollPage() { 28 | var sy = scrollY(); 29 | if ( sy >= changeHeaderOn ) { 30 | classie.add( header, 'navbar-shrink' ); 31 | } 32 | else { 33 | classie.remove( header, 'navbar-shrink' ); 34 | } 35 | didScroll = false; 36 | } 37 | 38 | function scrollY() { 39 | return window.pageYOffset || docElem.scrollTop; 40 | } 41 | 42 | init(); 43 | 44 | })(); -------------------------------------------------------------------------------- /docs/js/classie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * classie - class helper functions 3 | * from bonzo https://github.com/ded/bonzo 4 | * 5 | * classie.has( elem, 'my-class' ) -> true/false 6 | * classie.add( elem, 'my-new-class' ) 7 | * classie.remove( elem, 'my-unwanted-class' ) 8 | * classie.toggle( elem, 'my-class' ) 9 | */ 10 | 11 | /*jshint browser: true, strict: true, undef: true */ 12 | /*global define: false */ 13 | 14 | ( function( window ) { 15 | 16 | 'use strict'; 17 | 18 | // class helper functions from bonzo https://github.com/ded/bonzo 19 | 20 | function classReg( className ) { 21 | return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 22 | } 23 | 24 | // classList support for class management 25 | // altho to be fair, the api sucks because it won't accept multiple classes at once 26 | var hasClass, addClass, removeClass; 27 | 28 | if ( 'classList' in document.documentElement ) { 29 | hasClass = function( elem, c ) { 30 | return elem.classList.contains( c ); 31 | }; 32 | addClass = function( elem, c ) { 33 | elem.classList.add( c ); 34 | }; 35 | removeClass = function( elem, c ) { 36 | elem.classList.remove( c ); 37 | }; 38 | } 39 | else { 40 | hasClass = function( elem, c ) { 41 | return classReg( c ).test( elem.className ); 42 | }; 43 | addClass = function( elem, c ) { 44 | if ( !hasClass( elem, c ) ) { 45 | elem.className = elem.className + ' ' + c; 46 | } 47 | }; 48 | removeClass = function( elem, c ) { 49 | elem.className = elem.className.replace( classReg( c ), ' ' ); 50 | }; 51 | } 52 | 53 | function toggleClass( elem, c ) { 54 | var fn = hasClass( elem, c ) ? removeClass : addClass; 55 | fn( elem, c ); 56 | } 57 | 58 | var classie = { 59 | // full names 60 | hasClass: hasClass, 61 | addClass: addClass, 62 | removeClass: removeClass, 63 | toggleClass: toggleClass, 64 | // short names 65 | has: hasClass, 66 | add: addClass, 67 | remove: removeClass, 68 | toggle: toggleClass 69 | }; 70 | 71 | // transport 72 | if ( typeof define === 'function' && define.amd ) { 73 | // AMD 74 | define( classie ); 75 | } else { 76 | // browser global 77 | window.classie = classie; 78 | } 79 | 80 | })( window ); 81 | -------------------------------------------------------------------------------- /docs/js/creative.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) 3 | * Code licensed under the Apache License v2.0. 4 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 5 | */ 6 | 7 | (function($) { 8 | "use strict"; // Start of use strict 9 | 10 | // jQuery for page scrolling feature - requires jQuery Easing plugin 11 | $('a.page-scroll').bind('click', function(event) { 12 | var $anchor = $(this); 13 | $('html, body').stop().animate({ 14 | scrollTop: ($($anchor.attr('href')).offset().top - 50) 15 | }, 1250, 'easeInOutExpo'); 16 | event.preventDefault(); 17 | }); 18 | 19 | // Highlight the top nav as scrolling occurs 20 | $('body').scrollspy({ 21 | target: '.navbar-fixed-top', 22 | offset: 51 23 | }) 24 | 25 | // Closes the Responsive Menu on Menu Item Click 26 | $('.navbar-collapse ul li a').click(function() { 27 | $('.navbar-toggle:visible').click(); 28 | }); 29 | 30 | // Fit Text Plugin for Main Header 31 | $("h1").fitText( 32 | 1.2, { 33 | minFontSize: '35px', 34 | maxFontSize: '65px' 35 | } 36 | ); 37 | 38 | // Offset for Main Navigation 39 | $('#mainNav').affix({ 40 | offset: { 41 | top: 100 42 | } 43 | }) 44 | 45 | // Initialize WOW.js Scrolling Animations 46 | new WOW().init(); 47 | 48 | })(jQuery); // End of use strict 49 | -------------------------------------------------------------------------------- /docs/js/gmaps.init.js: -------------------------------------------------------------------------------- 1 | /* global GMaps: true */ 2 | 3 | $(document).ready(function () { 4 | map() 5 | }) 6 | 7 | function map () { 8 | if ($('#map').length) { 9 | var lat = $('#gmap-lat').val() 10 | var lng = $('#gmap-lng').val() 11 | var image = '/img/marker.png' 12 | 13 | var styles = 14 | [ 15 | { 16 | 'featureType': 'landscape', 'stylers': [{'saturation': -100}, {'lightness': 65}, {'visibility': 'on'}] 17 | }, { 18 | 'featureType': 'poi', 'stylers': [{'saturation': -100}, {'lightness': 51}, {'visibility': 'simplified'}] 19 | }, { 20 | 'featureType': 'road.highway', 'stylers': [{'saturation': -100}, {'visibility': 'simplified'}] 21 | }, { 22 | 'featureType': 'road.arterial', 'stylers': [{'saturation': -100}, {'lightness': 30}, {'visibility': 'on'}] 23 | }, { 24 | 'featureType': 'road.local', 'stylers': [{'saturation': -100}, {'lightness': 40}, {'visibility': 'on'}] 25 | }, { 26 | 'featureType': 'transit', 'stylers': [{'saturation': -100}, {'visibility': 'simplified'}] 27 | }, { 28 | 'featureType': 'administrative.province', 'stylers': [{'visibility': 'off'}] 29 | }, { 30 | 'featureType': 'water', 'elementType': 'labels', 'stylers': [{'visibility': 'on'}, {'lightness': -25}, {'saturation': -100}] 31 | }, { 32 | 'featureType': 'water', 'elementType': 'geometry', 'stylers': [{'hue': '#ffff00'}, {'lightness': -25}, {'saturation': -97}] 33 | } 34 | ] 35 | 36 | var map = new GMaps({ 37 | el: '#map', 38 | lat: lat, 39 | lng: lng, 40 | zoomControl: true, 41 | zoomControlOpt: { 42 | style: 'SMALL', 43 | position: 'TOP_LEFT' 44 | }, 45 | panControl: false, 46 | streetViewControl: false, 47 | mapTypeControl: false, 48 | overviewMapControl: false, 49 | scrollwheel: false, 50 | draggable: false, 51 | styles: styles 52 | }) 53 | 54 | map.addMarker({ 55 | lat: lat, 56 | lng: lng, 57 | icon: image /* , 58 | title: '', 59 | infoWindow: { 60 | content: '

HTML Content

' 61 | } */ 62 | }) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /docs/js/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - EASING EQUATIONS 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2001 Robert Penner 12 | * All rights reserved. 13 | * 14 | * TERMS OF USE - jQuery Easing 15 | * 16 | * Open source under the BSD License. 17 | * 18 | * Copyright © 2008 George McGinley Smith 19 | * All rights reserved. 20 | * 21 | * Redistribution and use in source and binary forms, with or without modification, 22 | * are permitted provided that the following conditions are met: 23 | * 24 | * Redistributions of source code must retain the above copyright notice, this list of 25 | * conditions and the following disclaimer. 26 | * Redistributions in binary form must reproduce the above copyright notice, this list 27 | * of conditions and the following disclaimer in the documentation and/or other materials 28 | * provided with the distribution. 29 | * 30 | * Neither the name of the author nor the names of contributors may be used to endorse 31 | * or promote products derived from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 34 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 35 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 36 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 37 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 39 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 41 | * OF THE POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | */ 44 | jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(gb;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | http://dofler.net/categories/ 7 | 0 8 | 9 | 10 | 11 | http://dofler.net/ 12 | 0 13 | 14 | 15 | 16 | http://dofler.net/tags/ 17 | 0 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/tags/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tags on Dofler 5 | http://dofler.net/tags/ 6 | Recent content in Tags on Dofler 7 | Hugo -- gohugo.io 8 | en-us 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /hugo/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .TranslationBaseName "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /hugo/config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "http://dofler.net/" 2 | languageCode = "en-us" 3 | title = "Dofler" 4 | theme = "creative" 5 | googleAnalytics = "UA-79231696-2" 6 | publishDir = "../docs" 7 | 8 | [params] 9 | 10 | # You can use Markdown syntax for urls [text](//url.to/source) for 11 | # most longer texts. 12 | 13 | # All icons using Fontawesome's icon font. Look at http://fontawesome.io/icons/ 14 | # for more icons. The icons are represented by their corresponding 15 | # CSS class. 16 | 17 | # All projects of the portfolio are defined in their own files. 18 | # You can find example projects at 'exampleSite/data/projects'. Copy the 'projects' 19 | # folder into the 'data' directory at the root of this Hugo site. 20 | # For more information take a look at the README. 21 | 22 | # To provide some metadata for search engines feel free to add some 23 | # information about you and your website. 24 | name = "Steven McGrath" 25 | description = "Dofler Network Sniffing Project" 26 | 27 | favicon = "favicon.ico" 28 | 29 | 30 | # Navigation 31 | [params.navigation] 32 | brand = "" 33 | 34 | [params.navigation.links] 35 | about = "About" 36 | services = "Technology" 37 | #portfolio = "NaN" 38 | #contact = "NaN" 39 | 40 | 41 | [params.hero] 42 | slogan = "" 43 | buttonText = "Learn More" 44 | 45 | 46 | [params.about] 47 | headline = "What is dofler?" 48 | description = """ 49 | Dofler is an automated wall of shame designed for general entertainment at conferences. It has been 50 | slowly developed over the last several years to include things such as account carving (via ettercap), 51 | image carving (via driftnet), network stats (via some badly hacked up tshark command), and vulnerability 52 | sniffing (via [Tenable's very awesome Nessus Network Monitor](http://tenable.com)). All of this data is then 53 | aggregated down and presented through an HTML interface. 54 | 55 | Dofler got started a few years ago at BSides Chicago (I think it was 2012). It started as a simple ncurses 56 | front-end to ettercap in a transparent window with the driftnet window sitting behind it. To say that 57 | it was a hit was an understatement. People were trolling the system so heavily, I decided to try to make 58 | something a little more scalable. 59 | 60 | I originally was going to start by leveraging some of the existing code that people had written for this 61 | exact purpose. However after looking around, I noticed that most of the code that was in existance was 62 | unmaintained PHP code, and overly complicated hacked together systems. I wanted something that could be 63 | easy to deploy, scalable, and entertaining to look at. 64 | 65 | The continuing effort of that result is what you see today as Dofler. It's a Python framework that can 66 | be easily extended, supports the ability to have multiple sensors that report back to a single console, 67 | and can support a veriety of the database backends. Dofler is very much in active development as well 68 | and has undergone several rewrites to help make the code portable and easy to use. 69 | 70 | I always welcome any thoughts, suggestions, ideas, code, etc. Please feel free to contact me through any 71 | of the mechanisms mentioned on my blog [SteveMcGrath.io](http://stevemcgrath.io). 72 | """ 73 | 74 | 75 | [params.services] 76 | headline = "Built with things" 77 | 78 | [[params.services.list]] 79 | icon = "fa-html5" 80 | title = "HTML Frontend" 81 | 82 | [[params.services.list]] 83 | icon = "fa-code" 84 | title = "node.js & python" 85 | 86 | [[params.services.list]] 87 | icon = "fa-ship" 88 | title = "docker micro-services" 89 | 90 | [[params.services.list]] 91 | icon = "fa-server" 92 | title = "Quick to deploy" 93 | 94 | 95 | [params.portfolio.modal] 96 | client = "Client" 97 | date = "Date" 98 | category = "Category" 99 | buttonText = "Close" 100 | 101 | [params.aside] 102 | headline = "Dofler is Open Source!" 103 | 104 | [params.aside.button] 105 | text = "Github Repository" 106 | link = "//github.com/stevemcgrath/dofler/" 107 | -------------------------------------------------------------------------------- /hugo/layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ with .Site.Params.name }}{{ end }} 5 | {{ with .Site.Params.description }}{{ end }} 6 | {{ .Hugo.Generator }} 7 | {{ .Site.Title }} 8 | 9 | {{ "" | safeHTML }} 10 | 11 | {{ "" | safeHTML }} 12 | 13 | {{ "" | safeHTML }} 14 | 15 | 16 | 17 | {{ "" | safeHTML }} 18 | 19 | {{ "" | safeHTML }} 20 | 21 | 22 | 23 | 24 | {{ "" | safeHTML }} 25 | {{ "" | safeHTML }} 26 | {{ "" | safeHTML }} 30 | -------------------------------------------------------------------------------- /hugo/layouts/partials/js.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | 3 | {{ "" | safeHTML }} 4 | 5 | {{ "" | safeHTML }} 6 | 7 | 8 | 9 | {{ if .Site.Params.location }} 10 | 11 | 12 | 13 | {{ end }} 14 | {{ "" | safeHTML }} 15 | 16 | -------------------------------------------------------------------------------- /hugo/publish_to_ghpages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname "$0") 4 | 5 | #if [[ $(git status -s) ]] 6 | #then 7 | # echo "The working directory is dirty. Please commit any pending changes." 8 | # exit 1; 9 | #fi 10 | 11 | echo "Deleting old publication" 12 | rm -rf public 13 | mkdir public 14 | git worktree prune 15 | rm -rf .git/worktrees/public/ 16 | 17 | echo "Checking out gh-pages branch into public" 18 | git worktree add -B gh-pages public hugo/gh-pages 19 | 20 | echo "Removing existing files" 21 | rm -rf public/* 22 | 23 | echo "Generating site" 24 | hugo 25 | 26 | echo "Updating gh-pages branch and pushing" 27 | cd public 28 | git add --all 29 | git commit -m "Publishing to gh-pages (publish.sh)" 30 | git push 31 | 32 | echo "Pushing any remaining commits to the master branch" 33 | #cd .. 34 | #git push -------------------------------------------------------------------------------- /hugo/static/CNAME: -------------------------------------------------------------------------------- 1 | dofler.net -------------------------------------------------------------------------------- /hugo/static/css/style.css: -------------------------------------------------------------------------------- 1 | hr { 2 | border-color: #449718; 3 | } 4 | 5 | a { 6 | color: #449718; 7 | } 8 | 9 | .bg-primary { 10 | background-color: #449718; 11 | } 12 | 13 | .navbar-default .navbar-header .navbar-brand { 14 | color: #449718; 15 | } 16 | 17 | .navbar-default .nav > li>a:hover, 18 | .navbar-default .nav>li>a:focus:hover { 19 | color: #449718; 20 | } 21 | 22 | .navbar-default .nav > li.active>a, 23 | .navbar-default .nav>li.active>a:focus { 24 | color: #449718!important; 25 | } 26 | 27 | @media(min-width:768px) { 28 | .navbar-default.affix .navbar-header .navbar-brand { 29 | color: #449718; 30 | } 31 | 32 | .navbar-default.affix .nav > li>a:hover, 33 | .navbar-default.affix .nav>li>a:focus:hover { 34 | color: #449718; 35 | } 36 | } 37 | 38 | .text-primary { 39 | color: #449718; 40 | } 41 | 42 | .btn-primary { 43 | border-color: #449718; 44 | background-color: #449718; 45 | } 46 | 47 | .btn-primary:hover, 48 | .btn-primary:focus, 49 | .btn-primary.focus, 50 | .btn-primary:active, 51 | .btn-primary.active, 52 | .open > .dropdown-toggle.btn-primary { 53 | border-color: #55C11E; 54 | background-color: #55C11E; 55 | } 56 | 57 | .btn-primary.disabled, 58 | .btn-primary[disabled], 59 | fieldset[disabled] .btn-primary, 60 | .btn-primary.disabled:hover, 61 | .btn-primary[disabled]:hover, 62 | fieldset[disabled] .btn-primary:hover, 63 | .btn-primary.disabled:focus, 64 | .btn-primary[disabled]:focus, 65 | fieldset[disabled] .btn-primary:focus, 66 | .btn-primary.disabled.focus, 67 | .btn-primary[disabled].focus, 68 | fieldset[disabled] .btn-primary.focus, 69 | .btn-primary.disabled:active, 70 | .btn-primary[disabled]:active, 71 | fieldset[disabled] .btn-primary:active, 72 | .btn-primary.disabled.active, 73 | .btn-primary[disabled].active, 74 | fieldset[disabled] .btn-primary.active { 75 | border-color: #449718; 76 | background-color: #449718; 77 | } 78 | 79 | .btn-primary .badge { 80 | color: #449718; 81 | } -------------------------------------------------------------------------------- /hugo/static/img/dofler-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/static/img/dofler-header.png -------------------------------------------------------------------------------- /hugo/static/img/dofler-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/static/img/dofler-logo.png -------------------------------------------------------------------------------- /hugo/themes/creative/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 2 8 | indent_style = space 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | 16 | [*.{html,css,js,yaml,toml,json}] 17 | indent_size = 4 -------------------------------------------------------------------------------- /hugo/themes/creative/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /hugo/themes/creative/README.md: -------------------------------------------------------------------------------- 1 | # Creative Theme 2 | 3 | Creative Theme is a one page portfolio for creatives based on the [original Bootstrap theme](//github.com/IronSummitMedia/startbootstrap-creative) by [David Miller](//github.com/davidtmiller). Noteworthy features of this Hugo theme are several content sections and a responsive portfolio grid with hover effects and full page portfolio item modals. 4 | 5 | ![Hugo Creative Theme Screenshot](https://raw.githubusercontent.com/digitalcraftsman/hugo-creative-theme/dev/images/screenshot.png) 6 | 7 | 8 | ## Installation 9 | 10 | Inside the folder of your Hugo site run: 11 | 12 | $ cd themes 13 | $ git clone https://github.com/digitalcraftsman/hugo-creative-theme 14 | 15 | For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo. 16 | 17 | 18 | ## Getting started 19 | 20 | After installing the Creative Theme successfully it requires a just a few more steps to get your site running. 21 | 22 | 23 | ### The config file 24 | 25 | Take a look inside the [`exampleSite`](//github.com/digitalcraftsman/hugo-creative-theme/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](//github.com/digitalcraftsman/hugo-creative-theme/blob/master/exampleSite/config.toml). 26 | 27 | To use it, copy the [`config.toml`](//github.com/digitalcraftsman/hugo-creative-theme/blob/dev/exampleSite/config.toml) in the root folder of your Hugo site. Feel free to change strings as you like to customize your website. 28 | 29 | 30 | ### Change the hero background 31 | 32 | The hero acts as an eye-catcher for your site. So consider to give him a nice background. You just need to replace the [`header.jpg`](//github.com/digitalcraftsman/hugo-creative-theme/blob/master/static/img/header.jpg) at [`static/img`](//github.com/digitalcraftsman/hugo-creative-theme/tree/master/static/img) with your own. But it's important that you use the same filename. 33 | 34 | 35 | ### Add your services 36 | 37 | This section should show your capabilities and skills. You can change the services under at `[params.services.list]` in the [`config.toml`](//github.com/digitalcraftsman/hugo-creative-theme/blob/dev/exampleSite/config.toml). 38 | 39 | All icons using Fontawesome's icon font. Look at the website of [Fontawesome](//fortawesome.github.io/Font-Awesome/icons/) for more icons. The icons are represented by their corresponding CSS class. A skill is defined like this example: 40 | 41 | ```toml 42 | [[params.services.list]] 43 | icon = "fa-diamond" 44 | title = "Sturdy Templates" 45 | description = "Our templates are updated regularly so they don't break." 46 | ``` 47 | 48 | ### Create your portfolio 49 | 50 | Beside the config file, there is in `data` another subfolder called [`projects`](//github.com/digitalcraftsman/hugo-creative-theme/tree/master/exampleSite/data/projects) which hosts the files that will appear as your projects in the portfolio section. Such a project file might look like [this one](//github.com/digitalcraftsman/hugo-creative-theme/blob/dev/exampleSite/data/projects/2014-07-05-project-1.yaml) written in YAML: 51 | 52 | ```yaml 53 | modalID: 1 54 | title: Project 1 55 | date: 2014-07-05 56 | img: 1.jpg 57 | client: Start Bootstrap 58 | clientLink: "#" 59 | category: Web Development 60 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. 61 | ``` 62 | 63 | Copy the folder [`projects`](//github.com/digitalcraftsman/hugo-creative-theme/tree/master/exampleSite/data/projects) inside the `data` folder in the **root** directory of your site. Let's make some changes to show your work. 64 | 65 | Pay attention to the `modalID`. It must be a unique integer and be incremented with each new project you want to add to the portfolio. Otherwise, the corresponding modal can't be rendered. 66 | 67 | Furthermore, you can use Markdown syntax for URLs like here `[text](//url.to/source)` in the description. 68 | 69 | To give your projects an image, save those under [`static/img/portfolio`](//github.com/digitalcraftsman/hugo-creative-theme/tree/master/static/img/portfolio). The dimensions should be 650 x 350 pixels. Don't forget to set the **filename** under 'img' in your project. 70 | 71 | 72 | ### Nearly finished 73 | 74 | In order to see your site in action, run Hugo's built-in local server. 75 | 76 | $ hugo server 77 | 78 | Now enter [`localhost:1313`](https://localhost:1313) in the address bar of your browser. 79 | 80 | 81 | ## Contributing 82 | 83 | Did you found a bug or got an idea for a new feature? Feel free to use the [issue tracker](//github.com/digitalcraftsman/hugo-creative-theme/issues) to let me know. Or make directly a [pull request](//github.com/digitalcraftsman/hugo-creative-theme/pulls). 84 | 85 | Please create a separate branch for your pull request. 86 | 87 | 88 | ## License 89 | 90 | This theme is released under the Apache License 2.0 For more information read the [license](//github.com/digitalcraftsman/hugo-creative-theme/blob/master/LICENSE). 91 | 92 | 93 | ## Acknowledgements 94 | 95 | Thanks to 96 | 97 | - [Steve Francia](//github.com/spf13) for creating Hugo and the awesome community around the project 98 | - [David Miller](//github.com/davidtmiller) for creating the original theme 99 | -------------------------------------------------------------------------------- /hugo/themes/creative/archetypes/.stub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/archetypes/.stub -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | themes -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "https://example.org/" 2 | languageCode = "en-us" 3 | title = "Hugo Creative Theme" 4 | theme = "hugo-creative-theme" 5 | googleAnalytics = "" 6 | 7 | [params] 8 | 9 | # You can use Markdown syntax for urls [text](//url.to/source) for 10 | # most longer texts. 11 | 12 | # All icons using Fontawesome's icon font. Look at http://fontawesome.io/icons/ 13 | # for more icons. The icons are represented by their corresponding 14 | # CSS class. 15 | 16 | # All projects of the portfolio are defined in their own files. 17 | # You can find example projects at 'exampleSite/data/projects'. Copy the 'projects' 18 | # folder into the 'data' directory at the root of this Hugo site. 19 | # For more information take a look at the README. 20 | 21 | # To provide some metadata for search engines feel free to add some 22 | # information about you and your website. 23 | name = "Your name" 24 | description = "Your description" 25 | 26 | # The path must be relative to the static folder 27 | favicon = "favicon.ico" 28 | 29 | 30 | # Navigation 31 | [params.navigation] 32 | brand = "Hugo Creative Theme" 33 | 34 | [params.navigation.links] 35 | about = "About" 36 | services = "Services" 37 | portfolio = "Portfolio" 38 | contact = "Contact" 39 | 40 | 41 | # Hero section 42 | [params.hero] 43 | # To change the background of the hero section, replace the 'header.jpg' at './static/img' with your own. 44 | slogan = "Your awesome slogan" 45 | subtitle = "[Lorem](//google.com) ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis nesciunt consequatur ut nihil voluptatem fugiat eos eveniet alias in veniam?" 46 | buttonText = "Find out more" 47 | 48 | 49 | # About section 50 | [params.about] 51 | headline = "We've got what you need!" 52 | description = "[Lorem](//google.com) ipsum dolor sit amet, consectetur adipisicing elit. Praesentium similique eos eligendi error veritatis harum, sed aliquid totam, quam minus neque enim est architecto, ad. Maiores, aliquid, vitae!" 53 | buttonText = "Get started!" 54 | 55 | 56 | # Service section 57 | [params.services] 58 | headline = "At your service" 59 | 60 | [[params.services.list]] 61 | icon = "fa-diamond" 62 | title = "Sturdy Templates" 63 | description = "Our templates are updated regularly so they don't break." 64 | 65 | [[params.services.list]] 66 | icon = "fa-paper-plane" 67 | title = "Ready to Ship" 68 | description = "You can use this theme as is, or you can make changes!" 69 | 70 | [[params.services.list]] 71 | icon = "fa-newspaper-o" 72 | title = "Up to Date" 73 | description = "We update dependencies to keep things fresh." 74 | 75 | [[params.services.list]] 76 | icon = "fa-heart" 77 | title = "Made with Love" 78 | description = "You have to make your websites with love these days!" 79 | 80 | 81 | # Portfolio modals 82 | [params.portfolio.modal] 83 | client = "Client" 84 | date = "Date" 85 | category = "Category" 86 | buttonText = "Close" 87 | 88 | # Aside section 89 | [params.aside] 90 | headline = "Get the Creative Theme for Hugo" 91 | 92 | [params.aside.button] 93 | text = "Download now" 94 | link = "//github.com/digitalcraftsman/hugo-creative-theme" 95 | 96 | # Contact section 97 | [params.contact] 98 | headline = "Let's Get In Touch!" 99 | description = "Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!" 100 | phone = "123-456-6789" 101 | email = "feedback@startbootstrap.com" 102 | 103 | # Google Maps section 104 | # [params.location] 105 | # latitude = "34.007850" 106 | # longitude = "-118.499305" 107 | # maps_api_key = "" 108 | -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/content/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/exampleSite/content/.gitkeep -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-05-project-1.yaml: -------------------------------------------------------------------------------- 1 | modalID: 1 2 | title: Project 1 3 | date: 2014-07-05 4 | img: 1.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-06-project-2.yaml: -------------------------------------------------------------------------------- 1 | modalID: 2 2 | title: Project 2 3 | date: 2014-07-06 4 | img: 2.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-07-project-3.yaml: -------------------------------------------------------------------------------- 1 | modalID: 3 2 | title: Project 3 3 | date: 2014-07-07 4 | img: 3.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-08-project-5.yaml: -------------------------------------------------------------------------------- 1 | modalID: 5 2 | title: Project 5 3 | date: 2014-07-08 4 | img: 5.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-09-project-4.yaml: -------------------------------------------------------------------------------- 1 | modalID: 4 2 | title: Project 4 3 | date: 2014-07-09 4 | img: 4.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/data/projects/2014-07-10-project-6.yaml: -------------------------------------------------------------------------------- 1 | modalID: 6 2 | title: Project 6 3 | date: 2014-07-10 4 | img: 6.jpg 5 | client: Start Bootstrap 6 | clientLink: "#" 7 | category: Web Development 8 | description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit. -------------------------------------------------------------------------------- /hugo/themes/creative/exampleSite/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/exampleSite/static/.gitkeep -------------------------------------------------------------------------------- /hugo/themes/creative/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/images/screenshot.png -------------------------------------------------------------------------------- /hugo/themes/creative/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/images/tn.png -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "head.html" . }} 5 | 6 | 7 | {{ if or .Site.Params.navigation.links.about .Site.Params.navigation.links.services .Site.Params.navigation.links.portfolio .Site.Params.navigation.links.contact }} 8 | {{ partial "nav.html" . }} 9 | {{ end }} 10 | 11 | {{ if .Site.Params.hero }} 12 | {{ partial "hero.html" . }} 13 | {{ end }} 14 | 15 | {{ if .Site.Params.about }} 16 | {{ partial "about.html" . }} 17 | {{ end }} 18 | 19 | {{ if .Site.Params.services.list }} 20 | {{ partial "services.html" . }} 21 | {{ end }} 22 | 23 | {{ if .Site.Data.projects }} 24 | {{ partial "portfolio.html" . }} 25 | {{ end }} 26 | 27 | {{ if .Site.Params.location }} 28 | {{ partial "location.html" . }} 29 | {{ end }} 30 | 31 | {{ if .Site.Params.aside }} 32 | {{ partial "aside.html" . }} 33 | {{ end }} 34 | 35 | {{ if .Site.Params.contact }} 36 | {{ partial "contact.html" . }} 37 | {{ end }} 38 | 39 | {{ if .Site.Data.projects }} 40 | {{ partial "modals.html" . }} 41 | {{ end }} 42 | 43 | {{ partial "js.html" . }} 44 | 45 | {{ template "_internal/google_analytics.html" . }} 46 | 47 | 48 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/about.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 |
3 |
4 |
5 |
6 | {{ with .Site.Params.about.headline }} 7 |

{{ . }}

8 | {{ end }} 9 | {{ if and .Site.Params.about.headline .Site.Params.about.description }} 10 |
11 | {{ end }} 12 | {{ with .Site.Params.about.description }} 13 |

{{ . | markdownify }}

14 | {{ end }} 15 | {{ with .Site.Params.about.buttonText }} 16 | {{ . }} 17 | {{ end }} 18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/aside.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | 12 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/contact.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 |
3 |
4 |
5 |
6 | {{ with .Site.Params.contact.headline }} 7 |

{{ . }}

8 | {{ end }} 9 | {{ if and .Site.Params.contact.headline .Site.Params.contact.description }} 10 |
11 | {{ end }} 12 | {{ with .Site.Params.contact.description }} 13 |

{{ . | markdownify }}

14 | {{ end }} 15 |
16 | {{ if .Site.Params.contact.phone }} 17 |
24 | 25 |

{{ .Site.Params.contact.phone }}

26 |
27 | {{ end }} 28 | {{ if .Site.Params.contact.email }} 29 | 39 | {{ end }} 40 |
41 |
42 |
43 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ with .Site.Params.name }}{{ end }} 5 | {{ with .Site.Params.description }}{{ end }} 6 | {{ .Hugo.Generator }} 7 | {{ .Site.Title }} 8 | 9 | {{ "" | safeHTML }} 10 | 11 | {{ "" | safeHTML }} 12 | 13 | {{ "" | safeHTML }} 14 | 15 | 16 | 17 | {{ "" | safeHTML }} 18 | 19 | {{ "" | safeHTML }} 20 | 21 | 22 | 23 | {{ "" | safeHTML }} 24 | {{ "" | safeHTML }} 25 | {{ "" | safeHTML }} 29 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/hero.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 |
3 |
4 |
5 | {{ with .Site.Params.hero.slogan }} 6 |

{{ . | markdownify }}

7 | {{ end }} 8 | {{ if and .Site.Params.hero.slogan .Site.Params.hero.subtitle }} 9 |
10 | {{ end }} 11 | {{ with .Site.Params.hero.subtitle }} 12 |

{{ . | markdownify }}

13 | {{ end }} 14 | {{ with .Site.Params.hero.buttonText }} 15 | {{ . }} 16 | {{ end }} 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/js.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | 3 | {{ "" | safeHTML }} 4 | 5 | {{ "" | safeHTML }} 6 | 7 | 8 | 9 | {{ if .Site.Params.location }} 10 | 11 | 12 | 13 | {{ end }} 14 | {{ "" | safeHTML }} 15 | 16 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/location.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if and .Site.Params.location.latitude .Site.Params.location.longitude }} 3 |
4 | 8 | 9 |
10 |   11 |
12 |
13 |
14 | {{ end }} 15 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/modals.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | {{ range .Site.Data.projects }} 3 | 53 | {{ end }} 54 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/nav.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 | 50 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/portfolio.html: -------------------------------------------------------------------------------- 1 |
2 | 29 |
30 | -------------------------------------------------------------------------------- /hugo/themes/creative/layouts/partials/services.html: -------------------------------------------------------------------------------- 1 | {{ "" | safeHTML }} 2 |
3 | {{ with .Site.Params.services.headline }} 4 |
5 |
6 |
7 |

{{ . }}

8 |
9 |
10 |
11 |
12 | {{ end }} 13 |
14 |
15 | {{ range .Site.Params.services.list }} 16 |
17 |
18 | 19 |

{{ .title }}

20 | {{ with .description }} 21 |

{{ . }}

22 | {{ end }} 23 |
24 |
25 | {{ end }} 26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /hugo/themes/creative/static/css/modals.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * The code below adds the modal functionality of the Freelancer Bootstrap Theme 3 | * and was originally part of this theme. 4 | * 5 | * 6 | * Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com) 7 | * Code licensed under the Apache License v2.0. 8 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 9 | */ 10 | 11 | body { 12 | overflow-x: hidden; 13 | } 14 | 15 | .img-centered { 16 | margin: 0 auto; 17 | } 18 | 19 | .portfolio-modal .modal-content { 20 | padding: 100px 0; 21 | min-height: 100%; 22 | border: 0; 23 | border-radius: 0; 24 | text-align: center; 25 | background-clip: border-box; 26 | -webkit-box-shadow: none; 27 | box-shadow: none; 28 | } 29 | 30 | .portfolio-modal .modal-content h2 { 31 | margin: 0; 32 | font-size: 3em; 33 | } 34 | 35 | .portfolio-modal .modal-content img { 36 | margin-bottom: 30px; 37 | } 38 | 39 | .portfolio-modal .modal-content .item-details { 40 | margin: 30px 0; 41 | } 42 | 43 | .portfolio-modal .close-modal { 44 | position: absolute; 45 | top: 25px; 46 | right: 25px; 47 | width: 75px; 48 | height: 75px; 49 | background-color: transparent; 50 | cursor: pointer; 51 | } 52 | 53 | .portfolio-modal .close-modal:hover { 54 | opacity: .3; 55 | } 56 | 57 | .portfolio-modal .close-modal .lr { 58 | z-index: 1051; 59 | width: 1px; 60 | height: 75px; 61 | margin-left: 35px; 62 | background-color: #2c3e50; 63 | -webkit-transform: rotate(45deg); 64 | -ms-transform: rotate(45deg); 65 | transform: rotate(45deg); 66 | } 67 | 68 | .portfolio-modal .close-modal .lr .rl { 69 | z-index: 1052; 70 | width: 1px; 71 | height: 75px; 72 | background-color: #2c3e50; 73 | -webkit-transform: rotate(90deg); 74 | -ms-transform: rotate(90deg); 75 | transform: rotate(90deg); 76 | } 77 | 78 | .portfolio-modal .modal-backdrop { 79 | display: none; 80 | opacity: 0; 81 | } 82 | -------------------------------------------------------------------------------- /hugo/themes/creative/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/favicon.ico -------------------------------------------------------------------------------- /hugo/themes/creative/static/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /hugo/themes/creative/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /hugo/themes/creative/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /hugo/themes/creative/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /hugo/themes/creative/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/header.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/marker.png -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/1.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/2.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/3.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/4.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/5.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/img/portfolio/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/hugo/themes/creative/static/img/portfolio/6.jpg -------------------------------------------------------------------------------- /hugo/themes/creative/static/js/cbpAnimatedHeader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cbpAnimatedHeader.js v1.0.0 3 | * http://www.codrops.com 4 | * 5 | * Licensed under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * Copyright 2013, Codrops 9 | * http://www.codrops.com 10 | */ 11 | var cbpAnimatedHeader = (function() { 12 | 13 | var docElem = document.documentElement, 14 | header = document.querySelector( '.navbar-default' ), 15 | didScroll = false, 16 | changeHeaderOn = 300; 17 | 18 | function init() { 19 | window.addEventListener( 'scroll', function( event ) { 20 | if( !didScroll ) { 21 | didScroll = true; 22 | setTimeout( scrollPage, 250 ); 23 | } 24 | }, false ); 25 | } 26 | 27 | function scrollPage() { 28 | var sy = scrollY(); 29 | if ( sy >= changeHeaderOn ) { 30 | classie.add( header, 'navbar-shrink' ); 31 | } 32 | else { 33 | classie.remove( header, 'navbar-shrink' ); 34 | } 35 | didScroll = false; 36 | } 37 | 38 | function scrollY() { 39 | return window.pageYOffset || docElem.scrollTop; 40 | } 41 | 42 | init(); 43 | 44 | })(); -------------------------------------------------------------------------------- /hugo/themes/creative/static/js/classie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * classie - class helper functions 3 | * from bonzo https://github.com/ded/bonzo 4 | * 5 | * classie.has( elem, 'my-class' ) -> true/false 6 | * classie.add( elem, 'my-new-class' ) 7 | * classie.remove( elem, 'my-unwanted-class' ) 8 | * classie.toggle( elem, 'my-class' ) 9 | */ 10 | 11 | /*jshint browser: true, strict: true, undef: true */ 12 | /*global define: false */ 13 | 14 | ( function( window ) { 15 | 16 | 'use strict'; 17 | 18 | // class helper functions from bonzo https://github.com/ded/bonzo 19 | 20 | function classReg( className ) { 21 | return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 22 | } 23 | 24 | // classList support for class management 25 | // altho to be fair, the api sucks because it won't accept multiple classes at once 26 | var hasClass, addClass, removeClass; 27 | 28 | if ( 'classList' in document.documentElement ) { 29 | hasClass = function( elem, c ) { 30 | return elem.classList.contains( c ); 31 | }; 32 | addClass = function( elem, c ) { 33 | elem.classList.add( c ); 34 | }; 35 | removeClass = function( elem, c ) { 36 | elem.classList.remove( c ); 37 | }; 38 | } 39 | else { 40 | hasClass = function( elem, c ) { 41 | return classReg( c ).test( elem.className ); 42 | }; 43 | addClass = function( elem, c ) { 44 | if ( !hasClass( elem, c ) ) { 45 | elem.className = elem.className + ' ' + c; 46 | } 47 | }; 48 | removeClass = function( elem, c ) { 49 | elem.className = elem.className.replace( classReg( c ), ' ' ); 50 | }; 51 | } 52 | 53 | function toggleClass( elem, c ) { 54 | var fn = hasClass( elem, c ) ? removeClass : addClass; 55 | fn( elem, c ); 56 | } 57 | 58 | var classie = { 59 | // full names 60 | hasClass: hasClass, 61 | addClass: addClass, 62 | removeClass: removeClass, 63 | toggleClass: toggleClass, 64 | // short names 65 | has: hasClass, 66 | add: addClass, 67 | remove: removeClass, 68 | toggle: toggleClass 69 | }; 70 | 71 | // transport 72 | if ( typeof define === 'function' && define.amd ) { 73 | // AMD 74 | define( classie ); 75 | } else { 76 | // browser global 77 | window.classie = classie; 78 | } 79 | 80 | })( window ); 81 | -------------------------------------------------------------------------------- /hugo/themes/creative/static/js/creative.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) 3 | * Code licensed under the Apache License v2.0. 4 | * For details, see http://www.apache.org/licenses/LICENSE-2.0. 5 | */ 6 | 7 | (function($) { 8 | "use strict"; // Start of use strict 9 | 10 | // jQuery for page scrolling feature - requires jQuery Easing plugin 11 | $('a.page-scroll').bind('click', function(event) { 12 | var $anchor = $(this); 13 | $('html, body').stop().animate({ 14 | scrollTop: ($($anchor.attr('href')).offset().top - 50) 15 | }, 1250, 'easeInOutExpo'); 16 | event.preventDefault(); 17 | }); 18 | 19 | // Highlight the top nav as scrolling occurs 20 | $('body').scrollspy({ 21 | target: '.navbar-fixed-top', 22 | offset: 51 23 | }) 24 | 25 | // Closes the Responsive Menu on Menu Item Click 26 | $('.navbar-collapse ul li a').click(function() { 27 | $('.navbar-toggle:visible').click(); 28 | }); 29 | 30 | // Fit Text Plugin for Main Header 31 | $("h1").fitText( 32 | 1.2, { 33 | minFontSize: '35px', 34 | maxFontSize: '65px' 35 | } 36 | ); 37 | 38 | // Offset for Main Navigation 39 | $('#mainNav').affix({ 40 | offset: { 41 | top: 100 42 | } 43 | }) 44 | 45 | // Initialize WOW.js Scrolling Animations 46 | new WOW().init(); 47 | 48 | })(jQuery); // End of use strict 49 | -------------------------------------------------------------------------------- /hugo/themes/creative/static/js/gmaps.init.js: -------------------------------------------------------------------------------- 1 | /* global GMaps: true */ 2 | 3 | $(document).ready(function () { 4 | map() 5 | }) 6 | 7 | function map () { 8 | if ($('#map').length) { 9 | var lat = $('#gmap-lat').val() 10 | var lng = $('#gmap-lng').val() 11 | var image = '/img/marker.png' 12 | 13 | var styles = 14 | [ 15 | { 16 | 'featureType': 'landscape', 'stylers': [{'saturation': -100}, {'lightness': 65}, {'visibility': 'on'}] 17 | }, { 18 | 'featureType': 'poi', 'stylers': [{'saturation': -100}, {'lightness': 51}, {'visibility': 'simplified'}] 19 | }, { 20 | 'featureType': 'road.highway', 'stylers': [{'saturation': -100}, {'visibility': 'simplified'}] 21 | }, { 22 | 'featureType': 'road.arterial', 'stylers': [{'saturation': -100}, {'lightness': 30}, {'visibility': 'on'}] 23 | }, { 24 | 'featureType': 'road.local', 'stylers': [{'saturation': -100}, {'lightness': 40}, {'visibility': 'on'}] 25 | }, { 26 | 'featureType': 'transit', 'stylers': [{'saturation': -100}, {'visibility': 'simplified'}] 27 | }, { 28 | 'featureType': 'administrative.province', 'stylers': [{'visibility': 'off'}] 29 | }, { 30 | 'featureType': 'water', 'elementType': 'labels', 'stylers': [{'visibility': 'on'}, {'lightness': -25}, {'saturation': -100}] 31 | }, { 32 | 'featureType': 'water', 'elementType': 'geometry', 'stylers': [{'hue': '#ffff00'}, {'lightness': -25}, {'saturation': -97}] 33 | } 34 | ] 35 | 36 | var map = new GMaps({ 37 | el: '#map', 38 | lat: lat, 39 | lng: lng, 40 | zoomControl: true, 41 | zoomControlOpt: { 42 | style: 'SMALL', 43 | position: 'TOP_LEFT' 44 | }, 45 | panControl: false, 46 | streetViewControl: false, 47 | mapTypeControl: false, 48 | overviewMapControl: false, 49 | scrollwheel: false, 50 | draggable: false, 51 | styles: styles 52 | }) 53 | 54 | map.addMarker({ 55 | lat: lat, 56 | lng: lng, 57 | icon: image /* , 58 | title: '', 59 | infoWindow: { 60 | content: '

HTML Content

' 61 | } */ 62 | }) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /hugo/themes/creative/static/js/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - EASING EQUATIONS 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2001 Robert Penner 12 | * All rights reserved. 13 | * 14 | * TERMS OF USE - jQuery Easing 15 | * 16 | * Open source under the BSD License. 17 | * 18 | * Copyright © 2008 George McGinley Smith 19 | * All rights reserved. 20 | * 21 | * Redistribution and use in source and binary forms, with or without modification, 22 | * are permitted provided that the following conditions are met: 23 | * 24 | * Redistributions of source code must retain the above copyright notice, this list of 25 | * conditions and the following disclaimer. 26 | * Redistributions in binary form must reproduce the above copyright notice, this list 27 | * of conditions and the following disclaimer in the documentation and/or other materials 28 | * provided with the distribution. 29 | * 30 | * Neither the name of the author nor the names of contributors may be used to endorse 31 | * or promote products derived from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 34 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 35 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 36 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 37 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 39 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 41 | * OF THE POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | */ 44 | jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(gb;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); -------------------------------------------------------------------------------- /hugo/themes/creative/theme.toml: -------------------------------------------------------------------------------- 1 | name = "Creative" 2 | license = "Apache License 2.0" 3 | licenselink = "//github.com/digitalcraftsman/hugo-creative-theme/blob/master/LICENSE" 4 | description = "A one page HTML theme for creatives." 5 | homepage = "//github.com/digitalcraftsman/hugo-creative-theme" 6 | tags = ["creative", "portfolio"] 7 | features = ["responsive", "portfolio", "substitutable strings"] 8 | min_version = 0.14 9 | 10 | [author] 11 | name = "digitalcraftsman" 12 | homepage = "//github.com/digitalcraftsman" 13 | 14 | # If porting an existing theme 15 | [original] 16 | name = "David Miller" 17 | homepage = "//www.ironsummitmedia.com/" 18 | repo = "//github.com/IronSummitMedia/startbootstrap-creative" 19 | -------------------------------------------------------------------------------- /lib/models.js: -------------------------------------------------------------------------------- 1 | var Sequelize = require('sequelize'); 2 | var base64Img = require('base64-img'); 3 | var config = require('config'); 4 | var sequelize = new Sequelize(config.Database.uri, {logging: config.Database.logging}); 5 | 6 | 7 | var Image = sequelize.define('image', { 8 | id: {type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true}, 9 | hash: Sequelize.STRING(32), 10 | count: {type: Sequelize.INTEGER, defaultValue: 0}, 11 | url: Sequelize.STRING, 12 | filename: {type: Sequelize.STRING(42), unique: true}, 13 | date: {type: Sequelize.DATE, defaultValue: Sequelize.NOW}, 14 | nsfw: {type: Sequelize.INTEGER} 15 | },{ 16 | instanceMethods: { 17 | b64: function() { 18 | return base64Img.base64Sync(config.AppServer.images + '/' + this.filename); 19 | } 20 | } 21 | }) 22 | 23 | var Account = sequelize.define('account', { 24 | id: {type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true}, 25 | username: Sequelize.STRING, 26 | password: Sequelize.STRING, 27 | information: Sequelize.STRING, 28 | protocol: Sequelize.STRING, 29 | parser: Sequelize.STRING, 30 | dns: Sequelize.STRING 31 | }) 32 | 33 | var Stat = sequelize.define('stat', { 34 | id: {type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true}, 35 | date: {type: Sequelize.DATE, defaultValue: Sequelize.NOW}, 36 | count: {type: Sequelize.INTEGER, defaultValue: 0}, 37 | transport: Sequelize.STRING 38 | }) 39 | 40 | var Host = sequelize.define('host', { 41 | name: {type: Sequelize.STRING, unique: true, primaryKey: true}, 42 | date: {type: Sequelize.DATE, defaultValue: Sequelize.NOW}, 43 | count: {type: Sequelize.INTEGER, defaultValue: 0} 44 | }) 45 | 46 | 47 | Image.sync(); 48 | Account.sync(); 49 | Stat.sync(); 50 | Host.sync(); 51 | 52 | 53 | module.exports = { 54 | Account: Account, 55 | Image: Image, 56 | Stat: Stat, 57 | Host: Host, 58 | sequelize: sequelize 59 | } -------------------------------------------------------------------------------- /lib/parsers/driftnet.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var config = require('config'); 3 | var db = require('../models'); 4 | var httpreq = require('httpreq'); 5 | var md5File = require('md5'); 6 | var mv = require('mv'); 7 | var fs = require('fs'); 8 | var io = require('../web').io; 9 | 10 | function driftnetParser() { 11 | // If the temporary path doesn't exist, then lets create it. 12 | if (!fs.existsSync(config.Monitoring.Driftnet.tmp)) { 13 | fs.mkdirSync(config.Monitoring.Driftnet.tmp); 14 | } 15 | 16 | function updateImage(image) { 17 | // As an attempt to make sure that the front-end isn't 18 | // getting spammed with the same image over and over, 19 | // we will only update the date timestamp (which in 20 | // turn will allow it to be refreshed on the webui) 21 | // if we haven't seen the image for 10 seconds. 22 | if ((new Date().getTime() - image.date.getTime()) >= 1000) { 23 | image.date = new Date(); 24 | image.count += 1; 25 | io.emit('images', image); 26 | console.log('Driftnet: ' + image.filename + ' updated!') 27 | } 28 | image.save(); 29 | } 30 | 31 | // Returns a new driftnet child to work from. 32 | function run() { 33 | var child = spawn('driftnet', ['-a', '-i', config.Monitoring.interface, 34 | '-d', config.Monitoring.Driftnet.tmp]); 35 | console.log('Driftnet: Started child thread') 36 | 37 | // When driftnet outputs data to standard output, we want to capture that 38 | // data, interpret it, and hand it off to the database. 39 | child.stdout.on('data', function(data) { 40 | 41 | // First thing we went to do is strip out the line endings 42 | // from the output. 43 | var filenames = data.toString().split('\n'); 44 | //var filenames = data.toString().replace(/(\r\n|\n|\r)/gm, ''); 45 | 46 | // Next we will attempt to open the file that driftnet 47 | // output the location to. 48 | filenames.forEach(function (filename){ 49 | //var filename = filenames[f]; 50 | if (filename.length > 4){ 51 | //console.log('Driftnet: found ' + filename); 52 | fs.readFile(filename, function(e, data) { 53 | if(e) {console.log('Driftnet: ' + e)} else { 54 | // If the file opened correctly, then we will compute 55 | // an md5 hash. The ext regex is designed to get the 56 | // file extension from the filename. 57 | var hash = md5File(data); 58 | var ext = /(?:\.([^.]+))?$/.exec(filename)[1]; 59 | if (ext == 'jpeg') { 60 | ext = 'jpg'; 61 | } 62 | if (ext == 'tiff') { 63 | ext = 'tif'; 64 | } 65 | var new_filename = hash + '.' + ext; 66 | 67 | // Next we will attempt to move the file to its new home. 68 | // If the file already exists, then the move will fail. 69 | mv(filename, config.AppServer.images + '/' + new_filename, 70 | {clobber: false}, function(err){ 71 | if (err && err.code != 'EEXIST'){ 72 | console.log('Driftnet: attempt to move ' + filename + ' failed. ' + err); 73 | fs.unlink(filename, function(err){}); 74 | } else { 75 | if (err) { 76 | //console.log('Driftnet: ' + hash + ' already exists, so removing duplicate.') 77 | fs.unlink(filename, function(err){}); 78 | } 79 | // Now lets query the database and see if an image exists 80 | // with the same md5sum as what we computed. If there is 81 | // an existing image, then we'll increment the counter and 82 | // update the date timestamp. If one doesn't exist, then 83 | // we will create a new image with the information we have. 84 | db.Image.findOrCreate({where: {hash: hash}, 85 | defaults: { 86 | type: ext, 87 | filename: new_filename, 88 | url: 'DRIFTNET', 89 | count: 1 90 | } 91 | }).spread(function(image, created) { 92 | if (created && config.Monitoring.Driftnet.nsfw_filter) { 93 | httpreq.post(config.NSFW.address + '/score', { 94 | parameters: { 95 | path: 'file:///images/' + image.filename 96 | } 97 | }, function(err, res) { 98 | if (err) { 99 | console.log('Driftnet: ' + err); 100 | } else { 101 | if (res.statusCode == 200){ 102 | data = JSON.parse(res.body) 103 | if (!data['error']){ 104 | image.updateAttributes({ 105 | nsfw: data['score'] 106 | }).then(function(result) { 107 | console.log('Driftnet: ' + image.filename + ' created from ' + image.url + ' with nsfw score of ' + image.nsfw) 108 | io.emit('images', image) 109 | }) 110 | } else { 111 | console.log('Driftnet: Scoring engine errored on ' + image.filename) 112 | io.emit('images', image) 113 | } 114 | } else { 115 | console.log('Driftnet: Scoring engine 500d on ' + image.filename) 116 | io.emit('images', image) 117 | } 118 | } 119 | }) 120 | } else if (created) { 121 | console.log('Driftnet: ' + image.filename + ' created from ' + image.url) 122 | io.emit('images', image) 123 | } else { 124 | updateImage(image); 125 | } 126 | }) 127 | } 128 | }) 129 | } 130 | }); 131 | } 132 | }); 133 | }) 134 | 135 | child.stderr.on('data', function(data) { 136 | console.log('Driftnet: (stderr)' + data.toString().replace(/(\r\n|\n|\r)/gm, '')); 137 | }) 138 | 139 | // If driftnet exists for some reason, log the event to the console 140 | // and then initiate a new instance to work from. 141 | child.on('close', function(code) { 142 | console.log('Driftnet child terminated with code ' + code); 143 | child = run() 144 | }) 145 | 146 | child.on('error', function(error) { 147 | console.log('Driftnet: Failed to start process'); 148 | }) 149 | } 150 | // Lets get this baby started! 151 | var child = run(); 152 | } 153 | 154 | module.exports = { parser: driftnetParser } -------------------------------------------------------------------------------- /lib/parsers/dsniff.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var config = require('config'); 3 | var Stat = require('../models').Stat; 4 | var parseXML = require('xml2js').parseString; 5 | //var io = require('../web').io; 6 | 7 | function dsniffParser() { 8 | 9 | function run() { 10 | console.log('Dsniff: Instantiating dsniff process.') 11 | 12 | var child = spawn('dsniff -i ' + config.Monitoring.interface, [], {shell: '/bin/bash'} 13 | ); 14 | 15 | // When driftnet outputs data to standard output, we want to capture that 16 | // data, interpret it, and hand it off to the database. 17 | child.stdout.on('data', function(data) { 18 | console.log('DSniff: (stdout): ' + data.toString()); 19 | }) 20 | 21 | child.stderr.on('data', function(data) { 22 | console.log('DSniff: (stderr): ' + data.toString().replace(/(\r\n|\n|\r)/gm, ' ')); 23 | }) 24 | 25 | // If driftnet exists for some reason, log the event to the console 26 | // and then initiate a new instance to work from. 27 | child.on('close', function(code) { 28 | console.log('DSniff: child terminated with code ' + code); 29 | child = run() 30 | }) 31 | 32 | child.on('error', function(error) { 33 | console.log('DSniff: Failed to start process'); 34 | }) 35 | } 36 | 37 | // Lets get this baby started! 38 | var child = run(); 39 | } 40 | 41 | dsniffParser(); 42 | 43 | module.exports = { parser: dsniffParser} -------------------------------------------------------------------------------- /lib/parsers/ettercap.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var config = require('config'); 3 | var Account = require('../models').Account; 4 | var url = require('url'); 5 | var io = require('../web').io; 6 | 7 | function ettercapParser() { 8 | 9 | function run() { 10 | console.log('Ettercap: Instantiating dsniff process.') 11 | 12 | var child = spawn('ettercap -Tzuqi ' + config.Monitoring.interface, [], {shell: '/bin/bash'}); 13 | 14 | // Ettercap data capture... 15 | child.stdout.on('data', function(data) { 16 | // When we get new standard output, we want to check it against a couple of 17 | // regex patterns. 18 | var rdata = /USER: (.+?) PASS: (.+?) INFO: (.*)/gm 19 | var rproto = /^(.+?) :/gm 20 | var raw = rdata.exec(data.toString()); 21 | var proto = rproto.exec(data.toString()); 22 | 23 | // If both regex patterns yeidl useful data, then we will attempt to parse 24 | // the data into what we are looking for. 25 | if (raw && proto) { 26 | var username = raw[1]; 27 | var password = raw[2].slice(0,3) + Array(raw[2].length - 2).join('*'); 28 | var information = raw[3]; 29 | var protocol = proto[1]; 30 | var dns = url.parse(raw[3]).hostname; 31 | 32 | // Next we will search the database to see if we have seen this specific 33 | // account information before. If we havent, then we will create a 34 | // new database object with the information we discovered and then inform 35 | // the WebUI of the new data. 36 | Account.findOne({ 37 | where: { 38 | username: username, 39 | password: password, 40 | information: information, 41 | protocol: protocol 42 | } 43 | }).then(function(err, result) { 44 | if (!(result)) { 45 | Account.create({ 46 | username: username, 47 | password: password, 48 | information: information, 49 | parser: 'ettercap', 50 | protocol: protocol, 51 | dns: dns 52 | }); 53 | console.log('Ettercap: Added ' + username + ':' + password + ' account'); 54 | io.emit('accounts', { 55 | username: username, 56 | password: password, 57 | information: information, 58 | parser: 'ettercap', 59 | protocol: protocol, 60 | dns: dns 61 | }); 62 | } 63 | }); 64 | } 65 | }) 66 | 67 | child.stderr.on('data', function(data) { 68 | console.log('Ettercap: (stderr): ' + data.toString().replace(/(\r\n|\n|\r)/gm, ' ')); 69 | }) 70 | 71 | // If driftnet exists for some reason, log the event to the console 72 | // and then initiate a new instance to work from. 73 | child.on('close', function(code) { 74 | console.log('Ettercap: child terminated with code ' + code); 75 | child = run() 76 | }) 77 | 78 | child.on('error', function(error) { 79 | console.log('Ettercap: Failed to start process'); 80 | }) 81 | } 82 | 83 | // Lets get this baby started! 84 | var child = run(); 85 | } 86 | 87 | 88 | module.exports = { parser: ettercapParser} -------------------------------------------------------------------------------- /lib/parsers/index.js: -------------------------------------------------------------------------------- 1 | var config = require('config'); 2 | var driftnet = require('./driftnet').parser; 3 | var tshark = require('./tshark').parser; 4 | var ngrep = require('./ngrep').parser; 5 | var pvs = require('./pvs').parser; 6 | var ettercap = require('./ettercap').parser; 7 | 8 | // For each parser, if autostart is set to true in the config 9 | // file, then we will want to fire that parser up. 10 | if (config.Monitoring.Driftnet.autostart) { driftnet(); } 11 | if (config.Monitoring.NGrep.autostart) { ngrep(); } 12 | if (config.Monitoring.TShark.autostart) { tshark(); } 13 | if (config.Monitoring.PVS.autostart) { pvs(); } 14 | if (config.Monitoring.Ettercap.autostart) { ettercap(); } 15 | -------------------------------------------------------------------------------- /lib/parsers/ngrep.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var config = require('config'); 3 | var httpreq = require('httpreq'); 4 | var db = require('../models'); 5 | var md5 = require('md5'); 6 | var fs = require('fs'); 7 | var io = require('../web').io; 8 | 9 | function ngrepParser() { 10 | function updateImage(image, url) { 11 | // As an attempt to make sure that the front-end isn't 12 | // getting spammed with the same image over and over, 13 | // we will only update the date timestamp (which in 14 | // turn will allow it to be refreshed on the webui) 15 | // if we haven't seen the image for 10 seconds. 16 | if ((new Date().getTime() - image.date.getTime()) >= 1000) { 17 | image.date = new Date(); 18 | image.count += 1; 19 | io.emit('images', image); 20 | console.log('NGrep: ' + image.filename + ' updated!') 21 | } 22 | if (!image.url){ 23 | image.url = url; 24 | } 25 | image.save(); 26 | } 27 | 28 | function run() { 29 | // These are the image extensions we will be looking for 30 | var imageExtensions = [ 31 | 'gif', 'jpg', 'jpeg', 'png', 'svg', 'bmp', 'tif', 'tiff', 'pdf' 32 | ]; 33 | 34 | console.log('NGrep: Instantiating ngrep process.') 35 | 36 | // This is the command to monitor port 80 and get the header information 37 | // for every HTTP call thats being made. 38 | var child = spawn('ngrep -d ' + config.Monitoring.interface + 39 | ' -W byline -qilw \'get\' tcp dst port 80', [], {shell: '/bin/bash'} 40 | ); 41 | 42 | // When ngrep outputs data to standard output, we want to capture that 43 | // data, interpret it, and hand it off to the database. 44 | child.stdout.on('data', function(data) { 45 | var entry = data.toString(); 46 | 47 | // The two peices of information that we want to pull out of the header 48 | // data are as follows: The DNS address and the URL path. 49 | var host = /Host\: (.*)\./gm.exec(entry); 50 | var path = /GET (.*) HTTP/gm.exec(entry); 51 | 52 | // The only reason to continue further is if we were able to properly 53 | // extract both a valid host and a path. 54 | if (path && host) { 55 | // Lets next try to reconstruct the URL and the file extension 56 | // from the information we have on hand. 57 | var url = ('http://' + host[1] + path[1]); 58 | var url_nq = ('http://' + host[1] + path[1].split('?').shift()); 59 | var ext = /(?:\.([^.]+))?$/.exec(path[1].split('?').shift())[1]; 60 | 61 | if (ext == 'jpeg') { 62 | ext = 'jpg'; 63 | } 64 | if (ext == 'tiff') { 65 | ext = 'tif'; 66 | } 67 | 68 | // If we were able to extract the file extension from the path, 69 | // then we will want to do some basic normalization to the extension 70 | if (ext) { 71 | ext = ext.toLowerCase(); 72 | if (imageExtensions.indexOf(ext) > -1) { 73 | // If the extension is a valid image extension, then we will 74 | // want to query the database to see if we have seen that 75 | // URL path used before. If we have, then we will just 76 | // increment the date timestamp and the counter. 77 | db.Image.findOne({where: {url: url_nq}}).then(function(image){ 78 | if (image) { 79 | updateImage(image, url_nq); 80 | } else { 81 | // As we havent seen the image in the database, we will 82 | // then download the file, compute the MD5 hash, then 83 | // store the file with the MD5 hash as the filename. 84 | httpreq.get(url, {binary: true}, function(err, res){ 85 | if (err) { 86 | console.log('NGrep: download error - ' + err); 87 | } else { 88 | var hash = md5(res.body); 89 | var filename = hash + '.' + ext; 90 | // Attempt to write the file... 91 | fs.writeFile(config.AppServer.images + '/' + filename, res.body, function(err) { 92 | if (err) { 93 | console.log('NGrep: file save error - ' + err); 94 | } else { 95 | // Creating a new image object and inserting it into the database... 96 | db.Image.findOrCreate({where: {hash: hash}, 97 | defaults: { 98 | hash: hash, 99 | filename: filename, 100 | url: url_nq, 101 | count: 1 102 | } 103 | }).spread(function(image, created){ 104 | if (created && config.Monitoring.NGrep.nsfw_filter) { 105 | httpreq.post(config.NSFW.address + '/score', { 106 | parameters: { 107 | path: 'file:///images/' + filename 108 | } 109 | }, function(err, res) { 110 | if (err) { 111 | console.log('NGrep: ' + err); 112 | } else { 113 | if (res.statusCode == 200){ 114 | data = JSON.parse(res.body) 115 | if (!data['error']){ 116 | image.updateAttributes({ 117 | nsfw: data['score'] 118 | }).then(function(result) { 119 | console.log('NGrep: ' + image.filename + ' created from ' + image.url + ' with nsfw score of ' + image.nsfw) 120 | io.emit('images', image) 121 | }) 122 | } else { 123 | console.log('NGrep: Scoring engine errored on ' + image.filename + ' created from ' + image.url) 124 | io.emit('images', image) 125 | } 126 | } else { 127 | console.log('NGrep: Scoring engine 500d on ' + image.filename + ' created from ' + image.url) 128 | io.emit('images', image) 129 | } 130 | } 131 | }) 132 | } else if (created) { 133 | console.log('NGrep: ' + image.filename + ' created from ' + image.url) 134 | io.emit('images', image) 135 | } else { 136 | updateImage(image, url_nq); 137 | } 138 | }) 139 | } 140 | }) 141 | } 142 | }) 143 | } 144 | }) 145 | } 146 | } 147 | } 148 | }) 149 | 150 | child.stderr.on('data', function(data) { 151 | console.log('NGrep: (stderr): ' + data.toString().replace(/(\r\n|\n|\r)/gm, ' ')); 152 | }) 153 | 154 | // If ngrep exits for some reason, log the event to the console 155 | // and then initiate a new instance to work from. 156 | child.on('close', function(code) { 157 | console.log('NGrep: child terminated with code ' + code); 158 | child = run() 159 | }) 160 | 161 | child.on('error', function(error) { 162 | console.log('NGrep: Failed to start process'); 163 | }) 164 | } 165 | 166 | // Lets get this baby started! 167 | var child = run(); 168 | } 169 | 170 | module.exports = { parser: ngrepParser} -------------------------------------------------------------------------------- /lib/parsers/pvs.js: -------------------------------------------------------------------------------- 1 | var config = require('config'); 2 | var httpreq = require('httpreq'); 3 | var web = require('../web'); 4 | 5 | function pvsParser() { 6 | // As the PVS os most likely using a self-signed certificate, we will 7 | // need to make sure we turn off Node's default behavior to check 8 | // the certificate validity. 9 | process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; 10 | 11 | // All of the functions will be leveraging the host variable, which 12 | // is derrived from the configuration settings. 13 | var host = 'https://' + config.Monitoring.PVS.hostname + ':8835'; 14 | 15 | function pvsData() { 16 | var token = null; 17 | // Initiate the login to the PVS API. 18 | httpreq.post(host + '/login', { 19 | parameters: { 20 | login: config.Monitoring.PVS.username, 21 | password: config.Monitoring.PVS.password, 22 | json: 1 23 | } 24 | }, function(err, res) { 25 | if (err) { 26 | console.log('PVS: ' + err); 27 | } else { 28 | // As it appears that we were able to login, lets to ahead 29 | // and set the token variable. 30 | var data = JSON.parse(res.body); 31 | token = data['reply']['contents']['token']; 32 | 33 | // Here what we'll be interfacing to is the top hosts 34 | // dashboard item. Since the New PVS WebUI has formatted 35 | // most of the data all pretty for us already, we just 36 | // need to reformat it for our uses. 37 | httpreq.post(host + '/chart/data', { 38 | parameters: { 39 | chart_id: 1, // Chart 1 is the top hosts chart. 40 | start_time: -1, 41 | end_time: -1, 42 | json: 1, 43 | token: token 44 | } 45 | }, function(err, res) { 46 | if (err) { 47 | console.log('PVS: ' + err); 48 | } else { 49 | // Lets parse the JSON returned and put the data into 50 | // the hostCache variable and emit the information to 51 | // the WebUI. 52 | var data = JSON.parse(res.body); 53 | var raw = data['reply']['contents']['chart_data']; 54 | 55 | // The cooked variable will be storing our new dictionary 56 | // array. The max variable is storing the maximum number 57 | // of vulnerabilities we have seen on a given host. This 58 | // saves us having to compute this on the front-end. 59 | var cooked = []; 60 | var max = 0; 61 | var count = 0; 62 | for (var h in raw) { 63 | count++; 64 | if (count <= 5) { 65 | // First we pull the severity summaries and remove the 66 | // informationals. 67 | var sevs = raw[h]['data']; 68 | sevs.pop(); 69 | 70 | // Next we will compute the total and compare that against 71 | // the max counter. If our current counter is greater than 72 | // the max we have be storing, then we will replace the max 73 | // with the current counter. 74 | var sevcount = sevs.reduce(function(a, b) {return a + b}, 0); 75 | if (sevcount > max) {max = sevcount} 76 | 77 | // Add the newly cooked info into the array. 78 | cooked.push({ 79 | host: h, 80 | crit: sevs[0], 81 | high: sevs[1], 82 | med: sevs[2], 83 | low: sevs[3] 84 | 85 | }); 86 | } 87 | } 88 | var fullyCooked = {max: max, hosts: cooked}; 89 | web.hostCache(fullyCooked); 90 | console.log('PVS: Updated Top Vulnerable Hosts Cache'); 91 | web.io.emit('vulnHosts', fullyCooked); 92 | 93 | // Here what we'll be interfacing to is the top vulns 94 | // dashboard item. Since the New PVS WebUI has formatted 95 | // most of the data all pretty for us already, we just 96 | // need to reformat it for our uses. 97 | httpreq.post(host + '/chart/data', { 98 | parameters: { 99 | chart_id: 2, // Chart 2 is the top vulns chart. 100 | start_time: -1, 101 | end_time: -1, 102 | json: 1, 103 | token: token 104 | } 105 | }, function(err, res) { 106 | if (err) { 107 | console.log('PVS: ' + err); 108 | } else { 109 | // Lets parse the JSON returned and put the data into 110 | // the hostCache variable and emit the information to 111 | // the WebUI. 112 | var data = JSON.parse(res.body); 113 | var raw = data['reply']['contents']['chart_data'] 114 | var cooked = []; 115 | var count = 0; 116 | for (var vuln in raw) { 117 | count++ 118 | if (count <= 5) { 119 | cooked.push({ 120 | name: vuln, 121 | pluginId: raw[vuln]['id'], 122 | count: raw[vuln]['data'][0], 123 | severity: raw[vuln]['severity'] 124 | }); 125 | } 126 | } 127 | web.vulnCache(cooked); 128 | console.log('PVS: Updated Top Vulnerabilities Cache'); 129 | web.io.emit('topVulns', cooked); 130 | 131 | // Initiate a logout from the API. We need to make sure to do 132 | // this so that we don't keep sessions running to time out 133 | httpreq.post(host + '/logout', {parameters: {json: 1, token: token}}) 134 | } 135 | }) 136 | } 137 | }) 138 | } 139 | }); 140 | return token; 141 | } 142 | 143 | // Now as the PVS parser is purely API work, we will simply be running 144 | // over the appropriate API commands every 60 seconds. 145 | pvsData(); 146 | setInterval(pvsData, 60000); 147 | } 148 | 149 | module.exports = { 150 | parser: pvsParser 151 | } -------------------------------------------------------------------------------- /lib/parsers/tshark.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var config = require('config'); 3 | var Stat = require('../models').Stat; 4 | var parseXML = require('xml2js').parseString; 5 | var io = require('../web').io; 6 | 7 | function tsharkParser() { 8 | var transports = {}; // Transport array for maintaining protocol counts. 9 | 10 | // As the transports array is keeping state of the current packet counts 11 | // for the various transports we have seen, we need to be able to schedule 12 | // routine checkpointing of the data and commiting that information to the 13 | // database. We will run the checkpoiting every 60 seconds. 14 | setInterval(function() { 15 | // As we are checkpointing every minute, we want to make sure that the 16 | // data is represented on a minute-by-minute basis, and not with a 17 | // higher fidelity than that. So what we are doing here is creating the 18 | // ts variable with a date fidelity equal to the current minute. 19 | var d = new Date(); 20 | var ts = new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), 0); 21 | 22 | // The next thing we need to do is copy the transports array and then 23 | // clear out the existing counters. 24 | var items = transports; 25 | transports = {}; 26 | console.log('TShark: Initiating Checkpoint for ' + ts); 27 | 28 | // Now we need to iterate through all of the keys in the array and 29 | // create a new database entry for each one. 30 | for (var key in items){ 31 | // console.log('TShark: Checkpointing ' + key + ' at ' + items[key]) 32 | Stat.create({ 33 | transport: key, 34 | count: items[key], 35 | date: ts 36 | }); 37 | } 38 | io.emit('protocols', 'refresh'); 39 | }, 60000); // 60 second timer. 40 | 41 | // 42 | function run() { 43 | var skip = true; // The line skipping flag. Set to true until we encounter a packet. 44 | var raw_packet = ''; // The raw packet string. XML assembly happens on this variable. 45 | 46 | console.log('TShark: Instantiating tshark process.') 47 | 48 | // Yes this is a nasty looking spawn command. Unfortunately because of how 49 | // TShark want to write to disk, we need to route the network information 50 | // into tshark through dumpcap by piping all of this madness together. There 51 | // is an interesting chain of bugs I have filed with the wireshark devs based 52 | // on trying to figure all of this out: 53 | // https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9533 54 | // 55 | var child = spawn('dumpcap -i ' + config.Monitoring.interface + 56 | ' -P -w - | tshark -T psml -PS -l -r -', [], {shell: '/bin/bash'} 57 | ); 58 | 59 | // When driftnet outputs data to standard output, we want to capture that 60 | // data, interpret it, and hand it off to the database. 61 | child.stdout.on('data', function(data) { 62 | 63 | // As Tshark is generating enough output to cause Node.js to buffer 64 | // the output, we want to make sure that we are parsing through the 65 | // line-by-line and reconstructing complete packet definitions. So 66 | // we will split the output buffer based on carriage returns and 67 | // interact with each line. 68 | var lines = data.toString().split('\n'); 69 | for (var i in lines) { 70 | 71 | // The first several lines output from TShark include the XML 72 | // definition and the schema for the PSML specification. As 73 | // these lines are not important to use, we will want to simply 74 | // ignore them. I'm using a rudimentary skip flag that is set 75 | // to true until we see a flag in the stream. 76 | if (skip) { 77 | if (lines[i].indexOf('') > -1){ 78 | skip = false; 79 | console.log('TShark: Starting to process packet data.') 80 | } 81 | } 82 | if (!(skip)) { 83 | raw_packet = raw_packet.concat(lines[i]) 84 | 85 | // New we need to see if the raw_packet is complete. If it is, then 86 | // we will need to parse the raw_packet and attempt to marry it to 87 | // the data we have on hand. 88 | if (lines[i].indexOf('') > -1) { 89 | var pkt = raw_packet; 90 | raw_packet = '' 91 | parseXML(pkt, function(err, packet) { 92 | // The PSML specification is as such: 93 | // 94 | // 95 | //
N.
96 | //
Time
97 | //
Link Layer
98 | //
Network
99 | //
Transport
100 | //
Application
101 | //
(OPTIONAL) Other Information
102 | //
103 | // 104 | // What we are looking for is the transport protocol, which 105 | // is the 5th section in the PSML spec. We will take that 106 | // peice of information and then keep track fo the number of 107 | // packets we see with that transport. 108 | var transport = packet.packet.section[4]; 109 | if (!(transport in transports)) { 110 | transports[transport] = 0; 111 | } 112 | transports[transport] += 1; 113 | //console.log('TShark: ' + transport + '++') 114 | }); 115 | } 116 | } 117 | } 118 | }) 119 | 120 | child.stderr.on('data', function(data) { 121 | // What we are looking to do here is strip out the packet counters from entering 122 | // the console log. We still want all other standard error entries to hit the 123 | // console log however, so a simple regex check to filter out the spammy data 124 | // should be all we need. 125 | var repkt = /Packets: (\d+)/g; 126 | if (!(repkt.exec(data.toString()))){ 127 | console.log('TShark: (stderr): ' + data.toString().replace(/(\r\n|\n|\r)/gm, ' ')); 128 | } 129 | }) 130 | 131 | // If driftnet exists for some reason, log the event to the console 132 | // and then initiate a new instance to work from. 133 | child.on('close', function(code) { 134 | console.log('TShark: child terminated with code ' + code); 135 | child = run() 136 | }) 137 | 138 | child.on('error', function(error) { 139 | console.log('TShark: Failed to start process'); 140 | }) 141 | } 142 | 143 | // Lets get this baby started! 144 | var child = run(); 145 | } 146 | 147 | module.exports = { parser: tsharkParser} 148 | -------------------------------------------------------------------------------- /lib/web.js: -------------------------------------------------------------------------------- 1 | var config = require('config'); 2 | var express = require('express'); 3 | var app = express(); 4 | var http = require('http').Server(app); 5 | var io = require('socket.io')(http); 6 | var db = require('./models'); 7 | var async = require('async'); 8 | var vulnCache = null; 9 | var hostCache = null; 10 | 11 | 12 | app.set('view engine', 'jade'); 13 | app.use('/static', express.static(config.AppServer.static)); 14 | app.use('/images/file', express.static(config.AppServer.images)); 15 | 16 | 17 | // A simple function to subtract 18 | Date.prototype.rmHours = function(h) { 19 | this.setTime(this.getTime() - (h*60*60*1000)); 20 | return this; 21 | } 22 | 23 | 24 | app.get('/', function(req, res) { 25 | res.render('index', { 26 | version: '5.0a1', 27 | title: config.WebUI.title, 28 | slogan: config.WebUI.slogan 29 | }); 30 | }) 31 | 32 | 33 | app.get('/report', function(req, res) { 34 | res.render('report', { 35 | version: '5.0a1', 36 | title: config.WebUI.title, 37 | slogan: config.WebUI.slogan 38 | }); 39 | }) 40 | 41 | 42 | app.get('/images/list', function(req, res) { 43 | db.Image.findAll({ 44 | order: 'date DESC', 45 | limit: 200, 46 | raw: true, 47 | }).then(function(images) { 48 | res.json(images.reverse()); 49 | }) 50 | }) 51 | 52 | 53 | app.get('/images/common', function(req, res) { 54 | db.Image.findAll({ 55 | order: 'count DESC', 56 | limit: 100, 57 | raw: true 58 | }).then(function(images) { 59 | res.json(images.reverse()); 60 | }) 61 | }) 62 | 63 | 64 | app.get('/accounts/list', function(req, res){ 65 | db.Account.findAll().then(function(accounts) { 66 | res.json(accounts); 67 | }) 68 | }) 69 | 70 | 71 | app.get('/vulns/hosts', function(req, res) {res.json(hostCache);}); 72 | app.get('/vulns/vulns', function(req, res) {res.json(vulnCache);}); 73 | 74 | 75 | app.get('/stats/protocols/:limit', function(req, res) { 76 | db.Stat.findAll({ 77 | attributes: ['transport'], 78 | order: [[db.sequelize.fn('COUNT', db.sequelize.col('count')), 'DESC']], 79 | limit: parseInt(req.params.limit), 80 | group: ['transport'] 81 | }).then(function(protos){ 82 | var dLimit = new Date(); 83 | dLimit = dLimit.rmHours(8); 84 | 85 | var protocols = [] 86 | async.each(protos, function (proto, next) { 87 | db.Stat.findAll({ 88 | where: { 89 | date: {gte: dLimit}, 90 | transport: proto.transport, 91 | } 92 | }).then(function(results) { 93 | var d = []; 94 | for (var a in results) { 95 | d.push([results[a].date.getTime(), results[a].count]); 96 | } 97 | 98 | protocols.push({ 99 | label: proto.transport, 100 | data: d 101 | }) 102 | 103 | next() 104 | }) 105 | }, function (error) { 106 | res.json(protocols); 107 | }) 108 | }) 109 | }) 110 | 111 | 112 | app.get('/report', function(req, res) { 113 | db.Image.findAll({ 114 | order: ['count', 'DESC'], 115 | limit: 100 116 | }).then(function(images){ 117 | 118 | }) 119 | }) 120 | 121 | 122 | http.listen(config.AppServer.port, function(){ 123 | console.log('Application Web Server is listening on *:' + config.AppServer.port); 124 | }) 125 | 126 | 127 | module.exports = { 128 | io: io, 129 | vulnCache: function(data) {vulnCache = data;}, 130 | hostCache: function(data) {hostCache = data;} 131 | } -------------------------------------------------------------------------------- /nsfw_container/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM bvlc/caffe:cpu 2 | 3 | COPY nsfw /opt/nsfw/ 4 | RUN mkdir /images 5 | RUN pip install -r /opt/nsfw/requirements.txt 6 | 7 | EXPOSE 8080 8 | 9 | CMD python /opt/nsfw/nsfw.py -------------------------------------------------------------------------------- /nsfw_container/nsfw/config.py: -------------------------------------------------------------------------------- 1 | CAFFE_MODEL_DEFINITIONS = '/opt/nsfw/deploy.prototxt' 2 | CAFFE_PRETRAINING = '/opt/nsfw/resnet_50_1by2_nsfw.caffemodel' 3 | CAFFE_OUTPUT_LAYERS = ['prob'] -------------------------------------------------------------------------------- /nsfw_container/nsfw/nsfw.py: -------------------------------------------------------------------------------- 1 | import requests, numpy, os, sys, glob, time, caffe 2 | from PIL import Image 3 | from requests_file import FileAdapter 4 | #from flask_redis import FlaskRedis 5 | from flask import Flask, request, jsonify 6 | from PIL import Image 7 | from StringIO import StringIO 8 | 9 | 10 | s = requests.Session() 11 | s.mount('file://', FileAdapter()) 12 | app = Flask(__name__) 13 | app.config.from_object('config') 14 | #store = FlaskRedis(app) 15 | 16 | 17 | # Caffe Stuff 18 | network = caffe.Net( 19 | app.config['CAFFE_MODEL_DEFINITIONS'], 20 | app.config['CAFFE_PRETRAINING'], 21 | caffe.TEST 22 | ) 23 | transformer = caffe.io.Transformer({ 24 | 'data': network.blobs['data'].data.shape 25 | }) 26 | transformer.set_transpose('data', (2, 0, 1)) 27 | transformer.set_mean('data', numpy.array([104, 117, 123])) 28 | transformer.set_raw_scale('data', 255) 29 | transformer.set_channel_swap('data', (2, 1, 0)) 30 | 31 | 32 | def resize_image(image): 33 | ''' 34 | Resizes the image to a size that is relevent to the yahoo data 35 | ''' 36 | 37 | # If the image isn't in RGB mode, we will need to convert it. 38 | if image.mode != 'RGB': 39 | image = image.convert('RGB') 40 | 41 | # Now lets resize the image and save it into a StringIO buffer 42 | # as a JPEG image. 43 | rimg = image.resize((256, 256), resample=Image.BILINEAR) 44 | resp = StringIO() 45 | rimg.save(resp, format='JPEG') 46 | 47 | # Return the byte array of the image. 48 | resp.seek(0) 49 | return bytearray(resp.read()) 50 | 51 | 52 | def compute_nsfw_score(image_data): 53 | ''' 54 | Computes the image nsfw score 55 | ''' 56 | layers = app.config['CAFFE_OUTPUT_LAYERS'] 57 | 58 | # Lets resize the image and load the image into Caffe 59 | rimg = resize_image(image_data) 60 | img = caffe.io.load_image(StringIO(rimg)) 61 | 62 | # Now we will want to crop the image down. 63 | H, W, _ = img.shape 64 | _, _, h, w = network.blobs['data'].data.shape 65 | h_off = max((H - h) /2, 0) 66 | w_off = max((W - w) /2, 0) 67 | crop = img[h_off:h_off + h, w_off:w_off + w, :] 68 | 69 | # Now lets transform the image 70 | timg = transformer.preprocess('data', crop) 71 | timg.shape = (1,) + timg.shape 72 | 73 | # And to get all of the outputs 74 | outputs = network.forward_all(blobs=layers, **{network.inputs[0]: timg}) 75 | 76 | # now to finally return the score 77 | return outputs[layers[0]][0].astype(float)[1] * 100 78 | 79 | 80 | @app.route('/score', methods=['POST']) 81 | def get_score(): 82 | image = None 83 | 84 | if 'image' in request.files: 85 | image = Image.open(request.files['image']) 86 | elif 'path' in request.form: 87 | resp = s.get(request.form.get('path'), stream=True) 88 | if resp.status_code == 200: 89 | resp.raw.decode_content = True 90 | image = Image.open(resp.raw) 91 | 92 | if image: 93 | try: 94 | score = compute_nsfw_score(image) 95 | except: 96 | return jsonify({'score': None, 'error': True}) 97 | else: 98 | return jsonify({'score': score, 'error': False}) 99 | else: 100 | return jsonify({'score': None, 'error': True}) 101 | 102 | 103 | if __name__ == '__main__': 104 | app.run(host='0.0.0.0', port=8080) -------------------------------------------------------------------------------- /nsfw_container/nsfw/requirements.txt: -------------------------------------------------------------------------------- 1 | gevent 2 | requests 3 | requests-file 4 | flask -------------------------------------------------------------------------------- /nsfw_container/nsfw/resnet_50_1by2_nsfw.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/nsfw_container/nsfw/resnet_50_1by2_nsfw.caffemodel -------------------------------------------------------------------------------- /nsfw_container/nsfw_service.py: -------------------------------------------------------------------------------- 1 | import numpy, os, sys, glob, time, caffe 2 | import tornado.ioloop 3 | import tornado.httpclient 4 | import tornado.web 5 | from tornado.httpclient import AsyncHTTPClient 6 | from tornado import gen 7 | from PIL import Image 8 | from StringIO import StringIO 9 | 10 | 11 | class ImageHandler(tornago.web.RequestHandler): 12 | def initialize(self, layers, network, transformer): 13 | self.layers = layers 14 | self.network = network 15 | self.transformer = transformer 16 | 17 | def post(self): 18 | path = self.get_body_argument('path') 19 | 20 | def resize(self, data): 21 | image = Image.open(StringIO(str(data))) 22 | if image.mode != 'RGB': 23 | image = image.convert('RGB') 24 | resized = image.resize((256, 256), resample=Image.BILINEAR) 25 | output = StringIO() 26 | resized.save(output, format='JPEG') 27 | output.seek(0) 28 | return output 29 | 30 | def compute(self, image): 31 | img = caffe.io.load_image(image) 32 | H, W, _ = img.shape 33 | _, _, h, w = self.network.blobs['data'].data.shape 34 | h_off = max((H - h) / 2, 0) 35 | w_off = max((W - w) / 2, 0) 36 | crop = img[h_off:h_off + h, w_off:w_off + w, :] 37 | timg = self.transformer.preprocess('data', crop) 38 | timg.shape = (1,) + timg.shape 39 | all_outputs = self.network.formward_all(blobs=self.layers, self.network.inputs[0]: timg) 40 | return all_outputs[self.layers[0]][0].astype(float) 41 | 42 | 43 | 44 | def make_app(): 45 | output_layers = ['prob'] 46 | network = caffe.Net('model_definitions.prototxt', 'nsfw_pretraining.caffemodel', caffe.TEST) 47 | transformer = caffe.io.Transformer({ 48 | 'data': network.blobs['data'].data.shape 49 | }) 50 | transformer.set_transpose('data', (2, 0, 1)) 51 | transformer.set_mean('data', numpy.array([104, 117, 123])) 52 | transformer.set_raw_scale('data', 255) 53 | transformer.set_channel_swap('data', (2, 1, 0)) 54 | 55 | 56 | app = tornado.web.Application([ 57 | (r'/', ImageHandler, dict(layers=output_layers, network=network, transformer=transformer)), 58 | ]) 59 | 60 | 61 | if __name__ == '__main__': 62 | app = make_app() 63 | app.listen(8888) 64 | tornado.ioloop.IOLoop.current().start() -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dofler", 3 | "version": "5.0.1", 4 | "author": "Steven McGrath ", 5 | "homepage": "http://dofler.net", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/SteveMcGrath/DoFler" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/SteveMcGrath/DoFler/issues" 12 | }, 13 | "keywords": [ 14 | "dofler", 15 | "ettercap", 16 | "dsniff", 17 | "ngrep", 18 | "tshark", 19 | "wireshark", 20 | "driftnet" 21 | ], 22 | "license": "GPL-3.0", 23 | "bin": { 24 | "dofler": "node ./server.js" 25 | }, 26 | "directories": { 27 | "lib": "./lib" 28 | }, 29 | "description": "Dashboard of Fail network monitoring and presentation application", 30 | "dependencies": { 31 | "async": "^2.0.0-rc.2", 32 | "base64-img": "^1.0.3", 33 | "config": "^1.19.0", 34 | "express": "^4.13.4", 35 | "httpreq": "^0.4.16", 36 | "jade": "^1.11.0", 37 | "md5": "^2.1.0", 38 | "mv": "^2.1.1", 39 | "sequelize": ">=5.3.0", 40 | "socket.io": "^1.4.5", 41 | "xml2js": "^0.4.16", 42 | "mysql2": ">=1.6.5" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var web = require('./lib/web'); 4 | var parser = require('./lib/parsers'); -------------------------------------------------------------------------------- /static/css/display.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px}body>.navbar{-webkit-transition:background-color .3s ease-in;transition:background-color .3s ease-in}@media (min-width:768px){body>.navbar-transparent{background-color:transparent}body>.navbar-transparent .navbar-nav>.open>a{background-color:transparent!important}}#home{padding-top:0}#home .navbar-brand{padding:13.5px 15px 12.5px}#home .navbar-brand>img{display:inline;margin:0 10px;height:100%}#banner{min-height:300px;border-bottom:none}.table-of-contents{margin-top:1em}.page-header h1{font-size:4em}.bs-docs-section{margin-top:6em}.bs-docs-section h1{padding-top:100px}.bs-component{position:relative}.bs-component .modal{position:relative;top:auto;right:auto;left:auto;bottom:auto;z-index:1;display:block}.bs-component .modal-dialog{width:90%}.bs-component .popover{position:relative;display:inline-block;width:220px;margin:20px}#source-button{position:absolute;top:0;right:0;z-index:100;font-weight:700}.nav-tabs{margin-bottom:15px}.progress{margin-bottom:10px}footer{margin:5em 0}footer li{float:left;margin-right:1.5em;margin-bottom:1.5em}footer p{clear:left;margin-bottom:0}.splash{padding:9em 0 2em;background-color:#141d27;background-image:url(../img/bg.jpg);background-size:cover;background-attachment:fixed;color:#fff;text-align:center}.splash .logo{width:160px}.splash h1{font-size:3em}.splash #social{margin:2em 0}.splash .alert{margin:2em 0}.section-tout{padding:4em 0 3em;border-bottom:1px solid rgba(0,0,0,.05);background-color:#eaf1f1}.section-tout .fa{margin-right:.5em}.section-tout p{margin-bottom:3em}.section-preview{padding:4em 0 4em}.section-preview .preview{margin-bottom:4em;background-color:#eaf1f1}.section-preview .preview .image{position:relative}.section-preview .preview .image:before{box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);position:absolute;top:0;left:0;width:100%;height:100%;content:"";pointer-events:none}.section-preview .preview .options{padding:1em 2em 2em;border:1px solid rgba(0,0,0,.05);border-top:none;text-align:center}.section-preview .preview .options p{margin-bottom:2em}.section-preview .dropdown-menu{text-align:left}.section-preview .lead{margin-bottom:2em}@media (max-width:767px){.section-preview .image img{width:100%}}.sponsor #carbonads{max-width:240px;margin:0 auto}.sponsor .carbon-text{display:block;margin-top:1em;font-size:12px}.sponsor .carbon-poweredby{float:right;margin-top:1em;font-size:10px}@media (max-width:767px){.splash{padding-top:4em}.splash .logo{width:100px}.splash h1{font-size:2em}#banner{margin-bottom:2em;text-align:center}} -------------------------------------------------------------------------------- /static/css/dofler.css: -------------------------------------------------------------------------------- 1 | body { 2 | overflow: hidden; 3 | font-size: 13px; 4 | line-height: none; 5 | } 6 | 7 | #nav-data-wrapper { 8 | height: 100%; 9 | } 10 | 11 | #version { 12 | vertical-align: bottom; 13 | padding-left: 5px; 14 | /* padding-right: 20px; */ 15 | line-height: 25px; 16 | } 17 | 18 | #accounts-list { 19 | margin-bottom: 0px; 20 | color: #888888; 21 | } 22 | 23 | .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td { 24 | padding: 2px; 25 | } 26 | 27 | .account-entry > td { 28 | padding: 2px; 29 | } 30 | 31 | #top-vulnerabilities { 32 | margin-bottom: 0px; 33 | } 34 | 35 | #top-vulnerable-hosts { 36 | width: 100%; 37 | } 38 | 39 | #top-vulnerable-hosts td:first-child { 40 | width: 10%; 41 | padding-right: 5px; 42 | color: #888888; 43 | } 44 | 45 | .panel-heading { 46 | padding: 5px; 47 | } 48 | 49 | .panel-body { 50 | padding: 1px; 51 | } 52 | 53 | .vuln-badge { 54 | position: absolute; 55 | top: 0px; 56 | right: 0px; 57 | } 58 | 59 | .vulnerability { 60 | white-space: nowrap; 61 | overflow: hidden; 62 | padding: 2px; 63 | color: #888888; 64 | } 65 | 66 | .vuln-candy-bar { 67 | width: 100%; 68 | height: 17px; 69 | display: inline-block; 70 | } 71 | 72 | .v-crit, .v-high, .v-med, .v-low, .v-info{ 73 | display: inline-block; 74 | height: 100%; 75 | padding: 0px; 76 | float: left; 77 | } 78 | 79 | .v-crit {background-color: #d43f3a;} 80 | .v-high {background-color: #ee9336;} 81 | .v-med {background-color: #fdc431;} 82 | .v-low {background-color: #4cae4c;} 83 | .v-info {background-color: #357abd;} 84 | 85 | #sidebar-wrapper { 86 | position: fixed; 87 | top: 55px; 88 | right: 0px; 89 | width: 400px; 90 | height: 100%; 91 | overflow-y: auto; 92 | background-color: rgba(0,0,0,0); 93 | } 94 | 95 | 96 | #images-wrapper { 97 | width: 100%; 98 | position: fixed; 99 | top: inherit; 100 | left: 0px; 101 | } 102 | 103 | #proto-analysis { 104 | height: 200px; 105 | } 106 | 107 | .dofler-img { 108 | margin-top: 5px; 109 | max-height: 400px; 110 | max-width: 400px; 111 | margin-left: 5px; 112 | display: block; 113 | float: left; 114 | } -------------------------------------------------------------------------------- /static/css/paper.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/static/css/paper.min.css -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteveMcGrath/DoFler/0da4016175b2922343345ede69920bf3e7855ed9/static/img/logo.png -------------------------------------------------------------------------------- /static/js/bootswatch.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | $(window).scroll(function () { 3 | var top = $(document).scrollTop(); 4 | $('.splash').css({ 5 | 'background-position': '0px -'+(top/3).toFixed(2)+'px' 6 | }); 7 | if(top > 50) 8 | $('#home > .navbar').removeClass('navbar-transparent'); 9 | else 10 | $('#home > .navbar').addClass('navbar-transparent'); 11 | }); 12 | 13 | $("a[href='#']").click(function(e) { 14 | e.preventDefault(); 15 | }); 16 | 17 | var $button = $("
< >
").click(function(){ 18 | var html = $(this).parent().html(); 19 | html = cleanSource(html); 20 | $("#source-modal pre").text(html); 21 | $("#source-modal").modal(); 22 | }); 23 | 24 | $('.bs-component [data-toggle="popover"]').popover(); 25 | $('.bs-component [data-toggle="tooltip"]').tooltip(); 26 | 27 | $(".bs-component").hover(function(){ 28 | $(this).append($button); 29 | $button.show(); 30 | }, function(){ 31 | $button.hide(); 32 | }); 33 | 34 | function cleanSource(html) { 35 | html = html.replace(/×/g, "×") 36 | .replace(/«/g, "«") 37 | .replace(/»/g, "»") 38 | .replace(/←/g, "←") 39 | .replace(/→/g, "→"); 40 | 41 | var lines = html.split(/\n/); 42 | 43 | lines.shift(); 44 | lines.splice(-1, 1); 45 | 46 | var indentSize = lines[0].length - lines[0].trim().length, 47 | re = new RegExp(" {" + indentSize + "}"); 48 | 49 | lines = lines.map(function(line){ 50 | if (line.match(re)) { 51 | line = line.substring(indentSize); 52 | } 53 | 54 | return line; 55 | }); 56 | 57 | lines = lines.join("\n"); 58 | 59 | return lines; 60 | } 61 | 62 | })(); -------------------------------------------------------------------------------- /static/js/dofler.js: -------------------------------------------------------------------------------- 1 | var accounts = []; 2 | var account_id = null; 3 | var socket = io(); 4 | var flagged_images = []; 5 | 6 | 7 | function addImage(image) { 8 | // Check to see if the image that was just sent to us is already being 9 | // displayed. If it isn't, then we will add it to the view. 10 | var nsfw_ceiling = parseInt($('#nsfw-ceiling').val()) 11 | if ($('img[src="/images/file/' + image.filename + '"]').length < 1 12 | && ((nsfw_ceiling && image.nsfw < nsfw_ceiling) || !nsfw_ceiling) 13 | && flagged_images.indexOf(image.filename) < 0 14 | ){ 15 | if ($('#debug').is(':checked')){ 16 | console.log(image.filename + ' + with nsfw score ' + image.nsfw + ' drawn') 17 | } 18 | $('#images').prepend(''); 19 | }else{ 20 | if ($('#debug').is(':checked')){ 21 | console.log(image.filename + ' with nsfw score ' + image.nsfw + ' NOT drawn') 22 | } 23 | } 24 | 25 | // As we only want to display the latest 200 images, we will want to 26 | // remove the oldest images once this limit has been reached. 27 | if ($('.dofler-img').length > 100){ 28 | $('.dofler-img:last').remove() 29 | } 30 | } 31 | 32 | 33 | function removeImage(filename) { 34 | if ($('#removable-images').is(':checked')) { 35 | $('img[src="/images/file/' + filename + '"]').remove() 36 | flagged_images.push(filename) 37 | } 38 | } 39 | 40 | 41 | function hostVulnList(data) { 42 | // Empty the table in preperation for the the new information 43 | $('#top-vulnerable-hosts > tbody').empty(); 44 | 45 | // A simple function to get the percentage of the maximum number 46 | // of severities that the current severity specified is. 47 | function getPercent(value) { 48 | return ((value / data['max'] * 100) - 0.1).toFixed(1); 49 | } 50 | 51 | // Lets actually draw the information on to the screen. 52 | $.each(data['hosts'], function(i, val) { 53 | $('#top-vulnerable-hosts > tbody').append( 54 | '' + val.host + '
' + 55 | '
' + 56 | '
' + 57 | '
' + 58 | '
' + 59 | '
' 60 | ); 61 | }); 62 | } 63 | 64 | 65 | function topVulnsList(data) { 66 | // Empty the list in preperation for the the new information 67 | $('#top-vulnerabilities').empty(); 68 | 69 | var crits = ['info', 'low', 'med', 'high', 'crit']; 70 | 71 | $.each(data, function(i, val) { 72 | $('#top-vulnerabilities').append( 73 | '
  • ' + val.name + '' + val.count + '
  • ' 74 | ); 75 | }); 76 | } 77 | 78 | 79 | function addAccount(account) { 80 | accounts.push(account); 81 | } 82 | 83 | 84 | function protoRefresh(reporting = false) { 85 | // Get the top 5 protocols from the API and then generate the flot graph 86 | // based on the data returned. 87 | var url = '/stats/protocols/5' 88 | if (reporting) {url = '/stats/protoreport/10'} 89 | $.getJSON(url, function(protos) { 90 | $.plot('#proto-analysis', protos, 91 | {xaxis: { mode: "time", position: "right", timezone: "browser"}, 92 | legend: {position: "nw", backgroundColor: null, backgroundOpacity: 0} 93 | }); 94 | }) 95 | } 96 | 97 | 98 | function protoList() { 99 | $.getJSON('/stats/protolist', function(protos) { 100 | $.each(protos, function(key, proto) { 101 | $('#proto-list').append('
  • ' + proto.count + '' + proto.name + '
  • ') 102 | }) 103 | }) 104 | } 105 | 106 | 107 | function displayAccount(account, clip=true) { 108 | $('#account-total').html(accounts.length); 109 | 110 | $('#accounts-list > tbody').append( 111 | '' + 112 | S(account.username || '').escapeHTML().substring(0,15) + '' + 113 | S(account.password || '').escapeHTML().substring(0,15) + '' + 114 | S(account.protocol || '').escapeHTML() + '' + 115 | S(account.dns || '').escapeHTML().substring(0,15) + '' 116 | ); 117 | } 118 | 119 | 120 | function renderAccountList() { 121 | if (accounts.length > 5) { 122 | for (var i in accounts.slice(0,5)) {displayAccount(accounts[i])} 123 | } else { 124 | for (var i in accounts) {displayAccount(accounts[i])} 125 | } 126 | } 127 | 128 | 129 | function accountCycle() { 130 | if (accounts.length > 5) { 131 | // If this is the first time the accounts have gone above 5, then we will 132 | // need to set the initial value. 133 | if (account_id == null) {account_id = 5;} 134 | 135 | // Increment the account_id counter. 136 | account_id++; 137 | 138 | // If the account_id counter exceeds the number of elements in the 139 | // accounts array, then we will need to rotate the id to the 140 | // beginning of the array. 141 | if (account_id > accounts.length - 1) { 142 | account_id = account_id - accounts.length; 143 | } 144 | console.log(account_id) 145 | 146 | // Now to remove the first entry and add the last entry into the 147 | // user view. 148 | $('.account-entry:first').remove(); 149 | displayAccount(accounts[account_id]); 150 | console.log(accounts[account_id]); 151 | } 152 | } 153 | 154 | 155 | function report() { 156 | $(document).ready(function () { 157 | $.getJSON('/images/common', function(images) { 158 | $.each(images, function(key, image) { 159 | $('#image-table').append('' + image.count + ''); 160 | }) 161 | }); 162 | $.getJSON('/accounts/list', function(accounts) { 163 | $.each(accounts, function(key, account) { 164 | addAccount(account); 165 | displayAccount(account); 166 | }) 167 | }); 168 | protoRefresh(true); 169 | }) 170 | } 171 | 172 | 173 | function display() { 174 | socket.on('images', function(image) { 175 | addImage(image); 176 | }) 177 | 178 | 179 | socket.on('accounts', function(account) { 180 | accounts.push(account); 181 | }) 182 | 183 | 184 | socket.on('protocols', function(data){ 185 | protoRefresh(); 186 | }) 187 | 188 | 189 | socket.on('vulnHosts', function(data){ 190 | $.getJSON('/vulns/hosts', function(data) {hostVulnList(data)}); 191 | }) 192 | 193 | 194 | socket.on('topVulns', function(data){ 195 | $.getJSON('/vulns/vulns', function(data) {topVulnsList(data)}); 196 | }) 197 | 198 | 199 | $(document).ready(function () { 200 | $.getJSON('/images/list', function(images) { 201 | $.each(images, function(key, image) { 202 | addImage(image); 203 | }) 204 | }); 205 | $.getJSON('/accounts/list', function(account_list) { 206 | accounts = account_list; 207 | renderAccountList(); 208 | }); 209 | $.getJSON('/vulns/hosts', function(data) {hostVulnList(data)}); 210 | $.getJSON('/vulns/vulns', function(data) {topVulnsList(data)}); 211 | protoRefresh(); 212 | setInterval(accountCycle, 1000); 213 | }) 214 | } -------------------------------------------------------------------------------- /static/js/jquery.flot.time.min.js: -------------------------------------------------------------------------------- 1 | /* Javascript plotting library for jQuery, version 0.8.3. 2 | 3 | Copyright (c) 2007-2014 IOLA and Ole Laursen. 4 | Licensed under the MIT license. 5 | 6 | */ 7 | (function($){var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:false,monthNames:null}};function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if(typeof d.strftime=="function"){return d.strftime(fmt)}var leftPad=function(n,pad){n=""+n;pad=""+(pad==null?"0":pad);return n.length==1?pad+n:n};var r=[];var escape=false;var hours=d.getHours();var isAM=hours<12;if(monthNames==null){monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(dayNames==null){dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var hours12;if(hours>12){hours12=hours-12}else if(hours==0){hours12=12}else{hours12=hours}for(var i=0;i=minSize){break}}var size=spec[i][0];var unit=spec[i][1];if(unit=="year"){if(opts.minTickSize!=null&&opts.minTickSize[1]=="year"){size=Math.floor(opts.minTickSize[0])}else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10));var norm=axis.delta/timeUnitSize.year/magn;if(norm<1.5){size=1}else if(norm<3){size=2}else if(norm<7.5){size=5}else{size=10}size*=magn}if(size<1){size=1}}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];if(unit=="second"){d.setSeconds(floorInBase(d.getSeconds(),tickSize))}else if(unit=="minute"){d.setMinutes(floorInBase(d.getMinutes(),tickSize))}else if(unit=="hour"){d.setHours(floorInBase(d.getHours(),tickSize))}else if(unit=="month"){d.setMonth(floorInBase(d.getMonth(),tickSize))}else if(unit=="quarter"){d.setMonth(3*floorInBase(d.getMonth()/3,tickSize))}else if(unit=="year"){d.setFullYear(floorInBase(d.getFullYear(),tickSize))}d.setMilliseconds(0);if(step>=timeUnitSize.minute){d.setSeconds(0)}if(step>=timeUnitSize.hour){d.setMinutes(0)}if(step>=timeUnitSize.day){d.setHours(0)}if(step>=timeUnitSize.day*4){d.setDate(1)}if(step>=timeUnitSize.month*2){d.setMonth(floorInBase(d.getMonth(),3))}if(step>=timeUnitSize.quarter*2){d.setMonth(floorInBase(d.getMonth(),6))}if(step>=timeUnitSize.year){d.setMonth(0)}var carry=0;var v=Number.NaN;var prev;do{prev=v;v=d.getTime();ticks.push(v);if(unit=="month"||unit=="quarter"){if(tickSize<1){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+(unit=="quarter"?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize);carry=d.getHours();d.setHours(0)}else{d.setMonth(d.getMonth()+tickSize*(unit=="quarter"?3:1))}}else if(unit=="year"){d.setFullYear(d.getFullYear()+tickSize)}else{d.setTime(v+step)}}while(v