sample.rules

来自「unix下tftp服务器源码」· RULES 代码 · 共 35 行

RULES
35
字号
# $Id: sample.rules,v 1.1 2001/07/10 22:07:05 hpa Exp $## Sample rule file for the -m (remapping option)## This file has three fields: operation, regex, remapping## The operation is a combination of the following letters:## r - rewrite the matched string with the remapping pattern# i - case-insensitive matching# g - repeat until no match (used with "r")# e - exit (with success) if we match this pattern, do not process#     subsequent rules# s - start over from the first rule if we match this pattern# a - abort (refuse the request) if we match this rule# G - this rule applies to TFTP GET requests only# P - this rule applies to TFTP PUT requests only## The regex is a regular expression in the style of egrep(1).## The remapping is a pattern, all characters are verbatim except \# \0 copies the full string that matched the regex# \1..\9 copies the 9 first (..) expressions in the regex# \\ is an escaped \## "#" begins a comment, unless \-escaped#ri	^[a-z]:				# Remove "drive letters"rg	\\		/		# Convert backslashes to slashesrg	\#		@		# Convert hash marks to @ signsrg	/../		/..no../	# Convert /../ to /..no../e	^ok/				# These are always okr	^[^/]		/tftpboot/\0	# Convert non-absolute filesa	\.pvt$				# Reject requests for private files

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?