分类 技术文章 下的文章

经测试,以下办法果然有效:

  在网站根目录下的子目录uc_server/data中找到文件config.inc.php,打开它,找到类似以下代码:

define('UC_FOUNDERPW', '256955f2e034sad74f0e2953572ea360');

define('UC_FOUNDERSALT', '217804');

然后用以下代码替换上述代码:

define('UC_FOUNDERPW', '047099adb883dc19616dae0ef2adc5b6');

define('UC_FOUNDERSALT', '311254');

修改完后,Ucenter创始人的密码就变为: 123456789 ,这时可以登录到Ucenter里再把密码改为自己想要的就可以了。

既然网上找不到,只好自己自力更生了!
rewrite ^/index.html$ /index.php last; rewrite ^/category$ /index.php last; rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1 last; rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1 last; rewrite ^/feed-type([^-]+).xml$ /feed.php?type=$1 last; rewrite ^/feed.xml$ /feed.php last; rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last; rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last; rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last; rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3 last; rewrite ^/category-([0-9]+)-b([0-9]+)(.*).html$ /category.php?id=$1&brand=$2 last; rewrite ^/category-([0-9]+)(.*).html$ /category.php?id=$1 last; rewrite ^/goods-([0-9]+)(.*).html$ /goods.php?id=$1 last; rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last; rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)(.*).html$ /article_cat.php?id=$1&page=$2&keywords=$3 last; rewrite ^/article_cat-([0-9]+)-([0-9]+)(.*).html$ /article_cat.php?id=$1&page=$2 last; rewrite ^/article_cat-([0-9]+)(.*).html$ /article_cat.php?id=$1 last; rewrite ^/article-([0-9]+)(.*).html$ /article.php?id=$1 last; rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last; rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html /brand.php?id=$1&cat=$2&page=$3 last; rewrite ^/brand-([0-9]+)-c([0-9]+)(.*).html /brand.php?id=$1&cat=$2 last; rewrite ^/brand-([0-9]+)(.*).html /brand.php?id=$1 last; rewrite ^/tag-(.*).html /search.php?keywords=$1 last; rewrite ^/snatch-([0-9]+).html$ /snatch.php?id=$1 last; rewrite ^/group_buy-([0-9]+).html$ /group_buy.php?act=view&id=$1 last; rewrite ^/auction-([0-9]+).html$ /auction.php?act=view&id=$1 last; rewrite ^/exchange-id([0-9]+)(.*).html$ /exchange.php?id=$1&act=view last; rewrite ^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last; rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last; rewrite ^/exchange-([0-9]+)-([0-9]+)(.*).html$ /exchange.php?cat_id=$1&page=$2 last; rewrite ^/exchange-([0-9]+)(.*).html$ /exchange.php?cat_id=$1 last;

今天进WORDPRESS后台无意看到有可以升级的 一时好奇就升级了 谁知道进后台一看,弹出个大大的红框让升级浏览器,网上一找资料说不支持IE6了,天哪,我一直挺喜欢IE6的啊,尽管那么多人不喜欢IE6可我就是喜欢,就是觉得比IE8 IE9之类的省内存多了,一点就开,我还是很排斥IE8 IE9的。这下咋办?既然升级了就变不回去了,那只好认了,还是换浏览器吧,IE6继续保持,我换OPERA去,要不火狐也行,总之不要IE8,你IE8再好我也不要!要不把WP转到TYPECHO也行!

这个问题很奇怪也很莫名其妙,直到自己有了VPS才知道,原来2003下面居然会有这个问题存在,搞的网站都500错误,想到是数据库连接文件错了,但没想到是IIS在搞鬼,百度了一下,立马找到解决办法:

原因分析:

许多Web页面里要用到诸如../格式的语句(即回到上一层的页面,也就是父路径),而IIS6.0出于安全考虑,这一选项默认是关闭的。

解决方法:

在IIS中属性-> 主目录-> 配置-> 选项中。把”启用父路径“前面打上勾。确认刷新。

