Welcome Guest, Not a member yet? Register   Sign In
block hacker
#1

I'm sure there is a better way to do the following. My aim was to stop a hack attempt at the very start, so in routes, at the very top, I have
Code:
$sUrl = strtolower(uri_string());
if(str_starts_with($sUrl,'wp-')  || str_starts_with($sRUrl,'admin')  || str_starts_with($sUrl,'view-')   || str_starts_with($sUrl,'misc/')){
    // definite hacker - set default controller to Controllers/Home which shows simply "Site Under Construction"
    $routes->get('(:any)',$sHackerController );
    $routes->post('(:any)', $sHackerController);
    $routes->put('(:any)', $sHackerController);
    $routes->delete('(:any)', $sHackerController);
    service('auth')->routes($routes);
    return;
}
// and then come the proper routes
what is the right way to do this?
thanks, Bill
Reply
#2

On what level do you define a 'hacker', looks to me like you want to stop the 'auto bots' with directory/credentials sniffing.
Reply
#3

Well I knew it was a bot but I class them all as hacking attempts. Anyway, I've just learned something new from you. So how do i stop the auto bots please?
Thanks, Bill
Reply
#4

This may help you figure it out.

Control bots, spiders, and crawlers
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

Many thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB