0 ?
58 | '' : ' disabled');
59 | break;
60 |
61 | case 'previous':
62 | btnDisplay = lang.sPrevious;
63 | btnClass = button + (page > 0 ?
64 | '' : ' disabled');
65 | break;
66 |
67 | case 'next':
68 | btnDisplay = lang.sNext;
69 | btnClass = button + (page < pages-1 ?
70 | '' : ' disabled');
71 | break;
72 |
73 | case 'last':
74 | btnDisplay = lang.sLast;
75 | btnClass = button + (page < pages-1 ?
76 | '' : ' disabled');
77 | break;
78 |
79 | default:
80 | btnDisplay = button + 1;
81 | btnClass = page === button ?
82 | 'active' : '';
83 | break;
84 | }
85 |
86 | if ( btnDisplay ) {
87 | node = $('', {
88 | 'class': classes.sPageButton+' '+btnClass,
89 | 'aria-controls': settings.sTableId,
90 | 'tabindex': settings.iTabIndex,
91 | 'id': idx === 0 && typeof button === 'string' ?
92 | settings.sTableId +'_'+ button :
93 | null
94 | } )
95 | .append( $('', {
96 | 'href': '#'
97 | } )
98 | .html( btnDisplay )
99 | )
100 | .appendTo( container );
101 |
102 | settings.oApi._fnBindAction(
103 | node, {action: button}, clickHandler
104 | );
105 | }
106 | }
107 | }
108 | };
109 |
110 | attach(
111 | $(host).empty().html('').children('ul'),
112 | buttons
113 | );
114 | }
115 | }
116 | else {
117 | // Integration for 1.9-
118 | $.fn.dataTable.defaults.sPaginationType = 'bootstrap';
119 |
120 | /* API method to get paging information */
121 | $.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
122 | {
123 | return {
124 | "iStart": oSettings._iDisplayStart,
125 | "iEnd": oSettings.fnDisplayEnd(),
126 | "iLength": oSettings._iDisplayLength,
127 | "iTotal": oSettings.fnRecordsTotal(),
128 | "iFilteredTotal": oSettings.fnRecordsDisplay(),
129 | "iPage": oSettings._iDisplayLength === -1 ?
130 | 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
131 | "iTotalPages": oSettings._iDisplayLength === -1 ?
132 | 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
133 | };
134 | };
135 |
136 | /* Bootstrap style pagination control */
137 | $.extend( $.fn.dataTableExt.oPagination, {
138 | "bootstrap": {
139 | "fnInit": function( oSettings, nPaging, fnDraw ) {
140 | var oLang = oSettings.oLanguage.oPaginate;
141 | var fnClickHandler = function ( e ) {
142 | e.preventDefault();
143 | if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
144 | fnDraw( oSettings );
145 | }
146 | };
147 |
148 | $(nPaging).append(
149 | ''
153 | );
154 | var els = $('a', nPaging);
155 | $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
156 | $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
157 | },
158 |
159 | "fnUpdate": function ( oSettings, fnDraw ) {
160 | var iListLength = 5;
161 | var oPaging = oSettings.oInstance.fnPagingInfo();
162 | var an = oSettings.aanFeatures.p;
163 | var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
164 |
165 | if ( oPaging.iTotalPages < iListLength) {
166 | iStart = 1;
167 | iEnd = oPaging.iTotalPages;
168 | }
169 | else if ( oPaging.iPage <= iHalf ) {
170 | iStart = 1;
171 | iEnd = iListLength;
172 | } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
173 | iStart = oPaging.iTotalPages - iListLength + 1;
174 | iEnd = oPaging.iTotalPages;
175 | } else {
176 | iStart = oPaging.iPage - iHalf + 1;
177 | iEnd = iStart + iListLength - 1;
178 | }
179 |
180 | for ( i=0, ien=an.length ; i'+j+'')
188 | .insertBefore( $('li:last', an[i])[0] )
189 | .bind('click', function (e) {
190 | e.preventDefault();
191 | oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
192 | fnDraw( oSettings );
193 | } );
194 | }
195 |
196 | // Add / remove disabled classes from the static elements
197 | if ( oPaging.iPage === 0 ) {
198 | $('li:first', an[i]).addClass('disabled');
199 | } else {
200 | $('li:first', an[i]).removeClass('disabled');
201 | }
202 |
203 | if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
204 | $('li:last', an[i]).addClass('disabled');
205 | } else {
206 | $('li:last', an[i]).removeClass('disabled');
207 | }
208 | }
209 | }
210 | }
211 | } );
212 | }
213 |
214 |
215 | /*
216 | * TableTools Bootstrap compatibility
217 | * Required TableTools 2.1+
218 | */
219 | if ( $.fn.DataTable.TableTools ) {
220 | // Set the classes that TableTools uses to something suitable for Bootstrap
221 | $.extend( true, $.fn.DataTable.TableTools.classes, {
222 | "container": "DTTT btn-group",
223 | "buttons": {
224 | "normal": "btn btn-default",
225 | "disabled": "disabled"
226 | },
227 | "collection": {
228 | "container": "DTTT_dropdown dropdown-menu",
229 | "buttons": {
230 | "normal": "",
231 | "disabled": "disabled"
232 | }
233 | },
234 | "print": {
235 | "info": "DTTT_print_info modal"
236 | },
237 | "select": {
238 | "row": "active"
239 | }
240 | } );
241 |
242 | // Have the collection use a bootstrap compatible dropdown
243 | $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
244 | "collection": {
245 | "container": "ul",
246 | "button": "li",
247 | "liner": "a"
248 | }
249 | } );
250 | }
--------------------------------------------------------------------------------
/Panel/assets/js/initialize.js:
--------------------------------------------------------------------------------
1 | /* -------------------------------------------------+
2 | Title: Mate Rio - Admin Template
3 | Framework: Materialize
4 | Version: 1.0 stable
5 | Author: Jozef Dvorský, http://www.creatingo.com
6 | +-------------------------------------------------- */
7 |
8 | (function($){
9 | $(function(){
10 |
11 | "use strict";
12 |
13 | var window_width = $(window).width();
14 |
15 | // Color Palette - convert rgb to hex value string
16 | function rgb2hex(rgb) {
17 | if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; }
18 |
19 | rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
20 |
21 | if (rgb === null) { return "N/A"; }
22 |
23 | function hex(x) {
24 | return ("0" + parseInt(x).toString(16)).slice(-2);
25 | }
26 |
27 | return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
28 | }
29 |
30 | // Color Palette - auto add color captions
31 | $('.dynamic-color .col').each(function () {
32 | $(this).children().each(function () {
33 | var color = $(this).css('background-color'),
34 | classes = $(this).attr('class');
35 | $(this).html(rgb2hex(color) + " " + classes);
36 | if (classes.indexOf("darken") >= 0 || $(this).hasClass('black')) {
37 | $(this).css('color', 'rgba(255,255,255,.9');
38 | } else {
39 | $(this).css('color', 'rgba(0,0,0,.9');
40 | }
41 | });
42 | });
43 |
44 | $('.slider').slider({full_width: true});
45 | $('.button-collapse').sideNav();
46 | $('.datepicker').pickadate({selectYears: 20});
47 | $('select').not('.disabled').material_select();
48 | $('.materialboxed').materialbox();
49 | $('.modal-trigger').leanModal();
50 | $('.tabs-wrapper').pushpin({ top: 240 });
51 | $('.scrollspy').scrollSpy();
52 |
53 |
54 | // Handlig window resize actions, after resize event is done
55 |
56 | var rtime;
57 | var timeout = false;
58 | var delta = 200;
59 | $(window).resize(function() {
60 | rtime = new Date();
61 | if (timeout === false) {
62 | timeout = true;
63 | setTimeout(resizeend, delta);
64 | }
65 | });
66 |
67 | function resizeend() {
68 | if (new Date() - rtime < delta) {
69 | setTimeout(resizeend, delta);
70 | } else {
71 | timeout = false;
72 | // Here goes custom actions
73 | $('#slide-menu').simplebar('recalculate');
74 | }
75 | }
76 |
77 |
78 | // Set checkbox on forms.html to indeterminate
79 | var indeterminateCheckbox = document.getElementById('indeterminate-checkbox');
80 | if (indeterminateCheckbox !== null)
81 | indeterminateCheckbox.indeterminate = true;
82 |
83 |
84 | // Floating-Fixed table of contents
85 | if ($('nav').length) {
86 | $('.toc-wrapper').pushpin({ top: $('nav').height() });
87 | }
88 | else if ($('#index-banner').length) {
89 | $('.toc-wrapper').pushpin({ top: $('#index-banner').height() });
90 | }
91 | else {
92 | $('.toc-wrapper').pushpin({ top: 0 });
93 | }
94 |
95 | }); // end of document ready
96 | })(jQuery); // end of jQuery name space
--------------------------------------------------------------------------------
/Panel/database/darkcoders_net.sql.zip:
--------------------------------------------------------------------------------
1 |
2 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
3 | SET AUTOCOMMIT = 0;
4 | START TRANSACTION;
5 | SET time_zone = "+00:00";
6 |
7 |
8 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
9 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
10 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
11 | /*!40101 SET NAMES utf8mb4 */;
12 |
13 | --
14 | -- Database: `DarkC0ders`
15 | --
16 |
17 | -- --------------------------------------------------------
18 |
19 | --
20 | -- Table structure for table `bots`
21 | --
22 |
23 | DROP TABLE IF EXISTS `bots`;
24 | CREATE TABLE IF NOT EXISTS `bots` (
25 | `id` int(255) NOT NULL AUTO_INCREMENT,
26 | `bothwid` varchar(100) NOT NULL,
27 | `ipaddress` varchar(75) NOT NULL,
28 | `country` int(5) NOT NULL,
29 | `installdate` int(50) NOT NULL,
30 | `lastresponse` int(50) NOT NULL,
31 | `currenttask` int(255) NOT NULL,
32 | `operatingsys` varchar(300) NOT NULL,
33 | `botversion` varchar(30) NOT NULL,
34 | `privileges` varchar(5) NOT NULL,
35 | `installationpath` text NOT NULL,
36 | `computername` text NOT NULL,
37 | `lastreboot` text NOT NULL,
38 | `mark` int(1) NOT NULL,
39 | PRIMARY KEY (`id`)
40 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
41 |
42 | -- --------------------------------------------------------
43 |
44 | --
45 | -- Table structure for table `plogs`
46 | --
47 |
48 | DROP TABLE IF EXISTS `plogs`;
49 | CREATE TABLE IF NOT EXISTS `plogs` (
50 | `id` int(255) NOT NULL AUTO_INCREMENT,
51 | `username` varchar(50) NOT NULL,
52 | `ipaddress` varchar(75) NOT NULL,
53 | `action` text NOT NULL,
54 | `date` int(50) NOT NULL,
55 | PRIMARY KEY (`id`)
56 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
57 |
58 | -- --------------------------------------------------------
59 |
60 | --
61 | -- Table structure for table `settings`
62 | --
63 |
64 | DROP TABLE IF EXISTS `settings`;
65 | CREATE TABLE IF NOT EXISTS `settings` (
66 | `id` int(255) NOT NULL AUTO_INCREMENT,
67 | `knock` int(10) NOT NULL,
68 | `dead` int(10) NOT NULL,
69 | `gate_status` int(1) NOT NULL,
70 | `stub_id` varchar(200) NOT NULL,
71 | PRIMARY KEY (`id`)
72 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
73 |
74 | --
75 | -- Dumping data for table `settings`
76 | --
77 |
78 | INSERT INTO `settings` (`id`, `knock`, `dead`, `gate_status`, `stub_id`) VALUES
79 | (1, 1, 7, 1, '');
80 |
81 | -- --------------------------------------------------------
82 |
83 | --
84 | -- Table structure for table `tasks`
85 | --
86 |
87 | DROP TABLE IF EXISTS `tasks`;
88 | CREATE TABLE IF NOT EXISTS `tasks` (
89 | `id` int(255) NOT NULL AUTO_INCREMENT,
90 | `task` varchar(100) NOT NULL,
91 | `params` text NOT NULL,
92 | `filters` text NOT NULL,
93 | `executions` varchar(100) NOT NULL,
94 | `username` varchar(50) NOT NULL,
95 | `status` int(1) NOT NULL,
96 | `date` int(50) NOT NULL,
97 | PRIMARY KEY (`id`)
98 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
99 |
100 | -- --------------------------------------------------------
101 |
102 | --
103 | -- Table structure for table `tasks_completed`
104 | --
105 |
106 | DROP TABLE IF EXISTS `tasks_completed`;
107 | CREATE TABLE IF NOT EXISTS `tasks_completed` (
108 | `id` int(255) NOT NULL AUTO_INCREMENT,
109 | `bothwid` varchar(100) NOT NULL,
110 | `taskid` int(255) NOT NULL,
111 | PRIMARY KEY (`id`)
112 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
113 |
114 | -- --------------------------------------------------------
115 |
116 | --
117 | -- Table structure for table `users`
118 | --
119 |
120 | DROP TABLE IF EXISTS `users`;
121 | CREATE TABLE IF NOT EXISTS `users` (
122 | `id` int(255) NOT NULL AUTO_INCREMENT,
123 | `username` varchar(50) NOT NULL,
124 | `password` varchar(300) NOT NULL,
125 | `privileges` varchar(300) NOT NULL,
126 | `status` int(1) NOT NULL,
127 | PRIMARY KEY (`id`)
128 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
129 |
130 | --
131 | -- Dumping data for table `users`
132 | --
133 |
134 | INSERT INTO `users` (`id`, `username`, `password`, `privileges`, `status`) VALUES
135 | (1, 'admin', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 'admin', 1);
136 | COMMIT;
137 |
138 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
139 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
140 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
141 |
--------------------------------------------------------------------------------
/Panel/includes/404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 404 Not Found
4 |
5 | Not Found
6 | The requested URL was not found on this server.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Panel/includes/config.php:
--------------------------------------------------------------------------------
1 | query("SELECT COUNT(*) FROM users WHERE username = '".$user[0]."'")->fetchColumn(0) == 0)
24 | {
25 | return false;
26 | }else{
27 | $sel = $odb->query("SELECT * FROM users WHERE username = '".$user[0]."'");
28 | $u = $sel->fetch(PDO::FETCH_ASSOC);
29 | if ($u['id'] != $user[1])
30 | {
31 | return false;
32 | }else{
33 | if ($u['status'] == "1")
34 | {
35 | return true;
36 | }else{
37 | return false;
38 | }
39 | }
40 | }
41 | }
42 | }
43 | }else{
44 | return false;
45 | }
46 | }
47 | $deckey = $odb->query("SELECT stub_id FROM settings LIMIT 1")->fetchColumn(0);
48 |
49 | function encrypt($key, $stre)
50 | {
51 | $rtn = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $stre, MCRYPT_MODE_CBC, $key);
52 | return base64_encode($rtn);
53 | }
54 |
55 | function decrypt($key, $strd)
56 | {
57 | $strd = str_replace("~", "+", $strd);
58 | $rtn = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($strd), MCRYPT_MODE_CBC, $key);
59 | $rtn = rtrim($rtn, "\0\4");
60 | return $rtn;
61 | }
62 | ?>
63 |
--------------------------------------------------------------------------------
/Panel/includes/footer.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
12 |
35 |