KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pf.php 5.4KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. /*************************************************************************************
  3. * pf.php
  4. * --------
  5. * Author: David Berard (david@nfrance.com)
  6. * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2009/10/16
  9. * Based on bash.php
  10. *
  11. * OpenBSD PACKET FILTER language file for GeSHi.
  12. *
  13. * CHANGES
  14. * -------
  15. * 2009/10/16 (1.0.0)
  16. * - First Release
  17. *
  18. * TODO
  19. * -------------------------
  20. * * Support ALTQ
  21. *
  22. *************************************************************************************
  23. *
  24. * This file is part of GeSHi.
  25. *
  26. * GeSHi is free software; you can redistribute it and/or modify
  27. * it under the terms of the GNU General Public License as published by
  28. * the Free Software Foundation; either version 2 of the License, or
  29. * (at your option) any later version.
  30. *
  31. * GeSHi is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU General Public License
  37. * along with GeSHi; if not, write to the Free Software
  38. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  39. *
  40. ************************************************************************************/
  41. $language_data = array (
  42. 'LANG_NAME' => 'OpenBSD Packet Filter',
  43. 'COMMENT_SINGLE' => array('#'),
  44. 'COMMENT_MULTI' => array(),
  45. 'COMMENT_REGEXP' => array(
  46. 1 => "/\\$\\{[^\\n\\}]*?\\}/i",
  47. 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
  48. 3 => "/\\\\['\"]/siU"
  49. ),
  50. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  51. 'QUOTEMARKS' => array('"'),
  52. 'HARDQUOTE' => array("'", "'"),
  53. 'HARDESCAPE' => array("\'"),
  54. 'ESCAPE_CHAR' => '',
  55. 'ESCAPE_REGEXP' => array(
  56. 1 => "#\\\\[nfrtv\\$\\\"\n]#i",
  57. 2 => "#\\$[a-z_][a-z0-9_]*#i",
  58. 3 => "/\\$\\{[^\\n\\}]*?\\}/i",
  59. 4 => "/\\$\\([^\\n\\)]*?\\)/i",
  60. 5 => "/`[^`]*`/"
  61. ),
  62. 'KEYWORDS' => array(
  63. 1 => array(
  64. 'pass'
  65. ),
  66. 2 => array(
  67. 'block'
  68. ),
  69. 3 => array(
  70. 'quick','keep','state','antispoof','table','persist','file','scrub',
  71. 'set','skip','flags','on'
  72. ),
  73. 4 => array(
  74. 'in','out','proto'
  75. )
  76. ),
  77. 'SYMBOLS' => array(
  78. '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`','='
  79. ),
  80. 'CASE_SENSITIVE' => array(
  81. GESHI_COMMENTS => false,
  82. 1 => true,
  83. 2 => true,
  84. 3 => true,
  85. 4 => true
  86. ),
  87. 'STYLES' => array(
  88. 'KEYWORDS' => array(
  89. 1 => 'color: #009900; font-weight: bold;',
  90. 2 => 'color: #990000; font-weight: bold;',
  91. 3 => 'color: #7a0874;',
  92. 4 => 'color: #336699;'
  93. ),
  94. 'COMMENTS' => array(
  95. 0 => 'color: #666666; font-style: italic;',
  96. 1 => 'color: #800000;',
  97. 2 => 'color: #cc0000; font-style: italic;',
  98. 3 => 'color: #000000; font-weight: bold;'
  99. ),
  100. 'ESCAPE_CHAR' => array(
  101. 1 => 'color: #000099; font-weight: bold;',
  102. 2 => 'color: #007800;',
  103. 3 => 'color: #007800;',
  104. 4 => 'color: #007800;',
  105. 5 => 'color: #780078;',
  106. 'HARD' => 'color: #000099; font-weight: bold;'
  107. ),
  108. 'BRACKETS' => array(
  109. 0 => 'color: #7a0874; font-weight: bold;'
  110. ),
  111. 'STRINGS' => array(
  112. 0 => 'color: #CC0000;',
  113. 'HARD' => 'color: #CC0000;'
  114. ),
  115. 'NUMBERS' => array(
  116. 0 => 'color: #ff00cc;'
  117. ),
  118. 'METHODS' => array(
  119. ),
  120. 'SYMBOLS' => array(
  121. 0 => 'color: #000000; font-weight: bold;'
  122. ),
  123. 'REGEXPS' => array(
  124. 0 => 'color: #007800;',
  125. 1 => 'color: #007800;',
  126. 2 => 'color: #007800;',
  127. 4 => 'color: #007800;',
  128. 5 => 'color: #660033;',
  129. 6 => 'color: #000099; font-weight: bold;',
  130. 7 => 'color: #0000ff;',
  131. ),
  132. 'SCRIPT' => array(
  133. )
  134. ),
  135. 'URLS' => array(
  136. 1 => '',
  137. 2 => '',
  138. 3 => '',
  139. 4 => ''
  140. ),
  141. 'OOLANG' => false,
  142. 'OBJECT_SPLITTERS' => array(
  143. ),
  144. 'REGEXPS' => array(
  145. //Variables (will be handled by comment_regexps)
  146. 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
  147. //Variables without braces
  148. 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
  149. //Variable assignment
  150. 2 => "(?<![\.a-zA-Z_\-])([a-zA-Z_][a-zA-Z0-9_]*?)(?==)",
  151. //Shorthand shell variables
  152. 4 => "\\$[*#\$\\-\\?!]",
  153. //Parameters of commands
  154. 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|$)",
  155. //IPs
  156. 6 => "([0-9]{1,3}\.){3}[0-9]{1,3}",
  157. //Tables
  158. 7 => "(&lt;(.*)&gt;)"
  159. ),
  160. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  161. 'SCRIPT_DELIMITERS' => array(
  162. ),
  163. 'HIGHLIGHT_STRICT_BLOCK' => array(
  164. ),
  165. 'TAB_WIDTH' => 4,
  166. 'PARSER_CONTROL' => array(
  167. 'COMMENTS' => array(
  168. 'DISALLOWED_BEFORE' => '$'
  169. ),
  170. 'KEYWORDS' => array(
  171. 'DISALLOWED_BEFORE' => "(?<![\.\-a-zA-Z0-9_\$\#])",
  172. 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%\\/])"
  173. )
  174. )
  175. );
  176. ?>