I’m done with PHP hackers

For a while now, I’ve been collecting statistics on requests made to this site that have resulted in 404 “Not Found” errors. The main reason was to make sure that I hadn’t inadvertently misnamed some file or hidden it so that readers don’t get what they were wanting to look at and read, but what instead has happened it that the vast majority of 404s are from script kiddies trying their hardest to hack into some PHP server code that I’m running. Such as WordPress.

Except…

…I am not running a PHP-based site. Never have done, never will. This is not a WordPress site.

Well, I’m done, kiddies. From now on, access PHP files on this site to your heart’s content and all you will see is my “No PHP shit here” page.

To do this, I added a redirection rule to the web.config file:

<rule name="Force PHP file requests to shit page">
  <match url="^.*php$" ignoreCase="true" />
  <action type="Redirect" url="https://boyet.com/DumbAss/NoPHP.html" redirectType="Permanent" />
  <conditions>
    <add input="{HTTP_HOST}" pattern="^(www\.)?boyet\.com$" />
  </conditions>
</rule>

And then I went looking for a quick bit of HTML/CSS to render a simple effective page and found this excellent example by Akash Rajendra, which I modified a little for my purposes. A quick update to Azure and the page is now live.

All done, you may be thinking. Well, yes, as far as my response to PHP script kiddies goes, sure. But … CSS animations? Although I vaguely knew about them, I hadn’t ever come across such a great simple example! The HTML:

<body>
    <div id="main">
        <div class="effoff">
            <h1>No PHP shit here</h1>
        </div>
    </div>
</body>

The CSS:

.effoff {
    display: table-cell;
    vertical-align: middle;
}

.effoff h1 {
    font-size: 50px;
    display: inline-block;
    padding-right: 12px;
    animation: type .5s alternate infinite;
}

@keyframes type {
    from {
        box-shadow: inset -3px 0px 0px #888;
    }

    to {
        box-shadow: inset -3px 0px 0px transparent;
    }
}

Thanks, Akash, you’ve just made me go experiment with them. Be warned…

Disaster

Loading similar posts...   Loading links to posts on similar topics...

No Responses

Feel free to add a comment...

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response