dimanche 8 juin 2014

Scapy User Input


Vote count:

0




)I just started learning python and have been playing around with scapy. I'm trying to create a scapy python script. It asks the user for 3 inputs.



#! /usr/bin/env python
import sys
from scapy.all import *

dstip= raw_input("Destination IP: ")
dstport= raw_input("Destination Port: ")
message= raw_input("Enter Message: ")

ip=IP(dst=dstip)
tcp=TCP(dport=dstport)
packet=ip/tcp/message

sr1(packet)


I can't seem to figure out why ip=IP(dst=dstip) is not putting in what I input at the prompt. (It just tries to enter as dstip instead of 192.168.100.100). If I were to type this (minus the first 3 lines and the raw inputs) in a scapy prompt it works.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire