Closed nagarjung closed 7 years ago
@guedou @nv-anssi : could you please help me on this ?
Hello Nagarjung,
We are not able to reproduce your error. What version of Python do you run?
Nicolas
@nv-anssi : I run python 2.7.6, which version is required to run this tool. FYI, I am not running the tool inside virtualenv. I am running on host machine with python 2.7.6
Hi @nv-anssi : After debugging a bit, I could able to point out the issue
https://github.com/ANSSI-FR/tabi/blob/master/tabi/annotate.py
line 222
if asn in node.data and int(prefix.split("/")[1]) <= node.data[asn]:
-> if asn in node.data and int(prefix.split("/")[1]) <= node.data[asn]:
(Pdb) asn in node.data
True
(Pdb) int(prefix.split("/")[1])
19
(Pdb) node.data[asn]
set(['apnic'])
(Pdb) n
TypeError: 'can only compare to a set'
The value in node.data[asn]
is unexpected. It should be an integer. Could you check that your roa.csv
file is correct (same as the one in the repository)?
Yes the roa.csv file is same as in the repository.
16079,194.209.159.0/24,24,True
16078,80.89.147.0/24,24,True
35545,185.42.222.0/24,24,True
16071,212.234.194.0/24,24,True
35238,77.203.169.0/24,24,True
35238,78.113.119.0/24,24,True
Yes the comparision int(prefix.split("/")[1]) <= node.data[asn]
is throwing an error.
May be problem with data insertion ?
@nv-anssi : Finally caught the issue.
https://github.com/ANSSI-FR/tabi/blob/master/tabi/emulator.py
line 136
funcs.append(partial(annotate_if_roa, ro_rad_tree))
I think wrong object ro_rad_tree
is passed, instead the object should have been roa_rad_tree
funcs.append(partial(annotate_if_roa, roa_rad_tree))
Running hijack detection tool is throwing the error :
Traceback (most recent call last):