Scapy

Description

Scapy is a Python interpreter that enables you to create, forge, or decode packets on the network, to capture packets and analyze them, to dissect the packets, etc. It also allows you to inject packets into the network. It supports a wide number of network protocols and it can handle and manipulate wireless communication packets.

Scapy can be used to perform the jobs done by many network tools, such as nmap, hping, arpscan, and tshark (the command line of wireshark).It is a packet manipulation tool for computer networks,[1][2] written in Python by Philippe Biondi. It can forge or decode packets, send them on the wire, capture them, and match requests and replies. It can also handle tasks like scanning, tracerouting, probing, unit tests, attacks, and network discovery.

It is an interactive packet manipulation program that enables you to sniff, mangle, send network packets ; test equipments ; probe and discover networks ; quickly develop new protocols. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery.

It uses Python dictionaries as the data structure for packets. Each packet is a collection of nested dictionaries with each layer being a child dictionary of the previous layer, built from the lowest layer up.

Usage

Syntax

scapy [-s sessionfile] [-c new_startup_file] [-p new_prestart_file] [-C] [-P]

Options

    -C: do not read startup file
    -P: do not read pre-startup file

Example

Creating Packet Using Scapy

cyborg@cyborg:~$ sudo scapy
Welcome to Scapy (2.2.0-dev)
>>> send(IP(dst="10.0.0.1")/ICMP()/"This is an ICMP packet")
.
Sent 1 packet
0 Comments

Leave a reply

CONTACT US

We're are building as a community and a team. Be a part of it.

Sending

©2017 Ztrela Knowledge Solutions Pvt. Ltd

Log in with your credentials

Forgot your details?