Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

client.py import socket s = socket.socket() port = 12345 msg = raw_input(Message to send: ) s.connect(('127.0.0.1', port)) s.send(msg) print s.recv(1024) # close the connection s.close()

client.py import socket s = socket.socket() port = 12345

msg = raw_input("Message to send: ") s.connect(('127.0.0.1', port))

s.send(msg) print s.recv(1024) # close the connection s.close() --------------------------------------

server.py

import socket

last_message = "NONE"

s = socket.socket() print "Socket successfully created" port = 12345

s.bind(('', port)) print "socket binded to %s" %(port) s.listen(5) print "socket is listening"

while True: c, addr = s.accept() print 'Got connection from', addr

print 'Sending last message' c.send(last_message)

msg = c.recv(1024) print 'new message recieved:' print msg last_message = msg c.close()

Given the client and server programs, write a third program to either masquerade or spoof packets. The work must be done from a Kali VM only

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions