File: tester.py

package info (click to toggle)
python-tcpwrap 0.2-2.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze, wheezy
  • size: 84 kB
  • ctags: 26
  • sloc: python: 72; makefile: 57; ansic: 24
file content (13 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Test program example for pytcpwrap
# TCPWrap wraps function hosts_ctl()
# for more documentation see man hosts_access(3)

# Note : Deny() and Allow() are checking for the same thing 
# and the two different functions are provided for convenience

from pytcpwrap.tcpwrap import TCPWrap 

print TCPWrap("progname","hostname","192.168.0.33").Deny()

print TCPWrap("progname","hostname","192.168.0.33").Allow()