当Flash应用程序和页面的其他元素出现重叠时,就会有显示顺序上的问题。默认情况下,Flash应用程序都是优先于其它HTML页面元素而显示在最顶层。要解决这个问题,主要是利用FLASH对象的一个关键属性wmode(window mode)。wmode属性共有三个属性值:Window/Opaque/transparent,在官方文档中已有细致的说明:

* Window: Use the Window value to play a Flash Player movie in its own rectangular window on a web page. This is the default value for wmode and it works the way the classic Flash Player works. This normally provides the fastest animation performance.

* Opaque: By using the Opaque value you can use JavaScript to move or resize movies that don’t need a transparent background. Opaque mode makes the movie hide everything behind it on the page. Additionally, opaque mode moves elements behind Flash movies (for example, with dynamic HTML) to prevent them from showing through.

* Transparent: Transparent mode allows the background of the HTML page, or the DHTML layer underneath the Flash movie or layer, to show through all the transparent portions of the movie. This allows you to overlap the movie with other elements of the HTML page. Animation performance might be slower when you use this value.

“Window”窗口模式是默认值。在 Web 页上用影片自己的矩形窗口来播放应用程序,它表明 Flash 应用程序与 HTML 层没有任何交互,并且始终位于最顶层。

“Opaque”不透明模式。使Flash应用程序隐藏该页面上所有位于它之后的元素内容。

“Transparent”透明模式。使 HTML 页面的底层元素可以透过FLash应用程序的透明部分来进行显示,使用这个模式会降低动画的回放效果。

“Opaque ”和“Transparent ” 都可与 HTML 层交互,所以可以使用z-index属性来控制重叠元素的显示顺序。

wmode属性的用法:

针对IE:在<object></object>内加上参数 <param name="wmode" value="Opaque"  />

针对非IE:在<embed />标签添加属性wmode="Opaque"

成功2XX 成功处理了请求的状态码。
200 服务器已成功处理了请求并提供了请求的网页。
204 服务器成功处理了请求,但没有返回任何内容。
重定向3XX 每次请求中使用重定向不要超过 5 次。
301 请求的网页已永久移动到新位置。当URLs发生变化时,使用301代码。搜索引擎索引中保存新的URL。
302 请求的网页临时移动到新位置。搜索引擎索引中保存原来的URL。
304 如果网页自请求者上次请求后没有更新,则用304代码告诉搜索引擎机器人,可节省带宽和开销。
客户端错误4XX 表示请求可能出错,妨碍了服务器的处理。
400 服务器不理解请求的语法。
403 服务器拒绝请求。
404 服务器找不到请求的网页。服务器上不存在的网页经常会返回此代码。
410 请求的资源永久删除后,服务器返回此响应。该代码与 404(未找到)代码相似,
但在资源以前存在而现在不存在的情况下,有时用来替代404 代码。如果资源已永久删除,应当使用 301 指定资源的新位置。
服务器错误5XX 表示服务器在处理请求时发生内部错误。这些错误可能是服务器本身的错误,而不是请求出错。
500 服务器遇到错误,无法完成请求。
503 服务器目前无法使用(由于超载或停机维护)。通常,这只是暂时状态。

详细分解:

2XX 成功
200 正常;请求已完成。
201 正常;紧接 POST 命令。
202 正常;已接受用于处理,但处理尚未完成。
203 正常;部分信息 — 返回的信息只是一部分。
204 正常;无响应 — 已接收请求,但不存在要回送的信息。
3XX 重定向
301 已移动 — 请求的数据具有新的位置且更改是永久的。
302 已找到 — 请求的数据临时具有不同 URI。
303 请参阅其它 — 可在另一 URI 下找到对请求的响应,且应使用 GET 方法检索此响应。
304 未修改 — 未按预期修改文档。
305 使用代理 — 必须通过位置字段中提供的代理来访问请求的资源。
306 未使用 — 不再使用;保留此代码以便将来使用。
4XX 客户机中出现的错误
400 错误请求 — 请求中有语法问题,或不能满足请求。
401 未授权 — 未授权客户机访问数据。
402 需要付款 — 表示计费系统已有效。
403 禁止 — 即使有授权也不需要访问。
404 找不到 — 服务器找不到给定的资源;文档不存在。
407 代理认证请求 — 客户机首先必须使用代理认证自身。
415 介质类型不受支持 — 服务器拒绝服务请求,因为不支持请求实体的格式。
5XX 服务器中出现的错误
500 内部错误 — 因为意外情况,服务器不能完成请求。
501 未执行 — 服务器不支持请求的工具。
502 错误网关 — 服务器接收到来自上游服务器的无效响应。
503 无法获得服务 — 由于临时过载或维护,服务器无法处理请求。

LINUX VPS和WIN的一样,总是会被无聊的人在扫IP扫ROOT密码和FTP密码,只要花点时间,实际上都能被暴力破解到密码,所以装下面这个防火墙,可以在对方错误次数超过几次就屏蔽他的IP(注意自己不要没事错误很多次,要不然自己也挂了),从而达到增强服务器安全系数的目的。
第一步:
wget http://imcat.in/down/DenyHosts-2.6.tar.gz
这是下载文件
第二步:
tar -zxvf DenyHosts-2.6.tar.gz
这是解压缩
cd DenyHosts-2.6
进入那个解压的目录
python setup.py install
这是安装
安装完了用WINSCP登陆,先返回到根目录(登陆默认不是根目录)
然后进入/usr/share/denyhosts目录找到denyhosts.cfg
下载到本机,用记事本打开,将附件中的配置文件内容复制粘贴进去替换原来内容,然后保存,然后上传覆盖原来的文件。
好了之后重启下防火墙软件
service denyhosts start
OK 防火墙就装成功了
我们以后可以在/etc/这个目录中的hosts.deny这个文件用记事本打开就可以看到有哪些IP曾经攻击过服务器。

配置文件:
############ THESE SETTINGS ARE REQUIRED #################################################################################### # # SECURE_LOG: the log file that contains sshd logging info # if you are not sure, grep "sshd:" /var/log/* # # The file to process can be overridden with the --file command line # argument # # Redhat or Fedora Core: #日志文件,根据这个文件来判断 SECURE_LOG = /var/log/secure # # Mandrake, FreeBSD or OpenBSD: #SECURE_LOG = /var/log/auth.log # # SuSE: #SECURE_LOG = /var/log/messages # # Mac OS X (v10.4 or greater - # also refer to: [url]http://www.denyhosts.net/faq.html#macos[/url] #SECURE_LOG = /private/var/log/asl.log # # Mac OS X (v10.3 or earlier): #SECURE_LOG=/private/var/log/system.log # ######################################################################## ######################################################################## # # HOSTS_DENY: the file which contains restricted host access information # # Most operating systems: #记录屏蔽的IP文件 HOSTS_DENY = /etc/hosts.deny # # Some BSD (FreeBSD) Unixes: #HOSTS_DENY = /etc/hosts.allow # # Another possibility (also see the next option): #HOSTS_DENY = /etc/hosts.evil ####################################################################### ######################################################################## # # PURGE_DENY: removed HOSTS_DENY entries that are older than this time # when DenyHosts is invoked with the --purge flag # # format is: i[dhwmy] # Where 'i' is an integer (eg. 7) # 'm' = minutes # 'h' = hours # 'd' = days # 'w' = weeks # 'y' = years # # never purge: #多久清除屏蔽的IP,我设置一天 PURGE_DENY = 1d # # purge entries older than 1 week #PURGE_DENY = 1w # # purge entries older than 5 days #PURGE_DENY = 5d ####################################################################### ####################################################################### # # PURGE_THRESHOLD: defines the maximum times a host will be purged. # Once this value has been exceeded then this host will not be purged. # Setting this parameter to 0 (the default) disables this feature. # # default: a denied host can be purged/re-added indefinitely #PURGE_THRESHOLD = 0 # # a denied host will be purged at most 2 times. #PURGE_THRESHOLD = 2 # ####################################################################### ####################################################################### # # BLOCK_SERVICE: the service name that should be blocked in HOSTS_DENY # # man 5 hosts_access for details # # eg. sshd: 127.0.0.1 # will block sshd logins from 127.0.0.1 # # To block all services for the offending host: #BLOCK_SERVICE = ALL # To block only sshd: #禁止的服务,我设置为全部,禁止登录SSH和/FTP BLOCK_SERVICE = ALL # To only record the offending host and nothing else (if using # an auxilary file to list the hosts). Refer to: # [url]http://denyhosts.sourceforge.net/faq.html#aux[/url] #BLOCK_SERVICE = # ####################################################################### ####################################################################### # # DENY_THRESHOLD_INVALID: block each host after the number of failed login # attempts has exceeded this value. This value applies to invalid # user login attempts (eg. non-existent user accounts) # #允许无效用户失败的数次 DENY_THRESHOLD_INVALID = 1 # ####################################################################### ####################################################################### # # DENY_THRESHOLD_VALID: block each host after the number of failed # login attempts has exceeded this value. This value applies to valid # user login attempts (eg. user accounts that exist in /etc/passwd) except # for the "root" user #允许普通用户失败的次数 DENY_THRESHOLD_VALID = 1 # ####################################################################### ####################################################################### # # DENY_THRESHOLD_ROOT: block each host after the number of failed # login attempts has exceeded this value. This value applies to # "root" user login attempts only. #允许root用户失败的次数 DENY_THRESHOLD_ROOT = 3 # ####################################################################### ####################################################################### # # DENY_THRESHOLD_RESTRICTED: block each host after the number of failed # login attempts has exceeded this value. This value applies to # usernames that appear in the WORK_DIR/restricted-usernames file only. # DENY_THRESHOLD_RESTRICTED = 1 # ####################################################################### ####################################################################### # # WORK_DIR: the path that DenyHosts will use for writing data to # (it will be created if it does not already exist). # # Note: it is recommended that you use an absolute pathname # for this value (eg. /home/foo/denyhosts/data) # WORK_DIR = /usr/share/denyhosts/data # ####################################################################### ####################################################################### # # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS # # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES|NO # If set to YES, if a suspicious login attempt results from an allowed-host # then it is considered suspicious. If this is NO, then suspicious logins # from allowed-hosts will not be reported. All suspicious logins from # ip addresses that are not in allowed-hosts will always be reported. # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES ###################################################################### ###################################################################### # # HOSTNAME_LOOKUP # # HOSTNAME_LOOKUP=YES|NO # If set to YES, for each IP address that is reported by Denyhosts, # the corresponding hostname will be looked up and reported as well # (if available). #是否做域名反解析 HOSTNAME_LOOKUP=NO # ###################################################################### ###################################################################### # # LOCK_FILE # # LOCK_FILE=/path/denyhosts # If this file exists when DenyHosts is run, then DenyHosts will exit # immediately. Otherwise, this file will be created upon invocation # and deleted upon exit. This ensures that only one instance is # running at a time. # # Redhat/Fedora: LOCK_FILE = /var/lock/subsys/denyhosts # # Debian #LOCK_FILE = /var/run/denyhosts.pid # # Misc #LOCK_FILE = /tmp/denyhosts.lock # ###################################################################### ############ THESE SETTINGS ARE OPTIONAL ############ ####################################################################### # # ADMIN_EMAIL: if you would like to receive emails regarding newly # restricted hosts and suspicious logins, set this address to # match your email address. If you do not want to receive these reports # leave this field blank (or run with the --noemail option) # # Multiple email addresses can be delimited by a comma, eg: # ADMIN_EMAIL = [email]foo@bar.com[/email], [email]bar@foo.com[/email], [email]etc@foobar.com[/email] #管理员Email ADMIN_EMAIL = # ####################################################################### ####################################################################### # # SMTP_HOST and SMTP_PORT: if DenyHosts is configured to email # reports (see ADMIN_EMAIL) then these settings specify the # email server address (SMTP_HOST) and the server port (SMTP_PORT) # # SMTP_HOST = localhost SMTP_PORT = 25 # ####################################################################### ####################################################################### # # SMTP_USERNAME and SMTP_PASSWORD: set these parameters if your # smtp email server requires authentication # #SMTP_USERNAME=foo #SMTP_PASSWORD=bar # ###################################################################### ####################################################################### # # SMTP_FROM: you can specify the "From:" address in messages sent # from DenyHosts when it reports thwarted abuse attempts # SMTP_FROM = DenyHosts <nobody@localhost> # ####################################################################### ####################################################################### # # SMTP_SUBJECT: you can specify the "Subject:" of messages sent # by DenyHosts when it reports thwarted abuse attempts SMTP_SUBJECT = DenyHosts Report # ###################################################################### ###################################################################### # # SMTP_DATE_FORMAT: specifies the format used for the "Date:" header # when sending email messages. # # for possible values for this parameter refer to: man strftime # # the default: # #SMTP_DATE_FORMAT = %a, %d %b %Y %H:%M:%S %z # ###################################################################### ###################################################################### # # SYSLOG_REPORT # # SYSLOG_REPORT=YES|NO # If set to yes, when denied hosts are recorded the report data # will be sent to syslog (syslog must be present on your system). # The default is: NO # #SYSLOG_REPORT=NO # #SYSLOG_REPORT=YES # ###################################################################### ###################################################################### # # ALLOWED_HOSTS_HOSTNAME_LOOKUP # # ALLOWED_HOSTS_HOSTNAME_LOOKUP=YES|NO # If set to YES, for each entry in the WORK_DIR/allowed-hosts file, # the hostname will be looked up. If your versions of tcp_wrappers # and sshd sometimes log hostnames in addition to ip addresses # then you may wish to specify this option. # #ALLOWED_HOSTS_HOSTNAME_LOOKUP=NO # ###################################################################### ###################################################################### # # AGE_RESET_VALID: Specifies the period of time between failed login # attempts that, when exceeded will result in the failed count for # this host to be reset to 0. This value applies to login attempts # to all valid users (those within /etc/passwd) with the # exception of root. If not defined, this count will never # be reset. # # See the comments in the PURGE_DENY section (above) # for details on specifying this value or for complete details # refer to: [url]http://denyhosts.sourceforge.net/faq.html#timespec[/url] # AGE_RESET_VALID=5d # ###################################################################### ###################################################################### # # AGE_RESET_ROOT: Specifies the period of time between failed login # attempts that, when exceeded will result in the failed count for # this host to be reset to 0. This value applies to all login # attempts to the "root" user account. If not defined, # this count will never be reset. # # See the comments in the PURGE_DENY section (above) # for details on specifying this value or for complete details # refer to: [url]http://denyhosts.sourceforge.net/faq.html#timespec[/url] # AGE_RESET_ROOT=25d # ###################################################################### ###################################################################### # # AGE_RESET_RESTRICTED: Specifies the period of time between failed login # attempts that, when exceeded will result in the failed count for # this host to be reset to 0. This value applies to all login # attempts to entries found in the WORK_DIR/restricted-usernames file. # If not defined, the count will never be reset. # # See the comments in the PURGE_DENY section (above) # for details on specifying this value or for complete details # refer to: [url]http://denyhosts.sourceforge.net/faq.html#timespec[/url] # AGE_RESET_RESTRICTED=25d # ###################################################################### ###################################################################### # # AGE_RESET_INVALID: Specifies the period of time between failed login # attempts that, when exceeded will result in the failed count for # this host to be reset to 0. This value applies to login attempts # made to any invalid username (those that do not appear # in /etc/passwd). If not defined, count will never be reset. # # See the comments in the PURGE_DENY section (above) # for details on specifying this value or for complete details # refer to: [url]http://denyhosts.sourceforge.net/faq.html#timespec[/url] # AGE_RESET_INVALID=10d # ###################################################################### ###################################################################### # # RESET_ON_SUCCESS: If this parameter is set to "yes" then the # failed count for the respective ip address will be reset to 0 # if the login is successful. # # The default is RESET_ON_SUCCESS = no # #RESET_ON_SUCCESS = yes # ##################################################################### ###################################################################### # # PLUGIN_DENY: If set, this value should point to an executable # program that will be invoked when a host is added to the # HOSTS_DENY file. This executable will be passed the host # that will be added as it's only argument. # #PLUGIN_DENY=/usr/bin/true # ###################################################################### ###################################################################### # # PLUGIN_PURGE: If set, this value should point to an executable # program that will be invoked when a host is removed from the # HOSTS_DENY file. This executable will be passed the host # that is to be purged as it's only argument. # #PLUGIN_PURGE=/usr/bin/true # ###################################################################### ###################################################################### # # USERDEF_FAILED_ENTRY_REGEX: if set, this value should contain # a regular expression that can be used to identify additional # hackers for your particular ssh configuration. This functionality # extends the built-in regular expressions that DenyHosts uses. # This parameter can be specified multiple times. # See this faq entry for more details: # [url]http://denyhosts.sf.net/faq.html#userdef_regex[/url] # #USERDEF_FAILED_ENTRY_REGEX= # # ###################################################################### ######### THESE SETTINGS ARE SPECIFIC TO DAEMON MODE ########## ####################################################################### # # DAEMON_LOG: when DenyHosts is run in daemon mode (--daemon flag) # this is the logfile that DenyHosts uses to report it's status. # To disable logging, leave blank. (default is: /var/log/denyhosts) # DAEMON_LOG = /var/log/denyhosts # # disable logging: #DAEMON_LOG = # ###################################################################### ####################################################################### # # DAEMON_LOG_TIME_FORMAT: when DenyHosts is run in daemon mode # (--daemon flag) this specifies the timestamp format of # the DAEMON_LOG messages (default is the ISO8061 format: # ie. 2005-07-22 10:38:01,745) # # for possible values for this parameter refer to: man strftime # # Jan 1 13:05:59 #DAEMON_LOG_TIME_FORMAT = %b %d %H:%M:%S # # Jan 1 01:05:59 #DAEMON_LOG_TIME_FORMAT = %b %d %I:%M:%S # ###################################################################### ####################################################################### # # DAEMON_LOG_MESSAGE_FORMAT: when DenyHosts is run in daemon mode # (--daemon flag) this specifies the message format of each logged # entry. By default the following format is used: # # %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s # # Where the "%(asctime)s" portion is expanded to the format # defined by DAEMON_LOG_TIME_FORMAT # # This string is passed to python's logging.Formatter contstuctor. # For details on the possible format types please refer to: # [url]http://docs.python.org/lib/node357.html[/url] # # This is the default: #DAEMON_LOG_MESSAGE_FORMAT = %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s # # ###################################################################### ####################################################################### # # DAEMON_SLEEP: when DenyHosts is run in daemon mode (--daemon flag) # this is the amount of time DenyHosts will sleep between polling # the SECURE_LOG. See the comments in the PURGE_DENY section (above) # for details on specifying this value or for complete details # refer to: [url]http://denyhosts.sourceforge.net/faq.html#timespec[/url] # # DAEMON_SLEEP = 30s # ####################################################################### ####################################################################### # # DAEMON_PURGE: How often should DenyHosts, when run in daemon mode, # run the purge mechanism to expire old entries in HOSTS_DENY # This has no effect if PURGE_DENY is blank. # DAEMON_PURGE = 1h # ####################################################################### ######### THESE SETTINGS ARE SPECIFIC TO ########## ######### DAEMON SYNCHRONIZATION ########## ####################################################################### # # Synchronization mode allows the DenyHosts daemon the ability # to periodically send and receive denied host data such that # DenyHosts daemons worldwide can automatically inform one # another regarding banned hosts. This mode is disabled by # default, you must uncomment SYNC_SERVER to enable this mode. # # for more information, please refer to: # http:/denyhosts.sourceforge.net/faq.html#sync # ####################################################################### ####################################################################### # # SYNC_SERVER: The central server that communicates with DenyHost # daemons. Currently, denyhosts.net is the only available server # however, in the future, it may be possible for organizations to # install their own server for internal network synchronization # # To disable synchronization (the default), do nothing. # # To enable synchronization, you must uncomment the following line: #SYNC_SERVER = [url]http://xmlrpc.denyhosts.net:9911[/url] # ####################################################################### ####################################################################### # # SYNC_INTERVAL: the interval of time to perform synchronizations if # SYNC_SERVER has been uncommented. The default is 1 hour. # #SYNC_INTERVAL = 1h # ####################################################################### ####################################################################### # # SYNC_UPLOAD: allow your DenyHosts daemon to transmit hosts that have # been denied? This option only applies if SYNC_SERVER has # been uncommented. # The default is SYNC_UPLOAD = yes # #SYNC_UPLOAD = no #SYNC_UPLOAD = yes # ####################################################################### ####################################################################### # # SYNC_DOWNLOAD: allow your DenyHosts daemon to receive hosts that have # been denied by others? This option only applies if SYNC_SERVER has # been uncommented. # The default is SYNC_DOWNLOAD = yes # #SYNC_DOWNLOAD = no #SYNC_DOWNLOAD = yes # # # ####################################################################### ####################################################################### # # SYNC_DOWNLOAD_THRESHOLD: If SYNC_DOWNLOAD is enabled this parameter # filters the returned hosts to those that have been blocked this many # times by others. That is, if set to 1, then if a single DenyHosts # server has denied an ip address then you will receive the denied host. # # See also SYNC_DOWNLOAD_RESILIENCY # #SYNC_DOWNLOAD_THRESHOLD = 10 # # The default is SYNC_DOWNLOAD_THRESHOLD = 3 # #SYNC_DOWNLOAD_THRESHOLD = 3 # ####################################################################### ####################################################################### # # SYNC_DOWNLOAD_RESILIENCY: If SYNC_DOWNLOAD is enabled then the # value specified for this option limits the downloaded data # to this resiliency period or greater. # # Resiliency is defined as the timespan between a hackers first known # attack and it's most recent attack. Example: # # If the centralized denyhosts.net server records an attack at 2 PM # and then again at 5 PM, specifying a SYNC_DOWNLOAD_RESILIENCY = 4h # will not download this ip address. # # However, if the attacker is recorded again at 6:15 PM then the # ip address will be downloaded by your DenyHosts instance. # # This value is used in conjunction with the SYNC_DOWNLOAD_THRESHOLD # and only hosts that satisfy both values will be downloaded. # This value has no effect if SYNC_DOWNLOAD_THRESHOLD = 1 # # The default is SYNC_DOWNLOAD_RESILIENCY = 5h (5 hours) # # Only obtain hackers that have been at it for 2 days or more: #SYNC_DOWNLOAD_RESILIENCY = 2d # # Only obtain hackers that have been at it for 5 hours or more: #SYNC_DOWNLOAD_RESILIENCY = 5h # #######################################################################

  tar.gz 是linux和unix下面比较常用的格式,几个命令就可以把文件压缩打包成tar.gz格式,然而这种格式在windows并不多见,WinRAR、WinZip等主流压缩工具可以释放解开,却不能打包生成。但是tar.gz在服务器端却很常用,因为服务器系统linux占了相当的一部分。于是许多习惯用Windows的Web开发人员,在上传网站到空间时可能会遇到这个压缩格式的麻烦。如何生成得到tar.gz压缩包,在网上搜了一下除了复杂的命令行和开源软件之外,似乎没有其他的。偶然发现“7-ZIP”这个软件可以很方便地解决这个问题。

