// vim: tabstop=2:shiftwidth=2
/**
- * NP_CommentSpamCheck ($Revision: 1.1 $)
+ * NP_CommentSpamCheck ($Revision: 1.2 $)
* by hsur ( http://blog.cles.jp/np_cles )
- * $Id: NP_AddSpamCheckEvent.php,v 1.1 2007-02-02 16:48:25 hsur Exp $
+ * $Id: NP_AddSpamCheckEvent.php,v 1.2 2007-03-06 20:54:37 hsur Exp $
*/
/*
return 'hsur';
}
function getURL() {
- return 'http://blog.cles.jp/';
+ return 'http://blog.cles.jp/np_cles/';
}
function getVersion() {
- return '1.1.0';
+ return '1.2.0';
}
function getDescription() {
return 'Add SpamCheck event';
}
function getEventList() {
- return array ('PreAddComment', 'ValidateForm');
- }
-
- function event_PreAddComment(& $data) {
- global $manager, $member;
- if ($member->isLoggedIn())
- return;
-
- // spamcheck
- $spamcheck = array (
- 'type' => 'comment',
- 'body' => postVar('body'),
- 'author' => $data['comment']['user'],
- 'url' => $data['comment']['userid'],
- 'id' => intval($data['comment']['itemid']),
- 'live' => true,
- 'return' => true,
- //SpamCheck API1 Compat
- 'data' => postVar('body')."\n".$data['comment']['user']."\n".$data['comment']['userid'],
- );
- $manager->notify('SpamCheck', array ('spamcheck' => & $spamcheck));
-
- if (isset ($spamcheck['result']) && $spamcheck['result'] == true) {
- if ($manager->pluginInstalled('NP_Blacklist')) {
- $plugin = & $manager->getPlugin('NP_Blacklist');
- $plugin->_redirect($plugin->getOption('redirect'));
- } else {
- $this->_showForbiddenMessage($spamcheck['message']);
- }
- }
+ return array ('ValidateForm');
}
function event_ValidateForm(& $data) {
global $manager, $member;
if ($member->isLoggedIn())
return;
+
+ $spamcheck = array();
+ switch( $data['type'] ){
+ case 'membermail':
+ $spamcheck = array (
+ 'type' => 'membermail',
+ 'data' => postVar('frommail')."\n".postVar('message'),
+ 'live' => true,
+ 'return' => true,
+ );
+ break;
+ case 'comment':
+ $spamcheck = array (
+ 'type' => 'comment',
+ 'body' => postVar('body'),
+ 'author' => $data['comment']['user'],
+ 'url' => $data['comment']['userid'],
+ 'id' => intval($data['comment']['itemid']),
+ 'live' => true,
+ 'return' => true,
+ //SpamCheck API1 Compat
+ 'data' => postVar('body')."\n".$data['comment']['user']."\n".$data['comment']['userid'],
+ );
+ break;
+ default:
+ return;
+ }
- if ($data['type'] != 'membermail')
- return;
- $spamcheck = array (
- 'type' => 'membermail',
- 'data' => postVar('frommail')."\n".postVar('message'),
- 'live' => true,
- 'return' => true,
- );
$manager->notify('SpamCheck', array ('spamcheck' => & $spamcheck));
- if (isset ($spamcheck['result']) && $spamcheck['result'] == true) {
+ if (isset($spamcheck['result']) && $spamcheck['result'] == true) {
if ($manager->pluginInstalled('NP_Blacklist')) {
$plugin = & $manager->getPlugin('NP_Blacklist');
$plugin->_redirect($plugin->getOption('redirect'));
<?php
/**
- * NP_Blacklist(JP) ($Revision: 1.9 $)
+ * NP_Blacklist(JP) ($Revision: 1.10 $)
* by hsur ( http://blog.cles.jp/np_cles )
- * $Id: NP_Blacklist.php,v 1.9 2007-02-20 08:06:07 hsur Exp $
+ * $Id: NP_Blacklist.php,v 1.10 2007-03-06 20:54:37 hsur Exp $
*
* Based on NP_Blacklist 0.98
* by xiffy
return 'http://blog.cles.jp/np_cles/category/31/subcatid/11';
}
function getVersion() {
- return '1.0.3';
+ return '1.1.0';
}
function getDescription() {
- return '[$Revision: 1.9 $]<br />'.NP_BLACKLIST_description;
+ return '[$Revision: 1.10 $]<br />'.NP_BLACKLIST_description;
}
function supportsFeature($what) {
switch ($what) {
}
}
- // Obsolete
- function event_PreAddComment(& $data) {
- $comment = $data['comment'];
- $result = $this->blacklist('comment', postVar('body')."\n".$comment['host']."\n".$comment['user']."\n".$comment['userid']);
- if ($result) {
- pbl_logspammer('comment: '.$result);
- $this->_redirect($this->getOption('redirect'));
- }
- }
-
- // Obsolete
- function event_ValidateForm(& $data) {
- if ($data['type'] == 'comment') {
- $comment = $data['comment'];
- $result = $this->blacklist('comment', postVar('body')."\n".$comment['host']."\n".$comment['user']."\n".$comment['userid']);
- if ($result) {
- pbl_logspammer('comment: '.$result);
- $this->_redirect($this->getOption('redirect'));
- }
- } else {
- if ($data['type'] == 'membermail') {
- $result = $this->blacklist('membermail', postVar('frommail')."\n".postVar('message'));
- if ($result) {
- pbl_logspammer('membermail: '.$result);
- $this->_redirect($this->getOption('redirect'));
- }
- }
- }
- }
-
- // Obsolete
- function event_PreSkinParse(& $data) {
- $result = $this->blacklist('PreSkinParse', '');
- if ($result) {
- pbl_logspammer('PreSkinParse: '.$result);
- $this->_redirect($this->getOption('redirect'));
- }
- }
-
function blacklist($type, $testString, $ipblock = true) {
global $DIR_PLUGINS, $member;
if ($this->resultCache)
function _initSettings() {
$settingsDir = dirname(__FILE__).'/blacklist/settings/';
- $settings = array ('blacklist.log', 'blockip.pbl', 'matched.pbl', 'blacklist.pbl', 'blacklist.txt', 'suspects.pbl',);
- $personalBlacklist = $settingsDir.'personal_blacklist.pbl';
- $personalBlacklistDist = $settingsDir.'personal_blacklist.pbl.dist';
+ $settings = array (
+ 'blacklist.log',
+ 'blockip.pbl',
+ 'whiteip.pbl',
+ 'matched.pbl',
+ 'blacklist.pbl',
+ 'blacklist.txt',
+ 'suspects.pbl',
+ 'personal_blacklist.pbl',
+ );
// setup settings
if ($this->_is_writable($settingsDir)) {
+ // setup distfile\r foreach (glob($settingsDir.'*.dist') as $distfile) {
+ $userFile = substr($distfile, 0, strlen($distfile)-5);
+ if (!file_exists($userFile)) {
+ if (copy($distfile, $userFile)) {
+ @chmod($userFile, 0666);
+ $this->_warn("'$userFile' ".NP_BLACKLIST_isCreated);
+ } else {
+ $this->_warn("'$userFile' ".NP_BLACKLIST_canNotCreate);
+ }
+ }
+ }
+
foreach ($settings as $setting) {
@touch($settingsDir.$setting);
}
- // setup personal blacklist
- if (!file_exists($personalBlacklist)) {
- if (copy($personalBlacklistDist, $personalBlacklist)) {
- $this->_warn("'$personalBlacklist' ".NP_BLACKLIST_isCreated);
- } else {
- $this->_warn("'$personalBlacklist' ".NP_BLACKLIST_canNotCreate);
- }
- }
}
// check settings
foreach ($settings as $setting) {
$this->_is_writable($settingsDir.$setting);
}
- $this->_is_writable($personalBlacklist);
// setup and check cache dir
$cacheDir = NP_BLACKLIST_CACHE_DIR;
//
// Modified by hsur
// http://blog.cles.jp
-// $Id: blacklist_lib.php,v 1.8 2007-02-20 08:06:07 hsur Exp $
+// $Id: blacklist_lib.php,v 1.9 2007-03-06 20:54:37 hsur Exp $
define('__WEBLOG_ROOT', dirname(dirname(realpath(__FILE__))));
define('__EXT', '/blacklist');
function pbl_checkforspam($text, $ipblock = false, $ipthreshold = 10, $logrule = true) {
// check whether a string contains spam
// if it does, we return the rule that was matched first
- $text = trim($text);
+ // whitelist\r if (pbl_checkIp('white')) {
+ return '';
+ }
+
// first line of defense; block notorious spammers
if ($ipblock) {
- if (pbl_blockIP()) {
+ if (pbl_checkIp()) {
return "<b>".NP_BLACKLIST_ipBlocked."</b>: ".serverVar('REMOTE_ADDR')." (".serverVar('REMOTE_HOST').")";
}
}
$explodedSplitBuffer = explode("/", $expression);
$expression = $explodedSplitBuffer[0];
if (strlen($expression) > 0) {
- if (preg_match("/".trim($expression)."/im", $text)) {
+ if (preg_match("/".trim($expression)."/i", $text)) {
if ($ipblock) {
- pbl_suspectIP($ipthreshold);
+ pbl_suspectIp($ipthreshold);
}
if ($logrule) {
pbl_logRule($expression);
$splitbuffer = explode("####", $buffer);
$expression = $splitbuffer[0];
if (strlen($expression) > 0) {
- if (preg_match("/".trim($expression)."/im", $text)) {
+ if (preg_match("/".trim($expression)."/i", $text)) {
if ($ipblock) {
- pbl_suspectIP($ipthreshold);
+ pbl_suspectIp($ipthreshold);
}
if ($logrule) {
pbl_logRule($expression);
global $g_reOk;
$g_reOk = true;
set_error_handler("_hdl");
- preg_match("/".trim($re)."/im", "");
+ preg_match("/".trim($re)."/i", "");
restore_error_handler();
return $g_reOk;
}
function pbl_getlogfiles(){
$tmp = array();
foreach (glob(__WEBLOG_ROOT.__EXT."/settings/blacklist.log*") as $filename) {
+ @chmod($filename, 0666);
$tmp[$filename] = filemtime($filename);
}
arsort($tmp);
return false;
$spammer_ip = serverVar('REMOTE_ADDR');
- if (strpos($spammer_ip, '127.0.0') !== false) {
- return false;
- }
-
$iprbl = array ('niku.2ch.net', 'list.dsbl.org', 'bsb.spamlookup.net');
list ($a, $b, $c, $d) = explode('.', $spammer_ip);
foreach ($iprbl as $rbl) {
- if (strpos(gethostbyname("$d.$c.$b.$a.$rbl"), '127.0.0') !== false) {
+ if (strpos(gethostbyname("$d.$c.$b.$a.$rbl"), '127.') === 0) {
return array ($rbl, $spammer_ip);
}
}
function check_for_domainrbl($comment_text) {
$domainrbl = array ('rbl.bulkfeeds.jp', 'url.rbl.jp', 'bsb.spamlookup.net');
- $regex_url = "{https?://(?:www\.)?([a-z0-9._-]{2,})(?::[0-9]+)?((?:/[_.!~*a-z0-9;@&=+$,%-]+){0,2})}mi";
+ $regex_url = "{https?://(?:www\.)?([a-z0-9._-]{2,})(?::[0-9]+)?((?:/[_.!~*a-z0-9;@&=+$,%-]+){0,2})}i";
$mk_regex_array = array ();
preg_match_all($regex_url, $comment_text, $mk_regex_array);
$domain_to_test = rtrim($mk_regex_array[1][$cnt], "\\");
foreach ($domainrbl as $rbl) {
if (strlen($domain_to_test) > 3) {
- if (strpos(gethostbyname($domain_to_test.'.'.$rbl), '127.0.0') == !false) {
+ //pbl_log('DNSBL Lookup: ' . $domain_to_test.'.'.$rbl);
+ if (strpos(gethostbyname($domain_to_test.'.'.$rbl), '127.') === 0) {
return array ($rbl, $domain_to_test);
}
}
return false;
}
-function pbl_blockIP() {
+function pbl_checkIp($type = 'block') {
$remote_ip = trim(serverVar('REMOTE_ADDR'));
- $filename = __WEBLOG_ROOT.__EXT."/settings/blockip.pbl";
+ $filename = __WEBLOG_ROOT.__EXT.'/settings/'.$type.'ip.pbl';
$block = false;
// already in ipblock?
if (file_exists($filename)) {
$fp = fopen(__WEBLOG_ROOT.__EXT."/settings/blockip.pbl", "r");
while ($line = trim(fgets($fp, 255))) {
- if (strpos($remote_ip, $line) !== false) {
+ if (pbl_netMatch($line, $remote_ip)) {
$block = true;
}
}
fclose($fp);
} else {
- $fp = fopen(__WEBLOG_ROOT.__EXT."/settings/blockip.pbl", "w");
+ $fp = fopen($filename, "w");
fwrite($fp, "");
fclose($fp);
}
// this list is the first line of defense, so notorious spamming machine will be kicked of real fast
// improves blacklist performance
// possible danger: blacklisting real humans who post on-the-edge comments
-function pbl_suspectIP($threshold, $remote_ip = '') {
+function pbl_suspectIP($threshold, $remote_ip = '', $type = 'block') {
if ($remote_ip == '') {
$remote_ip = serverVar('REMOTE_ADDR');
}
- $filename = __WEBLOG_ROOT.__EXT."/settings/suspects.pbl";
- $blockfile = __WEBLOG_ROOT.__EXT."/settings/blockip.pbl";
- $count = 0;
- // suspectfile ?
- if (!file_exists($filename)) {
- $fp = fopen($filename, "w");
- fwrite($fp, "");
- fclose($fp);
+ if($type == 'white'){
+ $threshold = false;
}
+ \r $blockfile = __WEBLOG_ROOT.__EXT.'/settings/'.$type.'ip.pbl';
+ $filename = __WEBLOG_ROOT.__EXT.'/settings/suspects.pbl';
+ $count = 0;
- $fp = fopen($filename, "r");
- while ($line = fgets($fp, 255)) {
- if (strpos($line, $remote_ip) !== false) {
- $count ++;
+ if( $threshold ){
+ // suspectfile ?
+ if (!file_exists($filename)) {
+ $fp = fopen($filename, "w");
+ fwrite($fp, "");
+ fclose($fp);
+ }
+
+ $fp = fopen($filename, "r");
+ while ($line = fgets($fp, 255)) {
+ if (strpos($line, $remote_ip) === 0) {
+ $count ++;
+ }
}
+ fclose($fp);
}
- fclose($fp);
// not above threshold ? add ip to suspect ...
- if ($count < $threshold) {
+ if ($threshold !== false && $count < $threshold) {
$fp = fopen($filename, 'a+');
fwrite($fp, $remote_ip."\n");
fclose($fp);
} else {
- // remove from suspect to ip-block
- $fp = fopen($filename, "r");
- $rewrite = "";
- while ($line = fgets($fp, 255)) {
- // keep all lines except the catched ip-address
- if (strpos($line, $remote_ip) !== false) {
- $rewrite .= $line;
+ if($threshold !== false){
+ // remove from suspect to ip-block
+ $fp = fopen($filename, "r");
+ $rewrite = "";
+ while ($line = fgets($fp, 255)) {
+ // keep all lines except the catched ip-address
+ if (strpos($line, $remote_ip) === 0) {
+ $rewrite .= $line;
+ }
}
+ fclose($fp);
+ $fp = fopen($filename, "w");
+ fwrite($fp, $rewrite);
+ fclose($fp);
}
- fclose($fp);
- $fp = fopen($filename, "w");
- fwrite($fp, $rewrite);
- fclose($fp);
// transfer to blocked-ip file
$fp = fopen($blockfile, 'a+');
fwrite($fp, $remote_ip."\n");
}
}
-function pbl_showipblock() {
+function pbl_showIp($type = 'block') {
global $pblmessage, $manager;
- $filename = __WEBLOG_ROOT.__EXT."/settings/blockip.pbl";
+ $filename = __WEBLOG_ROOT.__EXT.'/settings/'.$type.'ip.pbl';
$line = 0;
$fp = fopen($filename, 'r');
echo "<tr><td>".$ip."</td><td>[".gethostbyaddr(rtrim($ip))."]</td><td>";
else
echo "<tr><td>".$ip."</td><td>[<em>skipped</em>]</td><td>";
- echo "<a href=\"".htmlspecialchars($manager->addTicketToUrl(serverVar('PHP_SELF')."?action=deleteipblock&line=".$line), ENT_QUOTES)."\">".NP_BLACKLIST_delete."</a>";
+ echo "<a href=\"".htmlspecialchars($manager->addTicketToUrl(serverVar('PHP_SELF').'?action=deleteip'.$type.'&line='.$line), ENT_QUOTES)."\">".NP_BLACKLIST_delete."</a>";
echo "</td></tr>";
}
}
-function pbl_addipblock() {
+function pbl_addIp($type = 'block') {
if (isset ($_POST["ipaddress"])) {
- pbl_suspectIP(0, postVar("ipaddress"));
+ pbl_suspectIP(0, postVar("ipaddress"), $type);
return "<div class=\"pblmessage\">".NP_BLACKLIST_newEntryAdded.": <b>".htmlspecialchars(postVar("ipaddress"), ENT_QUOTES)."</b></div>";
}
return '';
}
-function pbl_deleteipblock() {
+function pbl_deleteIp($type = 'block') {
global $pblmessage;
- $filename = __WEBLOG_ROOT.__EXT."/settings/blockip.pbl";
+ $filename = __WEBLOG_ROOT.__EXT.'/settings/'.$type.'ip.pbl';
if (isset ($_GET["line"])) {
$handle = fopen($filename, "r");
$line = 0;
}
return '';
}
+
+function pbl_netMatch($network, $ip) {
+ if (strpos($network, '/') !== false) {
+ list($network, $mask) = explode('/', $network);
+ $network = ip2long($network);
+ $mask = 0xffffffff << (32 - intval($mask));
+ $ip = ip2long($ip);
+ return ($ip & $mask) == ($network & $mask);
+ }
+ return strpos($ip, $network) === 0;
+}
<h3>バージョン履歴</h3>
+<ul>
+ <li>Version 1.1: (2006/03/**)</li>
+ <li> [Added] IPホワイトリスト機能を追加</li>
+ <li> [Fixed] DNSBLの参照が正常に行われていなかった問題を修正</li>
+ <li> [Fixed] IPアドレスの判定が不適切であった問題を修正</li>
+ <li> [Changed] 正規表現判定の/m修飾子を削除</li>
+ <li> [Changed] ソースコードから不要部分を削除</li>
+</ul>
<ul>
- <li>Version 1.0.0: (2006/02/04)</li>
+ <li>Version 1.0: (2006/02/04)</li>
<li> [Added] .htaccess snipets生成時にorder allow,denyとallow from allを追加</li>
<li> [Added] spam判定時、$spamcheckにメッセージを残すようにした。</li>
<li> [Added] インタフェイスの日本語化</li>
<li> [Changed] Referrerによるブロック機能の廃止</li>
<li> [Added] ログの自動ローテート機能を追加(最大7日分)</li>
<li> [Changed] PreAddCommentとValidateFormへの対応を廃止</li>
+ <li> [Fixed] Rewriteルールを生成の際に規定外の文字が混入していた問題を修正</li>
+ <li> [Fixed] ブラウザがIEの場合に.htaccess生成ボタンがきちんと動作しない問題を修正</li>
+ <li> [Fixed] touch()でエラーが表示される問題を修正</li>
+ <li> [Fixed] mb_string関連のエラーが出る問題を修正しました。</li>
</ul>
+
<ul>
<li>Version 0.98 jp9: (2006/11/26)</li>
<li> [Changed] 正規表現に/m修飾子を追加</li>
// get the plugin options; stored in the DB
$pbl_config['enabled'] = $oPluginAdmin->plugin->getOption('enabled');
$pbl_config['redirect'] = $oPluginAdmin->plugin->getOption('redirect');
- $pbl_config['referrerblock'] = $oPluginAdmin->plugin->getOption('referrerblock');
$pbl_config['ipblock'] = $oPluginAdmin->plugin->getOption('ipblock');
$pbl_config['ipthreshold'] = $oPluginAdmin->plugin->getOption('ipthreshold');
$pbl_config['BulkfeedsKey'] = $oPluginAdmin->plugin->getOption('BulkfeedsKey');
$action = 'testpage';
break;
- case 'addip':
- $tplVars['message'] = pbl_addipblock();
+ case 'addipblock':
+ $tplVars['message'] = pbl_addIp();
$action = 'showipblock';
break;
case 'deleteipblock':
- $tplVars['message'] = pbl_deleteipblock();
+ $tplVars['message'] = pbl_deleteIp();
$action = 'showipblock';
break;
+ case 'addipwhite':
+ $tplVars['message'] = pbl_addIp('white');
+ $action = 'showipwhite';
+ break;
+
+ case 'deleteipwhite':
+ $tplVars['message'] = pbl_deleteIp('white');
+ $action = 'showipwhite';
+ break;
+
case 'htaccess':
$type = '';
if (isset ($_POST["type"])) {
case 'showipblock':
$content = $templateEngine->fetch('ipblock_header', NP_BLACKLIST_TEMPLATEDIR_INDEX);
echo $templateEngine->fill($content, $tplVars, null);
- pbl_showipblock();
+ pbl_showIp();
$content = $templateEngine->fetch('ipblock_footer', NP_BLACKLIST_TEMPLATEDIR_INDEX);
break;
+
+ case 'showipwhite':
+ $content = $templateEngine->fetch('ipwhite_header', NP_BLACKLIST_TEMPLATEDIR_INDEX);
+ echo $templateEngine->fill($content, $tplVars, null);
+ pbl_showIp('white');
+ $content = $templateEngine->fetch('ipwhite_footer', NP_BLACKLIST_TEMPLATEDIR_INDEX);
+ break;
case 'htaccess':
$content = $templateEngine->fetch('htaccess', NP_BLACKLIST_TEMPLATEDIR_INDEX);
--- /dev/null
+127.0.0.0/24
+10.0.0.0/8
+172.16.0.0/12
+192.168.0.0/24
<input type="hidden" name="action" value="htaccess" />
<input type="hidden" name="type" value="reset_rule" />
<input type="submit" name="submit" value="Rewrite¥ë¡¼¥ë¤Î¥ê¥»¥Ã¥È" />
- </form>
+ </form><br />
+ <span style="color: red;">
+ ¥ë¡¼¥ë¤Î¥ê¥»¥Ã¥È¤ò¹Ô¤¦¤È¡¢¤³¤ì¤Þ¤Ç¤ËÃßÀѤµ¤ì¤¿³Æ¥Ç¡¼¥¿¤¬Á´¤Æ¾Ãµî¤µ¤ì¤Þ¤¹¡£<br />
+ ¾Ãµî¤·¤¿¥Ç¡¼¥¿¤ÎÉü³è¤Ï¤Ç¤¤Þ¤»¤ó¤Î¤Ç¤´Ãí°Õ¤¯¤À¤µ¤¤¡£
+ </span>
</div>
\ No newline at end of file
<input type="hidden" name="action" value="htaccess" />
<input type="hidden" name="type" value="reset_rule" />
<input type="submit" name="submit" value="Rewriteルールのリセット" />
- </form>
+ </form><br />
+ <span style="color: red;">
+ ルールのリセットを行うと、これまでに蓄積された各データが全て消去されます。<br />
+ 消去したデータの復活はできませんのでご注意ください。
+ </span>
</div>
\ No newline at end of file
<span style="color: red;">{{message}}</span>
-<h2>Show blocked ip addresses</h2>
+<h2>Show ip blacklist</h2>
+<p>Expression is allowed a front match or CIDR notation (###.###.###.###/##).
+Example 1)10. -> from 10.0.0.0 to 10.255.255.255.255<br />
+Example 2)192.168.1.0/24 -> from 192.168.1.0 to 192.168.1.255</p>
<div class="pbform">
<form action="{{indexurl}}" method="post">
- <input type="hidden" name="action" value="addip" />
+ <input type="hidden" name="action" value="addipblock" />
<input type="hidden" name="ticket" value="{{ticket|}}" />
Add IP to block:
<input class="pbltextinput" type="text" name="ipaddress" />
<span style="color: red;">{{message}}</span>
<h2>IP¥Ö¥é¥Ã¥¯¥ê¥¹¥ÈÊÔ½¸</h2>
+<p>IP¥¢¥É¥ì¥¹¤ÏÁ°Êý°ìÃפ⤷¤¯¤Ï¡¢CIDR·Á¼°(###.###.###.###/##)¤Ç»ØÄê¤Ç¤¤Þ¤¹¡£<br />
+Îã1¡Ë10. -> 10.0.0.0¤«¤é10.255.255.255.255¤Þ¤Ç<br />
+Îã2¡Ë192.168.1.0/24 -> 192.168.1.0¤«¤é192.168.1.255¤Þ¤Ç<p>
<div class="pbform">
<form action="{{indexurl}}" method="post">
- <input type="hidden" name="action" value="addip" />
+ <input type="hidden" name="action" value="addipblock" />
<input type="hidden" name="ticket" value="{{ticket|}}" />
¶Ø»ß¥ê¥¹¥È¤ËÄɲÃ:
<input class="pbltextinput" type="text" name="ipaddress" />
<span style="color: red;">{{message}}</span>
<h2>IPブラックリスト編集</h2>
+<p>IPアドレスは前方一致もしくは、CIDR形式(###.###.###.###/##)で指定できます。<br />
+例1)10. -> 10.0.0.0から10.255.255.255.255まで<br />
+例2)192.168.1.0/24 -> 192.168.1.0から192.168.1.255まで<p>
<div class="pbform">
<form action="{{indexurl}}" method="post">
- <input type="hidden" name="action" value="addip" />
+ <input type="hidden" name="action" value="addipblock" />
<input type="hidden" name="ticket" value="{{ticket|}}" />
禁止リストに追加:
<input class="pbltextinput" type="text" name="ipaddress" />
--- /dev/null
+<span style="color: red;">{{message}}</span>
+<h2>Show ip white list</h2>
+<p>Expression is allowed a front match or CIDR notation (###.###.###.###/##).
+Example 1)10. -> from 10.0.0.0 to 10.255.255.255.255<br />
+Example 2)192.168.1.0/24 -> from 192.168.1.0 to 192.168.1.255<p>
+<div class="pbform">
+ <form action="{{indexurl}}" method="post">
+ <input type="hidden" name="action" value="addipwhite" />
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ Add IP to block:
+ <input class="pbltextinput" type="text" name="ipaddress" />
+ <input type="submit" value="Add" />
+ </form>
+</div>
+
+<h3>These ip-addresses are permitted</h3>
+<p>Even if ip-addresses is listed on blacklist.</p>
+<table>
+ <tr>
+ <th>IP Address</th>
+ <th>reversed lookup</th>
+ <th>deletion</th>
+ </tr>
\ No newline at end of file
--- /dev/null
+<span style="color: red;">{{message}}</span>
+<h2>IP¥Û¥ï¥¤¥È¥ê¥¹¥ÈÊÔ½¸</h2>
+<p>IP¥¢¥É¥ì¥¹¤ÏÁ°Êý°ìÃפ⤷¤¯¤Ï¡¢CIDR·Á¼°(###.###.###.###/##)¤Ç»ØÄê¤Ç¤¤Þ¤¹¡£<br />
+Îã1¡Ë10. -> 10.0.0.0¤«¤é10.255.255.255.255¤Þ¤Ç<br />
+Îã2¡Ë192.168.1.0/24 -> 192.168.1.0¤«¤é192.168.1.255¤Þ¤Ç<p>
+
+<div class="pbform">
+ <form action="{{indexurl}}" method="post">
+ <input type="hidden" name="action" value="addipwhite" />
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ ¥Û¥ï¥¤¥È¥ê¥¹¥È¤ËÄɲÃ:
+ <input class="pbltextinput" type="text" name="ipaddress" />
+ <input type="submit" value="ÄɲÃ" />
+ </form>
+</div>
+
+<h3>°Ê²¼¤ÎIP¥¢¥É¥ì¥¹¤«¤é¤Î¥¢¥¯¥»¥¹¤òµö²Ä¤·¤Æ¤¤¤Þ¤¹</h3>
+<p>¥Ö¥é¥Ã¥¯¥ê¥¹¥È¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¥¢¥¯¥»¥¹¤¬µö²Ä¤µ¤ì¤Þ¤¹<p>
+
+<table>
+ <tr>
+ <th>IP Address</th>
+ <th>¥Û¥¹¥È̾</th>
+ <th>ºï½ü</th>
+ </tr>
\ No newline at end of file
--- /dev/null
+<span style="color: red;">{{message}}</span>
+<h2>IPホワイトリスト編集</h2>
+<p>IPアドレスは前方一致もしくは、CIDR形式(###.###.###.###/##)で指定できます。<br />
+例1)10. -> 10.0.0.0から10.255.255.255.255まで<br />
+例2)192.168.1.0/24 -> 192.168.1.0から192.168.1.255まで<p>
+
+<div class="pbform">
+ <form action="{{indexurl}}" method="post">
+ <input type="hidden" name="action" value="addipwhite" />
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ ホワイトリストに追加:
+ <input class="pbltextinput" type="text" name="ipaddress" />
+ <input type="submit" value="追加" />
+ </form>
+</div>
+
+<h3>以下のIPアドレスからのアクセスを許可しています</h3>
+<p>ブラックリストに掲載されている場合でもアクセスが許可されます<p>
+
+<table>
+ <tr>
+ <th>IP Address</th>
+ <th>ホスト名</th>
+ <th>削除</th>
+ </tr>
\ No newline at end of file
</a>
</li>
<li>
+ <a href="{{indexurl}}?action=showipwhite&ticket={{ticket|}}">
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
+ Edit ip white list
+ </a>
+ </li>
+ <li>
<a href="{{indexurl}}?action=showipblock&ticket={{ticket|}}">
- <img src="{{plugindirurl}}icons/i_log.gif" />
- Show blocked ip addresses
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
+ Show ip black list
</a>
</li>
<li>
</a>
</li>
<li>
+ <a href="{{indexurl}}?action=showipwhite&ticket={{ticket|}}">
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
+ IP¥Û¥ï¥¤¥È¥ê¥¹¥ÈÊÔ½¸
+ </a>
+ </li>
+ <li>
<a href="{{indexurl}}?action=showipblock&ticket={{ticket|}}">
- <img src="{{plugindirurl}}icons/i_log.gif" />
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
IP¥Ö¥é¥Ã¥¯¥ê¥¹¥ÈÊÔ½¸
</a>
</li>
</a>
</li>
<li>
+ <a href="{{indexurl}}?action=showipwhite&ticket={{ticket|}}">
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
+ IPホワイトリスト編集
+ </a>
+ </li>
+ <li>
<a href="{{indexurl}}?action=showipblock&ticket={{ticket|}}">
- <img src="{{plugindirurl}}icons/i_log.gif" />
+ <img src="{{plugindirurl}}icons/i_edit.gif" />
IPブラックリスト編集
</a>
</li>