diff --git a/public/blacklist.dat b/public/blacklist.dat new file mode 100644 index 0000000..e69de29 diff --git a/public/blacklist.php b/public/blacklist.php new file mode 100644 index 0000000..0bacce6 --- /dev/null +++ b/public/blacklist.php @@ -0,0 +1,23 @@ +\n"); + while ($line = fgets($fp,255)) { + $u = explode(" ",$line); + $u0 = $u[0]; + if (preg_match("/$u0/",$_SERVER['REMOTE_ADDR'])) {$badbot++;} + } + fclose($fp); + if ($badbot > 0) { /* this is a bad bot, reject it */ + sleep(12); + print ("\n"); + print ("BOT、消えろ\n"); + print ("\n"); + print ("

来たわねwwwwww

\n"); + print ("

残念けど、こちらは人間以外立入錦糸。

\n"); + print ("

オメェーはきゃわいいロリ警察官に報告されたから、早速消えろ!!

\n"); + print ("\n"); + exit; + } +?> diff --git a/public/bot-trap/index.php b/public/bot-trap/index.php new file mode 100644 index 0000000..f214a9c --- /dev/null +++ b/public/bot-trap/index.php @@ -0,0 +1,39 @@ + + + +

ニャンでここに?

+

戻れ

+ \n"); + while ($line = fgets($fp,255)) { + $u = explode(" ",$line); + $u0 = $u[0]; + if (preg_match("/$u0/",$_SERVER['REMOTE_ADDR'])) {$badbot++;} + } + fclose($fp); + if ($badbot == 0) { /* we just see a new bad bot not yet listed ! */ + /* send a mail to hostmaster */ + $tmestamp = time(); + $datum = date("Y-m-d (D) H:i:s",$tmestamp); + $from = "badbot-watch@076.ne.jp"; + $to = "reports@076.ne.jp"; + $subject = "domain-tld alert: bad robot"; + $msg = "A bad robot hit ".$_SERVER['REQUEST_URI']." ".$datum." \n"; + $msg .= "address is ".$_SERVER['REMOTE_ADDR'].", agent is ".$_SERVER['HTTP_USER_AGENT']."\n"; + mail($to, $subject, $msg, "From: $from"); + /* append bad bot address data to blacklist log file: */ + $fp = fopen($filename,'a+'); + fwrite($fp, $_SERVER['REMOTE_ADDR']." - - [".$datum."] ".$_SERVER['REQUEST_METHOD']." ".$_SERVER['REQUEST_URI']." ".$_SERVER['SERVER_PROTOCOL']." ".$_SERVER['HTTP_REFERER']." ".$_SERVER['HTTP_USER_AGENT']."\n"); + fclose($fp); + } + ?> + + diff --git a/public/img/pixel.gif b/public/img/pixel.gif new file mode 100644 index 0000000..670932d Binary files /dev/null and b/public/img/pixel.gif differ diff --git a/public/robots.txt b/public/robots.txt index eb05362..4334ecd 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,2 +1,2 @@ User-agent: * -Disallow: +Disallow: /bot-trap/ diff --git a/resources/views/pages/common/comments.blade.php b/resources/views/pages/common/comments.blade.php index 34d4fba..adf5c68 100644 --- a/resources/views/pages/common/comments.blade.php +++ b/resources/views/pages/common/comments.blade.php @@ -2,9 +2,10 @@

{{ $comment['total'] }} 件のコメント

@if ($isvideo !== 'n') -
+ @csrf @if ($user == new stdClass()) +
名前
@@ -36,7 +37,7 @@
- +
diff --git a/resources/views/theme/techsuwa/site.blade.php b/resources/views/theme/techsuwa/site.blade.php index 05ab0d3..605b209 100644 --- a/resources/views/theme/techsuwa/site.blade.php +++ b/resources/views/theme/techsuwa/site.blade.php @@ -1,4 +1,7 @@ - + @@ -15,9 +18,6 @@ @include('theme.'.env('THEME').'.component.colors') - @include('theme.'.env('THEME').'.component.navbar')
@@ -29,6 +29,11 @@ @include('theme.'.env('THEME').'.component.usermenu')
+ @include('theme.'.env('THEME').'.component.contentedit') @yield('content')
@@ -41,5 +46,8 @@ +