Skip to content

Commit 5e8e957

Browse files
committed
scapy>Scapy
1 parent 5e709c5 commit 5e8e957

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/scapy/usage.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The basic features of sending and receiving packets should still work, though.
3030
Screenshot
3131
----------
3232

33-
If you have installed IPython, scapy will hook to it and you will be able to use auto-completion using the TAB.
33+
If you have installed IPython, Scapy will hook to it and you will be able to use auto-completion using the TAB.
3434

3535
.. image:: graphics/scapy-main-console.png
3636
:align: center
@@ -326,7 +326,7 @@ A DNS query (``rd`` = recursion desired). The host 192.168.5.1 is my DNS server.
326326
an=<DNSRR rrname='www.slashdot.org.' type=A rclass=IN ttl=3560L rdata='66.35.250.151' |>
327327
ns=0 ar=0 |<Padding load='\xc6\x94\xc7\xeb' |>>>>
328328

329-
The "send'n'receive" functions family is the heart of scapy. They return a couple of two lists. The first element is a list of couples (packet sent, answer), and the second element is the list of unanswered packets. These two elements are lists, but they are wrapped by an object to present them better, and to provide them with some methods that do most frequently needed actions::
329+
The "send'n'receive" functions family is the heart of Scapy. They return a couple of two lists. The first element is a list of couples (packet sent, answer), and the second element is the list of unanswered packets. These two elements are lists, but they are wrapped by an object to present them better, and to provide them with some methods that do most frequently needed actions::
330330

331331
>>> sr(IP(dst="192.168.8.1")/TCP(dport=[21,22,23]))
332332
Received 6 packets, got 3 answers, remaining 0 packets
@@ -337,7 +337,7 @@ The "send'n'receive" functions family is the heart of scapy. They return a coupl
337337
IP / TCP 192.168.8.14:20 > 192.168.8.1:22 S ==> Ether / IP / TCP 192.168.8.1:22 > 192.168.8.14:20 RA / Padding
338338
IP / TCP 192.168.8.14:20 > 192.168.8.1:23 S ==> Ether / IP / TCP 192.168.8.1:23 > 192.168.8.14:20 RA / Padding
339339
340-
If there is a limited rate of answers, you can specify a time interval to wait between two packets with the inter parameter. If some packets are lost or if specifying an interval is not enough, you can resend all the unanswered packets, either by calling the function again, directly with the unanswered list, or by specifying a retry parameter. If retry is 3, scapy will try to resend unanswered packets 3 times. If retry is -3, scapy will resend unanswered packets until no more answer is given for the same set of unanswered packets 3 times in a row. The timeout parameter specify the time to wait after the last packet has been sent::
340+
If there is a limited rate of answers, you can specify a time interval to wait between two packets with the inter parameter. If some packets are lost or if specifying an interval is not enough, you can resend all the unanswered packets, either by calling the function again, directly with the unanswered list, or by specifying a retry parameter. If retry is 3, Scapy will try to resend unanswered packets 3 times. If retry is -3, Scapy will resend unanswered packets until no more answer is given for the same set of unanswered packets 3 times in a row. The timeout parameter specify the time to wait after the last packet has been sent::
341341

342342
>>> sr(IP(dst="172.20.29.5/30")/TCP(dport=[21,22,23]),inter=0.5,retry=-2,timeout=1)
343343
Begin emission:
@@ -534,8 +534,8 @@ Configuring super sockets
534534
.. index::
535535
single: super socket
536536

537-
Different super sockets are available in scapy: the native ones, and the ones that use a libpcap provider (that go through libpcap to send/receive packets).
538-
By default, scapy will try to use the native ones (except on Windows, where the winpcap/npcap ones are preferred). To manually use the libpcap ones, you must:
537+
Different super sockets are available in Scapy: the native ones, and the ones that use a libpcap provider (that go through libpcap to send/receive packets).
538+
By default, Scapy will try to use the native ones (except on Windows, where the winpcap/npcap ones are preferred). To manually use the libpcap ones, you must:
539539

540540
* On Unix/OSX: be sure to have libpcap installed, and one of the following as libpcap python wrapper: `pcapy` or `pypcap`
541541
* On Windows: have Npcap/Winpcap installed. (default)
@@ -890,7 +890,7 @@ Making tables
890890

891891
Now we have a demonstration of the ``make_table()`` presentation function. It takes a list as parameter, and a function who returns a 3-uple. The first element is the value on the x axis from an element of the list, the second is about the y value and the third is the value that we want to see at coordinates (x,y). The result is a table. This function has 2 variants, ``make_lined_table()`` and ``make_tex_table()`` to copy/paste into your LaTeX pentest report. Those functions are available as methods of a result object :
892892

893-
Here we can see a multi-parallel traceroute (scapy already has a multi TCP traceroute function. See later)::
893+
Here we can see a multi-parallel traceroute (Scapy already has a multi TCP traceroute function. See later)::
894894

895895
>>> ans, unans = sr(IP(dst="www.test.fr/30", ttl=(1,6))/TCP())
896896
Received 49 packets, got 24 answers, remaining 0 packets
@@ -926,7 +926,7 @@ Routing
926926
.. index::
927927
single: Routing, conf.route
928928

929-
Now scapy has its own routing table, so that you can have your packets routed differently than the system::
929+
Now Scapy has its own routing table, so that you can have your packets routed differently than the system::
930930

931931
>>> conf.route
932932
Network Netmask Gateway Iface
@@ -971,7 +971,7 @@ TCP traceroute (2)
971971
.. index::
972972
single: traceroute(), Traceroute
973973

974-
Scapy also has a powerful TCP traceroute function. Unlike other traceroute programs that wait for each node to reply before going to the next, scapy sends all the packets at the same time. This has the disadvantage that it can't know when to stop (thus the maxttl parameter) but the great advantage that it took less than 3 seconds to get this multi-target traceroute result::
974+
Scapy also has a powerful TCP traceroute function. Unlike other traceroute programs that wait for each node to reply before going to the next, Scapy sends all the packets at the same time. This has the disadvantage that it can't know when to stop (thus the maxttl parameter) but the great advantage that it took less than 3 seconds to get this multi-target traceroute result::
975975

976976
>>> traceroute(["www.yahoo.com","www.altavista.com","www.wisenut.com","www.copernic.com"],maxttl=20)
977977
Received 80 packets, got 80 answers, remaining 0 packets

0 commit comments

Comments
 (0)