Skip to content

Commit

Permalink
Tagged as 1.5.0F
Browse files Browse the repository at this point in the history
(26/12/14): Version 1.5.0F
-----------------------
01. * Integrated SourceComms
02. * Added TF2 Modern Theme as Default (Made by IceMan)
03. * Integrated SourceBans Checker
04. * Re-made SourceBans FAQ
05. * Added MvM and HL2 Map Pics
06. + Re-arranged/Renamed Tabs
07. + Added More Robust LFI Patch
08. ! Fixed Plugin Pointing to wrong FAQ link
09. ? Optimized and updated IpToCountry.csv
  • Loading branch information
sarabveer committed Jan 1, 2015
1 parent 9a1cbcd commit 96f87d7
Show file tree
Hide file tree
Showing 22 changed files with 1,623 additions and 184 deletions.
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SourceBans Change Log
SourceBans (FORK) Change Log
============

```
Expand All @@ -10,6 +10,19 @@ Legend:
? = Other stuff
```

(26/12/14): Version 1.5.0F
-----------------------
01. * Integrated SourceComms
02. * Added TF2 Modern Theme as Default (Made by IceMan)
03. * Integrated SourceBans Checker
04. * Re-made SourceBans FAQ
05. * Added MvM and HL2 Map Pics
06. * Added Synergy to the Game List
07. + Re-arranged/Renamed Tabs
08. + Added More Robust LFI Patch
09. ! Fixed Plugin Pointing to wrong FAQ link
10. ? Optimized and updated IpToCountry.csv

(02/12/14): Version 1.4.13F
-----------------------
01. ! Fixed LFI EXPLOIT //Thanks jsifuentes
Expand All @@ -18,8 +31,8 @@ Legend:
(15/11/14): Version 1.4.12F
-----------------------
01. * Added Steam3 Support for Player Menu
02. ! Fixed Steam Family Sharing Ban Evasion.
03. * Added IP Ban checking from SourceSlueth
02. * Added IP Ban checking from SourceSlueth
03. ! Fixed Steam Family Sharing Ban Evasion.
04. ? Added SteamWorks Extension
05. ? Optimized and updated IpToCountry.csv

Expand Down
Binary file modified game_upload/addons/sourcemod/plugins/sbchecker.smx
Binary file not shown.
Binary file modified game_upload/addons/sourcemod/plugins/sourcebans.smx
Binary file not shown.
Binary file modified game_upload/addons/sourcemod/plugins/sourcecomms.smx
Binary file not shown.
2 changes: 1 addition & 1 deletion game_upload/addons/sourcemod/scripting/sourcebans.sp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#undef REQUIRE_PLUGIN
#include <adminmenu>

#define SB_VERSION "1.5.0F-dev"
#define SB_VERSION "1.5.0F"

//GLOBAL DEFINES
#define YELLOW 0x01
Expand Down
2 changes: 1 addition & 1 deletion game_upload/addons/sourcemod/scripting/sourcecomms.sp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Intergrated into SourceBans 1.5.0F */
#include <adminmenu>

#define UNBLOCK_FLAG ADMFLAG_CUSTOM2
#define DATABASE "sourcecomms"
#define DATABASE "sourcebans"

