Advertisement
Guest User

rule_dnsprofiler.tcl

a guest
Nov 12th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.01 KB | None | 0 0
  1. when RULE_INIT {
  2.     set static::DEBUG 1
  3. }
  4.  
  5. when CLIENT_ACCEPTED {
  6.     virtual vs_googledns_53
  7.     set clientside_datahitcounter 0
  8.     set serverside_datahitcounter 0
  9.    
  10.     array set pmap [call ProtocolProfilerInit::init_dns]
  11. }
  12.  
  13. when CLIENT_DATA { 
  14.     set clientrecord_counter 0
  15.     incr clientside_datahitcounter
  16.  
  17.     set client_payload_in_hex ""
  18.     binary scan [UDP::payload] H* client_payload_in_hex
  19.  
  20.     log -noname local0. "C->S"
  21.     call ProtocolProfilerProcs::mapProtocol 0 $client_payload_in_hex 0 {} "" [array get pmap] $static::DEBUG
  22.     log -noname local0. ""
  23.     log -noname local0. ""
  24.     log -noname local0. ""
  25. }
  26.  
  27. when SERVER_CONNECTED {
  28.  
  29. }
  30.  
  31. when SERVER_DATA {
  32.     set serverrecord_counter 0
  33.     incr serverside_datahitcounter
  34.    
  35.     set server_payload_in_hex ""
  36.     binary scan [UDP::payload] H* server_payload_in_hex
  37.  
  38.     log -noname local0. "S->C"
  39.     call ProtocolProfilerProcs::mapProtocol 0 $server_payload_in_hex 0 {} "" [array get pmap] $static::DEBUG
  40.     log -noname local0. ""
  41.     log -noname local0. ""
  42.     log -noname local0. ""
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement