在tkinter中打印scapy函数的结果

时间:2014-01-25 10:40:28

标签: python tkinter scapy

a=lb + "(IP(src='" + SrcIP + "', dst='" + DestIP + "')/TCP(sport=" + SrcPort + ", dport=" + DestPort + ",flags='"+P+""+S+""+A+""+U+""+F+""+R+"'), timeout=" + Timeout + ")"

p=eval(a)

p.show()

tkMessageBox.showinfo(title = "the configuration and results", message = "The configuration is:\nFlags:"+psh+"\n"+syn+"\n"+ack+"\n"+urg+"\n"+fin+"\n"+rst+"\nSource IP:"+SrcIP + "\nDestination IP: " + DestIP + "\nSource Port: " +SrcPort+ "\nDestination port: " + DestPort +  "\nTimeout: " +Timeout+"\nSend/Received method: "+lb+"\t")

如何将p.show()的结果放在tkMessageBox.showinfo中?

1 个答案:

答案 0 :(得分:0)

我认为你不能,因为.show()方法只使用print语句。