// #define DEBUG
// #define LOG_QUERIES
Expand Down
Binary file added web_upload/images/type_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/type_v.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
520 changes: 376 additions & 144 deletions web_upload/includes/IpToCountry.csv

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions web_upload/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
// ---------------------------------------------------
// Initial setup
// ---------------------------------------------------
define('SB_SVN', true);
#define('SB_SVN', true);
if(!defined('SB_VERSION')){
define('SB_VERSION', '1.5.0F-dev');
define('SB_REV', '$Rev: 476 $');
define('SB_VERSION', '1.5.0F');
define('SB_REV', '$Rev: 477 $');
}
define('LOGIN_COOKIE_LIFETIME', (60*60*24*7)*2);
define('COOKIE_PATH', '/');
Expand Down
4 changes: 2 additions & 2 deletions web_upload/install/includes/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ INSERT INTO `{prefix}_mods` (`mid`, `name`, `icon`, `modfolder`, `steam_universe
(19, "Alien Swarm", 'alienswarm.png', 'alienswarm', '0'),
(20, "E.Y.E: Divine Cybermancy", 'eye.png', 'eye', '0'),
(21, "Nuclear Dawn", 'nucleardawn.png', 'nucleardawn', '0'),
(22, "Counter-Strike: Global Offensive", 'csgo.png', 'csgo', '1');
(23, 'Synergy', 'synergy.png', 'synergy', '0'),
(22, "Counter-Strike: Global Offensive", 'csgo.png', 'csgo', '1'),
(23, 'Synergy', 'synergy.png', 'synergy', '0');

UPDATE `{prefix}_mods` SET `mid` = '0' WHERE `name` = 'Web';

Expand Down
4 changes: 2 additions & 2 deletions web_upload/install/includes/struc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ CREATE TABLE IF NOT EXISTS `{prefix}_submissions` (
PRIMARY KEY (`subid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `{prefix}_comms` (
CREATE TABLE IF NOT EXISTS `{prefix}_comms` (
`bid` int(6) NOT NULL AUTO_INCREMENT,
`authid` varchar(64) NOT NULL,
`name` varchar(128) NOT NULL DEFAULT 'unnamed',
Expand All @@ -231,5 +231,5 @@ CREATE TABLE `{prefix}_comms` (
KEY `RemoveType` (`RemoveType`),
KEY `authid` (`authid`),
KEY `created` (`created`),
KEY `aid` (`aid`),
KEY `aid` (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
2 changes: 1 addition & 1 deletion web_upload/install/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
// Initial setup
// ---------------------------------------------------
if(!defined('SB_VERSION')){
define('SB_VERSION', '1.5.0F-dev Installer');
define('SB_VERSION', '1.5.0F Installer');
}
define('LOGIN_COOKIE_LIFETIME', (60*60*24*7)*2);
define('COOKIE_PATH', '/');
Expand Down
149 changes: 149 additions & 0 deletions web_upload/pages/admin.blockit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?php
/**
* =============================================================================
* SourceBans Webkick feature
*
* @author SteamFriends Development Team
* @version 1.0.0
* @copyright SourceBans (C)2007 SteamFriends.com. All rights reserved.
* @package SourceBans
* @link http://www.sourcebans.net
*
* @version $Id$
* =============================================================================
*/
include_once '../init.php';

if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN))
{
echo "No Access";
die();
}
require_once(INCLUDES_PATH . '/xajax.inc.php');
$xajax = new xajax();
//$xajax->debugOn();
$xajax->setRequestURI("./admin.blockit.php");
$xajax->registerFunction("BlockPlayer");
$xajax->registerFunction("LoadServers2");
$xajax->processRequests();
$username = $userbank->GetProperty("user");

function LoadServers2($check, $type, $length) {
$objResponse = new xajaxResponse();
global $userbank, $username;
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN))
{
$objResponse->redirect("index.php?p=login&m=no_access", 0);
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to use blockit, but doesn't have access.");
return $objResponse;
}
$id = 0;
$servers = $GLOBALS['db']->Execute("SELECT sid, rcon FROM ".DB_PREFIX."_servers WHERE enabled = 1 ORDER BY modid, sid;");
while(!$servers->EOF) {
//search for player
if(!empty($servers->fields["rcon"])) {
$text = '<font size="1">Searching...</font>';
$objResponse->addScript("xajax_BlockPlayer('".$check."', '".$servers->fields["sid"]."', '".$id."', '".$type."', '".$length."');");
}
else { //no rcon = servercount + 1 ;)
$text = '<font size="1">No rcon password.</font>';
$objResponse->addScript('set_counter(1);');
}
$objResponse->addAssign("srv_".$id, "innerHTML", $text);
$id++;
$servers->MoveNext();
}
return $objResponse;
}

function BlockPlayer($check, $sid, $num, $type, $length) {
$objResponse = new xajaxResponse();
global $userbank, $username;
$sid = (int)$sid;
$length = (int)$length;

if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN))
{
$objResponse->redirect("index.php?p=login&m=no_access", 0);
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to process a playerblock, but doesnt have access.");
return $objResponse;
}

//get the server data
$sdata = $GLOBALS['db']->GetRow("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE sid = '".$sid."';");

//test if server is online
if($test = @fsockopen($sdata['ip'], $sdata['port'], $errno, $errstr, 2)) {
@fclose($test);
require_once(INCLUDES_PATH . "/CServerRcon.php");

$r = new CServerRcon($sdata['ip'], $sdata['port'], $sdata['rcon']);

if(!$r->Auth())
{
$GLOBALS['db']->Execute("UPDATE ".DB_PREFIX."_servers SET rcon = '' WHERE sid = '".$sid."' LIMIT 1;");
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='red' size='1'>Wrong RCON Password, please change!</font>");
$objResponse->addScript('set_counter(1);');
return $objResponse;
}
$ret = $r->rconCommand("status");

// show hostname instead of the ip, but leave the ip in the title
require_once("../includes/system-functions.php");
$hostsearch = preg_match_all('/hostname:[ ]*(.+)/',$ret,$hostname,PREG_PATTERN_ORDER);
$hostname = trunc(htmlspecialchars($hostname[1][0]),25,false);
if(!empty($hostname))
$objResponse->addAssign("srvip_$num", "innerHTML", "<font size='1'><span title='".$sdata['ip'].":".$sdata['port']."'>".$hostname."</span></font>");

$gothim = false;
$search = preg_match_all(STATUS_PARSE,$ret,$matches,PREG_PATTERN_ORDER);
//search for the steamid on the server
foreach($matches[3] AS $match) {
if(substr($match, 8) == substr($check, 8)) {
// gotcha!!! kick him!
$gothim = true;
$GLOBALS['db']->Execute("UPDATE `".DB_PREFIX."_comms` SET sid = '".$sid."' WHERE authid = '".$check."' AND RemovedBy IS NULL;");
$requri = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], "pages/admin.blockit.php"));
$kick = $r->sendCommand("sc_fw_block ".$type." ".$length." ".$match);
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='green' size='1'><b><u>Player Found & blocked!!!</u></b></font>");
$objResponse->addScript("set_counter('-1');");
return $objResponse;
}
}

