--[[ <HCExtension>@name Обход чёрного списка в один клик (E.BlackBypass)@version 0.01@author Anymore@rule ^http://hcblackbypass.@event RequestHeaderReceived</HCExtension> ]]function RequestHeaderReceived() -- изменяем запрос hc.request_header = re.replace(hc.request_header, [[Host: hcblackbypass\.(.*)$]], [[Host: \1]], false) hc.request_header = re.replace(hc.request_header, [[GET http://hcblackbypass\.(.*)$]], [[GET http://\1]], false) -- выполняем основную цель расширения, ставим белый флаг для запроса hc.white_mask="b" -- создаём отладочные сообщения hc.monitor_string = hc.monitor_string..'E.BlackBypass ' t = hc.systime_to_str(os.time(), false) r = re.replace(hc.url, [[http://hcblackbypass\.(.*)$]], [[\1]], false) PutLog(t..' '..hc.user_name..':'..hc.user_ip..' '..r) --hc.put_msg(30, hc.request_header)endfunction PutLog(s) local f = assert(io.open('BlackBypass.log', 'a+')) if not f then return end f:write(s..'\n') f:close()end
<html><head><meta http-equiv="Cache-Control" content="no-cache"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"></head><body><script language="JavaScript"> var reg = /http:\/\/(.*)/; var res = reg.exec(location.href); document.write('[<a href=http://hcblackbypass.'+res[1]+' title="Show blocked page">AD</a>]')</script></body></html>
<html>...</html>
Mon, 15 Apr 2013 21:45:59 local:127.0.0.1 http://handycache.ru/