05-10-2021, 02:25 PM
Using Webapplication still causes the av.
Maybe there is a simpler way for what I am trying to do. See the code below. It is really just trying to do an additional check for crawlers.
else if (Pos('baidu', luas) > 0)
or (Pos('yandex' , luas) > 0)
or (Pos('naverbot' , luas) > 0)
or (Pos('yeti' , luas) > 0)
or (Pos('seznambot' , luas) > 0)
or (Pos('slurp' , luas) > 0)
or (Pos('teoma' , luas) > 0)
or (Pos('moget' , luas) > 0)
or (Pos('ichiro' , luas) > 0)
or (Pos('sogu' , luas) > 0)
or (Pos('bot' , luas) > 0)
or (Pos('spider' , luas) > 0) then
begin
ASession.Terminate('403 Forbidden. Crawling this site is not allowed!');
rBrowser.destroy;
rBrowser := TInternetExplorer.Create(9);
//Log this session including the uas so you have a record of it
end
Maybe there is a simpler way for what I am trying to do. See the code below. It is really just trying to do an additional check for crawlers.
else if (Pos('baidu', luas) > 0)
or (Pos('yandex' , luas) > 0)
or (Pos('naverbot' , luas) > 0)
or (Pos('yeti' , luas) > 0)
or (Pos('seznambot' , luas) > 0)
or (Pos('slurp' , luas) > 0)
or (Pos('teoma' , luas) > 0)
or (Pos('moget' , luas) > 0)
or (Pos('ichiro' , luas) > 0)
or (Pos('sogu' , luas) > 0)
or (Pos('bot' , luas) > 0)
or (Pos('spider' , luas) > 0) then
begin
ASession.Terminate('403 Forbidden. Crawling this site is not allowed!');
rBrowser.destroy;
rBrowser := TInternetExplorer.Create(9);
//Log this session including the uas so you have a record of it
end