if(!$gothim) {
$objResponse->addAssign("srv_$num", "innerHTML", "<font size='1'>Player not found.</font>");
$objResponse->addScript('set_counter(1);');
return $objResponse;
}
} else {
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='red' size='1'><i>Can't connect to server.</i></font>");
$objResponse->addScript('set_counter(1);');
return $objResponse;
}
}
$servers = $GLOBALS['db']->Execute("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE enabled = 1 ORDER BY modid, sid;");
$theme->assign('total', $servers->RecordCount());
$serverlinks = array();
$num = 0;
while(!$servers->EOF) {
$info = array();
$info['num'] = $num;
$info['ip'] = $servers->fields["ip"];
$info['port'] = $servers->fields["port"];
array_push($serverlinks, $info);
$num++;
$servers->MoveNext();
}
$theme->assign('servers', $serverlinks);
$theme->assign('xajax_functions', $xajax->printJavascript("../scripts", "xajax.js"));
$theme->assign('check', $_GET["check"]);// steamid or ip address
$theme->assign('type', $_GET['type']);
$theme->assign('length', $_GET['length']);

$theme->left_delimiter = "-{";
$theme->right_delimiter = "}-";
$theme->display('page_blockit.tpl');
$theme->left_delimiter = "{";
$theme->right_delimiter = "}";
?>
93 changes: 93 additions & 0 deletions web_upload/pages/admin.comms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php
/**
* =============================================================================
* Bans page
*
* @author SteamFriends Development Team
* @version 1.0.0
* @copyright SourceBans (C)2007 SteamFriends.com. All rights reserved.
* @package SourceBans
* @link http://www.sourcebans.net
*
* @version $Id: admin.bans.php 286 2009-07-12 18:49:48Z peace-maker $
* =============================================================================
*/

global $userbank, $theme; if(!defined("IN_SB")){echo "You should not be here. Only follow links!";die();}if(isset($GLOBALS['IN_ADMIN']))define('CUR_AID', $userbank->GetAid());


if(isset($_GET["rebanid"]))
{
echo '<script type="text/javascript">xajax_PrepareReblock("'.$_GET["rebanid"].'");</script>';
}elseif(isset($_GET["blockfromban"]))
{
echo '<script type="text/javascript">xajax_PrepareBlockFromBan("'.$_GET["blockfromban"].'");</script>';
}elseif((isset($_GET['action']) && $_GET['action'] == "pasteBan") && isset($_GET['pName']) && isset($_GET['sid'])) {
echo "<script type=\"text/javascript\">ShowBox('Loading..','<b>Loading...</b><br><i>Please Wait!</i>', 'blue', '', true);document.getElementById('dialog-control').setStyle('display', 'none');xajax_PasteBlock('".(int)$_GET['sid']."', '".addslashes($_GET['pName'])."');</script>";
}

echo '<div id="admin-page-content">';
// Add Ban
echo '<div id="0" style="display:none;">';
$theme->assign('permission_addban', $userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN));
$theme->display('page_admin_comms_add.tpl');

?>

<script type="text/javascript">
function changeReason(szListValue)
{
$('dreason').style.display = (szListValue == "other" ? "block" : "none");
}
function ProcessBan()
{
var err = 0;
var reason = $('listReason')[$('listReason').selectedIndex].value;

if (reason == "other")
reason = $('txtReason').value;

if(!$('nickname').value)
{
$('nick.msg').setHTML('You must enter the nickname of the person you are banning');
$('nick.msg').setStyle('display', 'block');
err++;
}else
{
$('nick.msg').setHTML('');
$('nick.msg').setStyle('display', 'none');
}

if($('steam').value.length < 10)
{
$('steam.msg').setHTML('You must enter a valid STEAM ID or Community ID');
$('steam.msg').setStyle('display', 'block');
err++;
}else
{
$('steam.msg').setHTML('');
$('steam.msg').setStyle('display', 'none');
}

if(!reason)
{
$('reason.msg').setHTML('You must select or enter a reason for this block.');
$('reason.msg').setStyle('display', 'block');
err++;
}else
{
$('reason.msg').setHTML('');
$('reason.msg').setStyle('display', 'none');
}

if(err)
return 0;

xajax_AddBlock($('nickname').value,
$('type').value,
$('steam').value,
$('banlength').value,
reason);
}
</script>
</div>
Loading

0 comments on commit 96f87d7

Please sign in to comment.