From 0ce149b41a10223c75f33a135d0a7ddc6bd2e022 Mon Sep 17 00:00:00 2001 From: Dirk Loss <mail@dirk-loss.de> Date: Wed, 16 Jun 2010 22:47:55 +0200 Subject: [PATCH] Added (simple) module-level docstrings for all modules --- scapy/__init__.py | 5 +++++ scapy/all.py | 3 +++ scapy/ansmachine.py | 4 ++++ scapy/arch/__init__.py | 4 ++++ scapy/arch/bsd.py | 4 +++- scapy/arch/linux.py | 3 +++ scapy/arch/pcapdnet.py | 4 ++++ scapy/arch/solaris.py | 3 +++ scapy/arch/unix.py | 3 +++ scapy/arch/windows/__init__.py | 4 ++++ scapy/as_resolvers.py | 5 +++++ scapy/asn1/__init__.py | 4 ++++ scapy/asn1/asn1.py | 4 ++++ scapy/asn1/ber.py | 4 ++++ scapy/asn1/mib.py | 4 ++++ scapy/asn1fields.py | 4 ++++ scapy/asn1packet.py | 4 ++++ scapy/automaton.py | 4 ++++ scapy/autorun.py | 4 ++++ scapy/base_classes.py | 4 ++++ scapy/config.py | 4 ++++ scapy/crypto/__init__.py | 4 +++- scapy/crypto/cert.py | 4 ++++ scapy/dadict.py | 4 ++++ scapy/data.py | 4 ++++ scapy/error.py | 3 +++ scapy/fields.py | 4 ++++ scapy/layers/__init__.py | 4 ++++ scapy/layers/all.py | 4 ++++ scapy/layers/bluetooth.py | 4 ++++ scapy/layers/dhcp.py | 4 ++++ scapy/layers/dhcp6.py | 4 ++++ scapy/layers/dns.py | 4 ++++ scapy/layers/dot11.py | 4 ++++ scapy/layers/gprs.py | 3 +++ scapy/layers/hsrp.py | 4 ++++ scapy/layers/inet.py | 4 ++++ scapy/layers/inet6.py | 4 ++++ scapy/layers/ir.py | 4 ++++ scapy/layers/isakmp.py | 4 ++++ scapy/layers/l2.py | 4 ++++ scapy/layers/l2tp.py | 6 ++++++ scapy/layers/llmnr.py | 5 +++++ scapy/layers/mgcp.py | 6 ++++++ scapy/layers/mobileip.py | 4 ++++ scapy/layers/netbios.py | 6 ++++++ scapy/layers/netflow.py | 5 +++++ scapy/layers/ntp.py | 4 ++++ scapy/layers/pflog.py | 4 ++++ scapy/layers/ppp.py | 6 ++++++ scapy/layers/radius.py | 4 ++++ scapy/layers/rip.py | 4 ++++ scapy/layers/rtp.py | 4 ++++ scapy/layers/sctp.py | 4 ++++ scapy/layers/sebek.py | 4 ++++ scapy/layers/skinny.py | 6 ++++-- scapy/layers/smb.py | 4 ++++ scapy/layers/snmp.py | 4 ++++ scapy/layers/tftp.py | 4 ++++ scapy/layers/vrrp.py | 4 ++++ scapy/layers/x509.py | 4 ++++ scapy/main.py | 3 +++ scapy/modules/__init__.py | 4 ++++ scapy/modules/geoip.py | 4 ++++ scapy/modules/nmap.py | 4 ++++ scapy/modules/p0f.py | 4 ++++ scapy/modules/queso.py | 4 ++++ scapy/modules/voip.py | 4 ++++ scapy/packet.py | 4 ++++ scapy/plist.py | 5 +++++ scapy/pton_ntop.py | 9 ++++++--- scapy/route.py | 4 ++++ scapy/route6.py | 3 +++ scapy/sendrecv.py | 4 ++++ scapy/supersocket.py | 4 ++++ scapy/themes.py | 3 +++ scapy/tools/UTscapy.py | 3 +++ scapy/tools/__init__.py | 4 ++++ scapy/utils.py | 4 ++++ scapy/utils6.py | 3 +++ scapy/volatile.py | 4 ++++ setup.py | 4 ++++ 82 files changed, 330 insertions(+), 7 deletions(-) diff --git a/scapy/__init__.py b/scapy/__init__.py index 9e773ac6..443b3675 100644 --- a/scapy/__init__.py +++ b/scapy/__init__.py @@ -3,7 +3,12 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Scapy: create, send, sniff, dissect and manipulate network packets. +Usable either from an interactive console or as a Python library. +http://www.secdev.org/projects/scapy +""" if __name__ == "__main__": from scapy.main import interact diff --git a/scapy/all.py b/scapy/all.py index f6cf00ec..e0af8b14 100644 --- a/scapy/all.py +++ b/scapy/all.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Aggregate top level objects from all Scapy modules. +""" from base_classes import * from config import * diff --git a/scapy/ansmachine.py b/scapy/ansmachine.py index 88c7f5d2..2a90adcc 100644 --- a/scapy/ansmachine.py +++ b/scapy/ansmachine.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Answering machines. +""" + ######################## ## Answering machines ## ######################## diff --git a/scapy/arch/__init__.py b/scapy/arch/__init__.py index 0963c8d0..95f95ecf 100644 --- a/scapy/arch/__init__.py +++ b/scapy/arch/__init__.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Operating system specific functionality. +""" + import sys,os,socket from scapy.error import * diff --git a/scapy/arch/bsd.py b/scapy/arch/bsd.py index 0bcb3ae9..1be7bd73 100644 --- a/scapy/arch/bsd.py +++ b/scapy/arch/bsd.py @@ -3,7 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license - +""" +Support for BSD-like operating systems such as FreeBSD, OpenBSD and Mac OS X. +""" LOOPBACK_NAME="lo0" diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py index 4f5bb131..4321bda1 100644 --- a/scapy/arch/linux.py +++ b/scapy/arch/linux.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Linux specific functions. +""" from __future__ import with_statement import sys,os,struct,socket,time diff --git a/scapy/arch/pcapdnet.py b/scapy/arch/pcapdnet.py index 60fe7425..bb2419f9 100644 --- a/scapy/arch/pcapdnet.py +++ b/scapy/arch/pcapdnet.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Packet sending and receiving with libdnet and libpcap/WinPcap. +""" + import time,struct,sys if not sys.platform.startswith("win"): from fcntl import ioctl diff --git a/scapy/arch/solaris.py b/scapy/arch/solaris.py index 3b7e2fe6..3117076a 100644 --- a/scapy/arch/solaris.py +++ b/scapy/arch/solaris.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Customization for the Solaris operation system. +""" # IPPROTO_GRE is missing on Solaris import socket diff --git a/scapy/arch/unix.py b/scapy/arch/unix.py index b13418cf..151a08f5 100644 --- a/scapy/arch/unix.py +++ b/scapy/arch/unix.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Common customizations for all Unix-like operating systems other than Linux +""" import sys,os,struct,socket,time from fcntl import ioctl diff --git a/scapy/arch/windows/__init__.py b/scapy/arch/windows/__init__.py index 06b7d2fa..31808eb8 100755 --- a/scapy/arch/windows/__init__.py +++ b/scapy/arch/windows/__init__.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Customizations needed to support Microsoft Windows. +""" + import os,re,sys,socket,time from glob import glob from scapy.config import conf,ConfClass diff --git a/scapy/as_resolvers.py b/scapy/as_resolvers.py index 7a82ee07..24573c20 100644 --- a/scapy/as_resolvers.py +++ b/scapy/as_resolvers.py @@ -3,6 +3,11 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Resolve Autonomous Systems (AS). +""" + + import socket from config import conf diff --git a/scapy/asn1/__init__.py b/scapy/asn1/__init__.py index a02c8999..4827a588 100644 --- a/scapy/asn1/__init__.py +++ b/scapy/asn1/__init__.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Package holding ASN.1 related modules. +""" + # We do not import mib.py because it is more bound to scapy and # less prone to be used in a standalone fashion __all__ = ["asn1","ber"] diff --git a/scapy/asn1/asn1.py b/scapy/asn1/asn1.py index f333cbe3..bad7b2cf 100644 --- a/scapy/asn1/asn1.py +++ b/scapy/asn1/asn1.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +ASN.1 (Abstract Syntax Notation One) +""" + import random from scapy.config import conf from scapy.error import Scapy_Exception,warning diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py index 1e66ffd7..2312e025 100644 --- a/scapy/asn1/ber.py +++ b/scapy/asn1/ber.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Basic Encoding Rules (BER) for ASN.1 +""" + from scapy.error import warning from scapy.utils import inet_aton,inet_ntoa from asn1 import ASN1_Decoding_Error,ASN1_Encoding_Error,ASN1_BadTag_Decoding_Error,ASN1_Codecs,ASN1_Class_UNIVERSAL,ASN1_Error,ASN1_DECODING_ERROR,ASN1_BADTAG diff --git a/scapy/asn1/mib.py b/scapy/asn1/mib.py index c5396556..8531fcf2 100644 --- a/scapy/asn1/mib.py +++ b/scapy/asn1/mib.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Management Information Base (MIB) parsing +""" + import re from glob import glob from scapy.dadict import DADict,fixname diff --git a/scapy/asn1fields.py b/scapy/asn1fields.py index c32fbe31..6849ffed 100644 --- a/scapy/asn1fields.py +++ b/scapy/asn1fields.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Classes that implement ASN.1 data structures. +""" + from asn1.asn1 import * from asn1.ber import * from volatile import * diff --git a/scapy/asn1packet.py b/scapy/asn1packet.py index dc900b0a..57287491 100644 --- a/scapy/asn1packet.py +++ b/scapy/asn1packet.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Packet holding data in Abstract Syntax Notation (ASN.1). +""" + from packet import * class ASN1_Packet(Packet): diff --git a/scapy/automaton.py b/scapy/automaton.py index 332709d3..7502ac51 100644 --- a/scapy/automaton.py +++ b/scapy/automaton.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Automata with states, transitions and actions. +""" + from __future__ import with_statement import types,itertools,time,os,sys,socket from select import select diff --git a/scapy/autorun.py b/scapy/autorun.py index 85eec936..a4534949 100644 --- a/scapy/autorun.py +++ b/scapy/autorun.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Run commands when the Scapy interpreter starts. +""" + import code,sys from config import conf from themes import * diff --git a/scapy/base_classes.py b/scapy/base_classes.py index c2fa4b73..e54428a2 100644 --- a/scapy/base_classes.py +++ b/scapy/base_classes.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Generators and packet meta classes. +""" + ############### ## Generators ## ################ diff --git a/scapy/config.py b/scapy/config.py index 394221db..ae9ae17a 100644 --- a/scapy/config.py +++ b/scapy/config.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Implementation for of the configuration object. +""" + import os,time,socket,sys from data import * import base_classes diff --git a/scapy/crypto/__init__.py b/scapy/crypto/__init__.py index a29ecf8d..b441863e 100644 --- a/scapy/crypto/__init__.py +++ b/scapy/crypto/__init__.py @@ -3,7 +3,9 @@ ## Copyright (C) Arnaud Ebalard <arno@natisbad.org> ## This program is published under a GPLv2 license - +""" +Tools for handling with digital certificates. +""" try: import Crypto diff --git a/scapy/crypto/cert.py b/scapy/crypto/cert.py index b10b4ee5..3d254fa3 100644 --- a/scapy/crypto/cert.py +++ b/scapy/crypto/cert.py @@ -3,6 +3,10 @@ ## Copyright (C) Arnaud Ebalard <arno@natisbad.org> ## This program is published under a GPLv2 license +""" +Cryptographic certificates. +""" + import os, sys, math, socket, struct, sha, hmac, string, time import random, popen2, tempfile from scapy.utils import strxor diff --git a/scapy/dadict.py b/scapy/dadict.py index 0ba66a6e..dcfd2a77 100644 --- a/scapy/dadict.py +++ b/scapy/dadict.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Direct Access dictionary. +""" + from error import Scapy_Exception ############################### diff --git a/scapy/data.py b/scapy/data.py index 820232f9..de01cfc9 100644 --- a/scapy/data.py +++ b/scapy/data.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Global variables and functions for handling external data sets. +""" + import os,sys,re from dadict import DADict from error import log_loading diff --git a/scapy/error.py b/scapy/error.py index b97c8a94..29ebc1ba 100644 --- a/scapy/error.py +++ b/scapy/error.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Logging subsystem and basic exception class. +""" ############################# ##### Logging subsystem ##### diff --git a/scapy/fields.py b/scapy/fields.py index 7989a673..a700a73d 100644 --- a/scapy/fields.py +++ b/scapy/fields.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Fields: basic data structures that make up parts of packets. +""" + import struct,copy,socket from config import conf from volatile import * diff --git a/scapy/layers/__init__.py b/scapy/layers/__init__.py index 881e0e30..a3f2afb9 100644 --- a/scapy/layers/__init__.py +++ b/scapy/layers/__init__.py @@ -2,3 +2,7 @@ ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license + +""" +Layer package. +""" diff --git a/scapy/layers/all.py b/scapy/layers/all.py index 6251c2a5..c6bb3791 100644 --- a/scapy/layers/all.py +++ b/scapy/layers/all.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +All layers. Configurable with conf.load_layers. +""" + from scapy.config import conf from scapy.error import log_loading diff --git a/scapy/layers/bluetooth.py b/scapy/layers/bluetooth.py index 89757a98..40828f4b 100644 --- a/scapy/layers/bluetooth.py +++ b/scapy/layers/bluetooth.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Bluetooth layers, sockets and send/receive functions. +""" + import socket,struct from scapy.config import conf diff --git a/scapy/layers/dhcp.py b/scapy/layers/dhcp.py index a542e889..ee8645d6 100644 --- a/scapy/layers/dhcp.py +++ b/scapy/layers/dhcp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +DHCP (Dynamic Host Configuration Protocol) d BOOTP +""" + import struct from scapy.packet import * diff --git a/scapy/layers/dhcp6.py b/scapy/layers/dhcp6.py index 07eee8af..8fa8999e 100644 --- a/scapy/layers/dhcp6.py +++ b/scapy/layers/dhcp6.py @@ -6,6 +6,10 @@ ## Copyright (C) 2005 Guillaume Valadon <guedou@hongo.wide.ad.jp> ## Arnaud Ebalard <arnaud.ebalard@eads.net> +""" +DHCPv6: Dynamic Host Configuration Protocol for IPv6. [RFC 3315] +""" + import socket from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/dns.py b/scapy/layers/dns.py index 7ca570e1..29c8fbeb 100644 --- a/scapy/layers/dns.py +++ b/scapy/layers/dns.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +DNS: Domain Name System. +""" + import socket,struct from scapy.packet import * diff --git a/scapy/layers/dot11.py b/scapy/layers/dot11.py index 5fbf5121..a96def36 100644 --- a/scapy/layers/dot11.py +++ b/scapy/layers/dot11.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Wireless LAN according to IEEE 802.11. +""" + import re,struct from scapy.packet import * diff --git a/scapy/layers/gprs.py b/scapy/layers/gprs.py index fa944d8a..31a931fe 100644 --- a/scapy/layers/gprs.py +++ b/scapy/layers/gprs.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +GPRS (General Packet Radio Service) for mobile data communication. +""" from scapy.fields import * from scapy.packet import * diff --git a/scapy/layers/hsrp.py b/scapy/layers/hsrp.py index 2e7e4a42..c981f39b 100644 --- a/scapy/layers/hsrp.py +++ b/scapy/layers/hsrp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +HSRP (Hot Standby Router Protocol): proprietary redundancy protocol for Cisco routers. +""" + from scapy.fields import * from scapy.packet import * from scapy.layers.inet import UDP diff --git a/scapy/layers/inet.py b/scapy/layers/inet.py index b26a0cd8..0de93e73 100644 --- a/scapy/layers/inet.py +++ b/scapy/layers/inet.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +IPv4 (Internet Protocol v4). +""" + import os,time,struct,re,socket,new from select import select from collections import defaultdict diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index f30ac79a..372dac75 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -19,6 +19,10 @@ ## ## ############################################################################# +""" +IPv6 (Internet Protocol v6). +""" + import socket if not socket.has_ipv6: diff --git a/scapy/layers/ir.py b/scapy/layers/ir.py index daf49a63..fc738c55 100644 --- a/scapy/layers/ir.py +++ b/scapy/layers/ir.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +IrDA infrared data communication. +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.l2 import CookedLinux diff --git a/scapy/layers/isakmp.py b/scapy/layers/isakmp.py index ccbad10d..8fab225c 100644 --- a/scapy/layers/isakmp.py +++ b/scapy/layers/isakmp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +ISAKMP (Internet Security Association and Key Management Protocol). +""" + import struct from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/l2.py b/scapy/layers/l2.py index 6fd1141f..c90545d6 100644 --- a/scapy/layers/l2.py +++ b/scapy/layers/l2.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Classes and functions for layer 2 protocols. +""" + import os,struct,time from scapy.base_classes import Net from scapy.config import conf diff --git a/scapy/layers/l2tp.py b/scapy/layers/l2tp.py index 62c39f4a..0b56db21 100644 --- a/scapy/layers/l2tp.py +++ b/scapy/layers/l2tp.py @@ -3,6 +3,12 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +L2TP (Layer 2 Tunneling Protocol) for VPNs. + +[RFC 2661] +""" + import struct from scapy.packet import * diff --git a/scapy/layers/llmnr.py b/scapy/layers/llmnr.py index 561729c8..f87425ff 100644 --- a/scapy/layers/llmnr.py +++ b/scapy/layers/llmnr.py @@ -3,6 +3,11 @@ from scapy.packet import * from scapy.layers.inet import UDP from scapy.layers.dns import DNSQRField, DNSRRField, DNSRRCountField +""" +LLMNR (Link Local Multicast Node Resolution). + +[RFC 4795] +""" ############################################################################# ### LLMNR (RFC4795) ### diff --git a/scapy/layers/mgcp.py b/scapy/layers/mgcp.py index aee14cab..5d8a064e 100644 --- a/scapy/layers/mgcp.py +++ b/scapy/layers/mgcp.py @@ -3,6 +3,12 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +MGCP (Media Gateway Control Protocol) + +[RFC 2805] +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.inet import UDP diff --git a/scapy/layers/mobileip.py b/scapy/layers/mobileip.py index af818660..bbaa8ce7 100644 --- a/scapy/layers/mobileip.py +++ b/scapy/layers/mobileip.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Mobile IP. +""" + from scapy.fields import * from scapy.packet import * from scapy.layers.inet import IP,UDP diff --git a/scapy/layers/netbios.py b/scapy/layers/netbios.py index 3253c52f..605e06f1 100644 --- a/scapy/layers/netbios.py +++ b/scapy/layers/netbios.py @@ -3,6 +3,12 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +NetBIOS over TCP/IP + +[RFC 1001/1002] +""" + import struct from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/netflow.py b/scapy/layers/netflow.py index 02addee5..44567737 100644 --- a/scapy/layers/netflow.py +++ b/scapy/layers/netflow.py @@ -3,6 +3,11 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Cisco NetFlow protocol v1 +""" + + from scapy.fields import * from scapy.packet import * diff --git a/scapy/layers/ntp.py b/scapy/layers/ntp.py index ffebdfc6..6d11966c 100644 --- a/scapy/layers/ntp.py +++ b/scapy/layers/ntp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +NTP (Network Time Protocol). +""" + import time from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/pflog.py b/scapy/layers/pflog.py index 3c62941a..a8fc9fe0 100644 --- a/scapy/layers/pflog.py +++ b/scapy/layers/pflog.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +PFLog: OpenBSD PF packet filter logging. +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.inet import IP diff --git a/scapy/layers/ppp.py b/scapy/layers/ppp.py index 67fc3f2f..50c68465 100644 --- a/scapy/layers/ppp.py +++ b/scapy/layers/ppp.py @@ -3,6 +3,12 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +PPP (Point to Point Protocol) + +[RFC 1661] +""" + import struct from scapy.packet import * from scapy.layers.l2 import * diff --git a/scapy/layers/radius.py b/scapy/layers/radius.py index e3661e01..13239603 100644 --- a/scapy/layers/radius.py +++ b/scapy/layers/radius.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +RADIUS (Remote Authentication Dial In User Service) +""" + import struct from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/rip.py b/scapy/layers/rip.py index 51eab665..baf32336 100644 --- a/scapy/layers/rip.py +++ b/scapy/layers/rip.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +RIP (Routing Information Protocol). +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.inet import UDP diff --git a/scapy/layers/rtp.py b/scapy/layers/rtp.py index 83116f4b..629dccdd 100644 --- a/scapy/layers/rtp.py +++ b/scapy/layers/rtp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +RTP (Real-time Transport Protocol). +""" + from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/sctp.py b/scapy/layers/sctp.py index 82e4e4fb..5e3a1820 100644 --- a/scapy/layers/sctp.py +++ b/scapy/layers/sctp.py @@ -4,6 +4,10 @@ ## Copyright (C) 6WIND <olivier.matz@6wind.com> ## This program is published under a GPLv2 license +""" +SCTP (Stream Control Transmission Protocol). +""" + import struct from scapy.packet import * diff --git a/scapy/layers/sebek.py b/scapy/layers/sebek.py index 2459ae87..c54e6728 100644 --- a/scapy/layers/sebek.py +++ b/scapy/layers/sebek.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Sebek: Linux kernel module for data collection on honeypots. +""" + from scapy.fields import * from scapy.packet import * from scapy.layers.inet import UDP diff --git a/scapy/layers/skinny.py b/scapy/layers/skinny.py index 827c6bc3..9fb6ac06 100644 --- a/scapy/layers/skinny.py +++ b/scapy/layers/skinny.py @@ -3,12 +3,14 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Cisco Skinny protocol. +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.inet import TCP -# Cisco Skinny protocol - # shamelessly ripped from Ethereal dissector skinny_messages = { # Station -> Callmanager diff --git a/scapy/layers/smb.py b/scapy/layers/smb.py index b851f51b..73ebe5b1 100644 --- a/scapy/layers/smb.py +++ b/scapy/layers/smb.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +SMB (Server Message Block), also known as CIFS. +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.netbios import NBTSession diff --git a/scapy/layers/snmp.py b/scapy/layers/snmp.py index 0681825c..2c588250 100644 --- a/scapy/layers/snmp.py +++ b/scapy/layers/snmp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +SNMP (Simple Network Management Protocol). +""" + from scapy.asn1packet import * from scapy.asn1fields import * from scapy.layers.inet import UDP diff --git a/scapy/layers/tftp.py b/scapy/layers/tftp.py index 28c569ed..16a782c2 100644 --- a/scapy/layers/tftp.py +++ b/scapy/layers/tftp.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +TFTP (Trivial File Transfer Protocol). +""" + import os,random from scapy.packet import * from scapy.fields import * diff --git a/scapy/layers/vrrp.py b/scapy/layers/vrrp.py index a08a42f7..f874b352 100644 --- a/scapy/layers/vrrp.py +++ b/scapy/layers/vrrp.py @@ -4,6 +4,10 @@ ## Copyright (C) 6WIND <olivier.matz@6wind.com> ## This program is published under a GPLv2 license +""" +VRRP (Virtual Router Redundancy Protocol). +""" + from scapy.packet import * from scapy.fields import * from scapy.layers.inet import IP diff --git a/scapy/layers/x509.py b/scapy/layers/x509.py index f8388d1d..18aaa5e3 100644 --- a/scapy/layers/x509.py +++ b/scapy/layers/x509.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +X.509 certificates. +""" + from scapy.asn1packet import * from scapy.asn1fields import * diff --git a/scapy/main.py b/scapy/main.py index beb70afa..ec9aee2c 100644 --- a/scapy/main.py +++ b/scapy/main.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Main module for interactive startup. +""" from __future__ import generators import os,sys diff --git a/scapy/modules/__init__.py b/scapy/modules/__init__.py index 881e0e30..6303dad0 100644 --- a/scapy/modules/__init__.py +++ b/scapy/modules/__init__.py @@ -2,3 +2,7 @@ ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license + +""" +Package of extension modules that have to be loaded explicitly. +""" diff --git a/scapy/modules/geoip.py b/scapy/modules/geoip.py index e6359692..8b308a4c 100644 --- a/scapy/modules/geoip.py +++ b/scapy/modules/geoip.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +GeoIP: find out the geographical location of IP addresses +""" + from scapy.data import KnowledgeBase from scapy.config import conf diff --git a/scapy/modules/nmap.py b/scapy/modules/nmap.py index ffed334a..fc53f427 100644 --- a/scapy/modules/nmap.py +++ b/scapy/modules/nmap.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Clone of Nmap's first generation OS fingerprinting. +""" + import os from scapy.data import KnowledgeBase diff --git a/scapy/modules/p0f.py b/scapy/modules/p0f.py index ebcf68d0..21bbd925 100644 --- a/scapy/modules/p0f.py +++ b/scapy/modules/p0f.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Clone of p0f passive OS fingerprinting +""" + from scapy.data import KnowledgeBase from scapy.config import conf from scapy.layers.inet import IP, TCP, TCPOptions diff --git a/scapy/modules/queso.py b/scapy/modules/queso.py index 6284cd90..ebc5486e 100644 --- a/scapy/modules/queso.py +++ b/scapy/modules/queso.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Clone of queso OS fingerprinting +""" + from scapy.data import KnowledgeBase from scapy.config import conf from scapy.layers.inet import IP,TCP diff --git a/scapy/modules/voip.py b/scapy/modules/voip.py index 0d0b4daf..d221ecf2 100644 --- a/scapy/modules/voip.py +++ b/scapy/modules/voip.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +VoIP (Voice over IP) related functions +""" + import os ################### ## Testing stuff ## diff --git a/scapy/packet.py b/scapy/packet.py index 1f51f318..0accd354 100644 --- a/scapy/packet.py +++ b/scapy/packet.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Packet class. Binding mechanism. fuzz() method. +""" + import time,itertools,os from fields import StrField,ConditionalField,Emph,PacketListField from config import conf diff --git a/scapy/plist.py b/scapy/plist.py index 4cb01a7a..0abe460e 100644 --- a/scapy/plist.py +++ b/scapy/plist.py @@ -3,6 +3,11 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +PacketList: holds several packets and allows to do operations on them. +""" + + import os,subprocess from config import conf from base_classes import BasePacket,BasePacketList diff --git a/scapy/pton_ntop.py b/scapy/pton_ntop.py index 8f83697d..1bd88920 100644 --- a/scapy/pton_ntop.py +++ b/scapy/pton_ntop.py @@ -3,11 +3,14 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Convert IPv6 addresses between textual representation and binary. -import socket,struct +These functions are missing when python is compiled +without IPv6 support, on Windows for instance. +""" -# These functions are missing when python is compiled -# without IPv6 support, on Windows for instance +import socket,struct def inet_pton(af, addr): """Convert an IP address from text representation into binary form""" diff --git a/scapy/route.py b/scapy/route.py index d63176c0..52a95629 100644 --- a/scapy/route.py +++ b/scapy/route.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Routing and handling of network interfaces. +""" + import socket from arch import read_routes,get_if_addr,LOOPBACK_NAME from utils import atol,ltoa,itom diff --git a/scapy/route6.py b/scapy/route6.py index 95333990..51116aaf 100644 --- a/scapy/route6.py +++ b/scapy/route6.py @@ -6,6 +6,9 @@ ## Copyright (C) 2005 Guillaume Valadon <guedou@hongo.wide.ad.jp> ## Arnaud Ebalard <arnaud.ebalard@eads.net> +""" +Routing and network interface handling for IPv6. +""" ############################################################################# ############################################################################# diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py index b72d9654..a50bd7e1 100644 --- a/scapy/sendrecv.py +++ b/scapy/sendrecv.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Functions to send and receive packets. +""" + import cPickle,os,sys,time,subprocess from select import select from data import * diff --git a/scapy/supersocket.py b/scapy/supersocket.py index acd49892..c5ebe46a 100644 --- a/scapy/supersocket.py +++ b/scapy/supersocket.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +SuperSocket. +""" + import socket,time from config import conf from data import * diff --git a/scapy/themes.py b/scapy/themes.py index 866de0e1..188fd547 100644 --- a/scapy/themes.py +++ b/scapy/themes.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Color themes for the interactive console. +""" ################## ## Color themes ## diff --git a/scapy/tools/UTscapy.py b/scapy/tools/UTscapy.py index f8790ac8..ff8460c5 100755 --- a/scapy/tools/UTscapy.py +++ b/scapy/tools/UTscapy.py @@ -3,6 +3,9 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Unit testing infrastructure for Scapy +""" import sys,getopt,imp import bz2, base64, os.path, time, traceback, zlib, sha diff --git a/scapy/tools/__init__.py b/scapy/tools/__init__.py index 881e0e30..af6eec74 100644 --- a/scapy/tools/__init__.py +++ b/scapy/tools/__init__.py @@ -2,3 +2,7 @@ ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license + +""" +Additional tools to be run separately +""" diff --git a/scapy/utils.py b/scapy/utils.py index 06f451e0..07e3a8ae 100644 --- a/scapy/utils.py +++ b/scapy/utils.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +General utility functions. +""" + import os,sys,socket,types import random,time import gzip,zlib,cPickle diff --git a/scapy/utils6.py b/scapy/utils6.py index eab813b3..9d12081f 100644 --- a/scapy/utils6.py +++ b/scapy/utils6.py @@ -6,6 +6,9 @@ ## Copyright (C) 2005 Guillaume Valadon <guedou@hongo.wide.ad.jp> ## Arnaud Ebalard <arnaud.ebalard@eads.net> +""" +Utility functions for IPv6. +""" from config import conf from data import * diff --git a/scapy/volatile.py b/scapy/volatile.py index de294593..dcb704c1 100644 --- a/scapy/volatile.py +++ b/scapy/volatile.py @@ -3,6 +3,10 @@ ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license +""" +Fields that hold random numbers. +""" + import random,time,math from base_classes import Net from utils import corrupt_bits,corrupt_bytes diff --git a/setup.py b/setup.py index 92a0c53c..aecd37fb 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,9 @@ #! /usr/bin/env python +""" +Distutils setup file for Scapy. +""" + from distutils import archive_util from distutils import sysconfig -- GitLab