haji dadash
haji dadash

Reputation: 11

Why 'int' object is not callable?

try:
    from logging import getLogger, ERROR
    getLogger('scapy.runtime').setLevel(ERROR)
    from scapy.all import *
    conf.verb(0)
except ImportError:
    print("[!]failed to import scapy")
    sys.exit(1)

Error:

Traceback (most recent call last):
  File "/home/dontalion/Desktop/python-programming/untitled/test-mitm.py", line 10, in <module>
    conf.verb(0)
TypeError: 'int' object is not callable

Upvotes: 0

Views: 76

Answers (1)

Mihai Chelaru
Mihai Chelaru

Reputation: 8262

Do you perhaps mean to do conf.verb = 0? conf.verb is an integer, so you cannot call it like a function as you are doing with conf.verb(0). You can see this in the source code here.

There's also this Stack Overflow question about setting Scapy's verbosity to 0.

Upvotes: 1

Related Questions