chq Posted July 30, 2009 Share Posted July 30, 2009 ez bw does anyone have or know where i can find a working stream rippers ban script? i found one yesterday on the winamp forums but its does not seem to work Link to comment Share on other sites More sharing options...
Lloyd Posted July 30, 2009 Share Posted July 30, 2009 ez bw does anyone have or know where i can find a working stream rippers ban script? i found one yesterday on the winamp forums but its does not seem to work [font=verdana] [/font] [font=verdana][font=verdana]error_reporting (E_ALL ^ E_NOTICE); [/font] [font=verdana]// Ban rippers [/font] [font=verdana]// Martin Holk Rasmussen, mhr@tiscali.dk [/font] [font=verdana]// [/font] [font=verdana]// Requires PHP4 or higher. Tested with PHP4.3.2 and SHOUTcast Server Version 1.9.2/Linux [/font] [font=verdana]// Use and modify as you like [/font] [font=verdana]// Server configuration [/font] [font=verdana]$server = 'SERVER IP'; [/font] [font=verdana]$portnumber = 'SERVER PORT'; [/font] [font=verdana]$username = 'SERVER USERNAME'; [/font] [font=verdana]$password = 'SERVER PASSWORD'; [/font] [font=verdana]// Send e-mail when some one has been banned. Leave blank to disable. [/font] [font=verdana]$recipient = ''; [/font] [font=verdana]// Array of user agents to look for. [/font] [font=verdana]// Check is case insensitive and partial, so don't put "winamp" as this will ban all listeners using Winamp [/font] [font=verdana]$knownrippers = array ( "BASS", "Streamripper", "FreeAmp", "UnknownPlayer", "Pathfinder", "sr-POSIX", "andycadd1", "AmiNetRadio", "UPLAYER", [/font] [font=verdana]"HiDownload", "jake", "JetAudio", "karrel", "TotalRecorder","engelmann media radio listener", "cr",); [/font] [font=verdana]?> [/font] [font=verdana] [/font] [font=verdana]Ban Rippers [/font] [font=verdana] [/font] [font=verdana][font=verdana]// Get xml stats [/font] [font=verdana]$fp = @fsockopen ($server, $portnumber, $errno, $errstr, 30); [/font] [font=verdana]if (!$fp) { [/font] [font=verdana]print "Could not connect to $server port $portnumber: $errstr ($errno)[/font] [font=verdana]\n"; [/font] [font=verdana]} [/font] [font=verdana]else { [/font] [font=verdana]fputs ($fp, "GET /admin.cgi?mode=viewxml HTTP/1.1\r\nHost: $server:$portnumber\r\nUser-Agent: Mozilla/4.0\r\nAuthorization: Basic ".base64_encode ("$username:$password")."\r\n\r\n"); [/font] [font=verdana]while (!feof($fp)) { [/font] [font=verdana]$xml .= fgets ($fp,128); [/font] [font=verdana]} [/font] [font=verdana]fclose ($fp); [/font] [font=verdana]if (!preg_match ("/(.+)/", $xml, $regs)) { [/font] [font=verdana]print "Could not find information. Possible incorrect username or password."; [/font] [font=verdana]exit; [/font] [font=verdana]} [/font] [font=verdana]$blocks = split ("", $regs[1]); [/font] [font=verdana]array_pop ($blocks); [/font] [font=verdana]// Loop through each listener [/font] [font=verdana]foreach ($blocks as $block) { [/font] [font=verdana]preg_match ("/(.+)/", $block, $regs); [/font] [font=verdana]$useragent = $regs[1]; [/font] [font=verdana]preg_match ("/(.+)/", $block, $regs); [/font] [font=verdana]$pointer = $regs[1]; [/font] [font=verdana]preg_match ("/(.+)/", $block, $regs); [/font] [font=verdana]$hostname = $regs[1]; [/font] [font=verdana]print "Known ripper found: "; [/font] [font=verdana]$ripperfound = false; [/font] [font=verdana]foreach ($knownrippers as $lookfor) { [/font] [font=verdana]if (stristr ($useragent, $lookfor)) { [/font] [font=verdana]$ripperfound = $lookfor; [/font] [font=verdana]} [/font] [font=verdana]} [/font] [font=verdana]// Ripper found. Ban listener. [/font] [font=verdana]if ($ripperfound) { [/font] [font=verdana]print "$ripperfound for pointer $pointer. Banning "; [/font] [font=verdana]$fp = @fsockopen ($server, $portnumber, $errno, $errstr, 30); [/font] [font=verdana]if (!$fp) { [/font] [font=verdana]print "failed[/font] [font=verdana]\n"; [/font] [font=verdana]} [/font] [font=verdana]else { [/font] [font=verdana]fputs ($fp, "GET /admin.cgi?mode=bandst&bandst=$pointer&banmsk=255 HTTP/1.1\r\nHost: $server:$portnumber\r\nUser-Agent: Mozilla/4.0\r\nAuthorization: Basic ".base64_encode ("$username:$password")."\r\n\r\n"); [/font] [font=verdana]fclose ($fp); [/font] [font=verdana]print "successful!"; [/font] [font=verdana]if ($recipient) { [/font] [font=verdana]mail($recipient, "Listener banned", "$hostname\n$useragent", "From: $recipient"); [/font] [font=verdana]} [/font] [font=verdana]} [/font] [font=verdana]} [/font] [font=verdana]else { [/font] [font=verdana]print "No ($useragent)"; [/font] [font=verdana]} [/font] [font=verdana]print "[/font] [font=verdana]\n"; [/font] [font=verdana]} [/font] [font=verdana]} [/font] [font=verdana]?> [/font] [font=verdana] [/font] [font=verdana][/font] from http://forums.streamsolutions.co.uk/archive/index.php/t-2758.html I hope it's what your after. Edit Server needs to have php4 + enabled - Lloyd Link to comment Share on other sites More sharing options...
GKIye Posted July 30, 2009 Share Posted July 30, 2009 Hello, There is one since a while "at" BW who's operational, posted by Me Visit this link : http://forums.broadcastingworld.net/showthread.php?t=8100&highlight=ban+stream Scroll untill my reply and download the .rar file You'll find all details into my reply PS: if you are in need for anything, please use the "search" tool, this gonna help you in most of the cases :D Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
chq Posted July 30, 2009 Author Share Posted July 30, 2009 Hello, There is one since a while "at" BW who's operational, posted by Me Visit this link : http://forums.broadcastingworld.net/showthread.php?t=8100&highlight=ban+stream Scroll untill my reply and download the .rar file You'll find all details into my reply PS: if you are in need for anything, please use the "search" tool, this gonna help you in most of the cases :D cheers 4 this but it does not seem to be working! Link to comment Share on other sites More sharing options...
GKIye Posted July 30, 2009 Share Posted July 30, 2009 It have to work out I am using it and it works fine to Me Be sure to set all your settings into the right way (IP Port etc etc) and adjust all players you are willing to ban if used Important is : your server or webspace has to support php cheers 4 this but it does not seem to be working! Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.