具体步骤如下:

一、安装7-ZIP以后,直接在你想要打包的文件上点右键菜单,会有一个7-ZIP的子菜单栏,类似WinRAR和WinZIP的那种右键菜单。然后选“7-ZIP”->“添加到压缩档案”,在弹出来的窗口里有个“压缩格式”的选项,里面并没有tar.gz格式,没关系,里面有一个Tar格式,第一步就是要先压成tar格式。

二、成功打包为Tar文件后,你可能会发现这个tar文件包和原来的文件大小一样,也就是说tar本身并没有压缩,而是仅仅把它们打包成一个单独的Tar文件。所以需要做第二步,再在这个tar文件上面点右键,选“7-ZIP”->“添加到压缩档案”,这时候弹出的窗口里再看“压缩格式选项”,发现多了两个刚才没有的,其中就包括“GZip”,是的,这一步就是把tar文件继续压缩成GZip。选择“GZip”格式后确定,最后结果就是一个新的tar.gz格式的文件。

经本人测试,兼容各种软件,上传到服务器上也没有问题。整个过程鼠标流,完全不用敲什么命令行。至此,在windows下面得到tar.gz完成。

另外再记下一件事,在Cpanel 11 控制面板下面的File Manager 文件管理器中,有在线打包(Compress)和解压(Extract)功能,支持ZIP和Tar.gz等格式,RAR好像不行。关于这个解压功能的“是否覆盖存在文件”,如果压缩包是ZIP格式会有几行提示说是否要覆盖,不用费力去想怎样才能完成这个选择,实际上这几行字是不能点击的,它会默认选否,不覆盖。那么问题就来了,如果要想覆盖原有的文件怎么办?Cpanel的官方网站什么不说,倒是在某个英文论坛角落找到了答案,就是使用tar.gz格式。tar.gz压缩包释放的时候会默认选覆盖

  这是Teleport Pro软件留下的标记。该软件是离线浏览器,下载完整个网页后,它会在图片或超级链接标签内插入tppabs标签,以记录该图片或超级链接指向的原始地址。因为这个标签不是合法标签,所以普通浏览器会忽略它。你可以通过element.getAttribute("tppabs")在JS中读取这个属性。
