You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extracting comments always results in an empty string.
Tested with commit 9d63c85
To reproduce the issue see the follwoing example.
A workaround is also included.
importiptc# example code to demonstrate comment extraction failure# All comments of all chains in the filter table should be printed# # iptables -A INPUT -m comment --comment "example comment"chains=iptc.TABLE_FILTER.chainsforchaininchains:
print"Chain: %s"% (chain.name)
forruleinchain.rules:
formatchinrule.matches:
ifmatch.name=="comment":
print"comment1: %s"%match.comment# match.comment is always an empty string# manually extract comment from the buffer# tested on kernel 2.6.32 (amd64)comment="".join(map(chr, match.match_buf[32:]))
print"comment2: %s"%comment# works
Activity
Fix parsing of attributes with quotes.
ldx commentedon May 4, 2012
Good catch. Can you try 1dcf732?
freddy36 commentedon May 7, 2012
Thanks, working great.
Fix RE parsing in IPTCModule.
Merge pull request ldx#4 from WoTTsecurity/pypi