Firefox 定制 useragent

地址栏输入 about:config 进入配置界面,输入 useragent 过滤,找到 general.useragent.extra.firefox,双击即可编辑,想怎么改就怎么改。

我改成 Firefox-JU/2.0.0.4,作用有二:

一是可以从 access_log 里面区分出自己的访问;
二是在屏蔽公司内部的 IP 地址的同时,给自己开个后门。加一个条件就可以了:

<?php
$deny_list = array(
'/^123\.45\./',
'/^234\.56\./'
);if (!preg_match('/ Firefox-JU\//', $_SERVER["HTTP_USER_AGENT"])) { foreach ($deny_list as $deny) {
if (preg_match($deny, $_SERVER['REMOTE_ADDR'])) {
echo '<h1>500 - Internal Server Error</h1>';
exit(1);
}
}}?>

0 Comments so far

  1. There are currently no comments.
Leave a Comment?


« 恶魔附体  —  即将结束租房生活 »

Tags

Blogroll

Fairy World | STUPiD | 阅微草堂 | ShelleX | 流浪五天