可以在 DreamWeaver中使用正则表达式批量清除这种代码.
具体写法如下:
匹配tppabs标签: Teleport Pro
\btppabs="h[^"]*"   替换为:   (空)

匹配javascript代码:   href="javascript:if\(confirm\('htt[^"]*"   替换为   href="../"   注意替换的时候.应该勾选 "使用正则表达式"

EditPlus替换方法:
使用EditPlus批量删除teleport下载页面中的多于标签 在使用teleport下载页面后,链接后面基本上都会添加tppabs="..."的标记,有些站外链接,还会加上javascript:if(confirm(...))window.location=...的语句,使用下面的方法,可以迅速清除这类标签:
用EditPlus打开所有需要修改的文件,按下ctrl+h,勾选'正则表达式',查找内容输入
tppabs="[^"]+"
(注意最前面有空格),替换内容为空,范围选择所有打开的文件,全部替换

查找内容输入   javascript\:if\(confirm\([^)]+\)\)window\.location='([^']+)'   替换内容输入\1,全部替换,ok,上面的信息都被清除

虚拟主机用户导入Mysql大数据库备份方法:

phpmyadmin是个很方便的mysql数据库管理工具,可以用来管理mysql数据库,导入,导出等。 但是phpmyadmin在导入mysql的时候有个问题,如果要导入的数据库文件比较大,那么导入就会失败。下面教大家一个简单有效的办法,可以导入任意大小的mysql数据库,理论上不论您的数据库备份文件多大,都可以导入。

方法如下:
1.将数据库备份文件(如backup.sql)上传至网站根目录。
2.将以下代码保存为mysql.php文件,上传至网站根目录。

system("mysql -hdbhost -udbuser -ppassword dbname < backup.sql");
print "导入成功";
?>

其中
dbhost 改为您的数据库服务器地址(小提示:一般主机默认数据库服务器地址是:localhost)
dbuser 改为您的数据库用户名
password 改为您的数据库用户密码
dbname 改为您的数据库名
backup.sql表示通过ftp上传到网站根目录下数据库文件的文件名(该文件是解压缩后的文件)

3.在浏览器里面访问mysql.php,假设你的网站域名是www.zhsrf.com,那么就在浏览器里面输入http://www.zhsrf.com/mysql.php,只要浏览器一访问这个mysql.php文件,数据就开始导入,数据导入结束后,就会显示“导入成功”的字样。这个时间根据您要导入的数据大小决定,一般时间很短。