scapy.contrib.socks

SOCKS4/5 Protocol

You can change the server ports that are used in the SOCKS layer by editing. conf.contribs[‘socks’][‘serverports’]

class scapy.contrib.socks.SOCKS

Bases: scapy.packet.Packet

add_payload(payload)
aliastypes
fields_desc
SOCKS fields

vn

ByteEnumField

5

guess_payload_class(pkt)
class scapy.contrib.socks.SOCKS4Reply

Bases: scapy.packet.Packet

aliastypes
fields_desc
SOCKS4Reply fields

cd

ByteEnumField

90

dstport

ShortField

80

dst

IPField

'0.0.0.0'

class scapy.contrib.socks.SOCKS4Request

Bases: scapy.packet.Packet

aliastypes
fields_desc
SOCKS4Request fields

cd

ByteEnumField

1

dstport

ShortField

80

dst

IPField

'0.0.0.0'

userid

StrField

b''

null

ByteField

0

class scapy.contrib.socks.SOCKS5Reply

Bases: scapy.packet.Packet

aliastypes
fields_desc
SOCKS5Reply fields

rep

ByteEnumField

0

res

ByteField

0

atyp

ByteEnumField

1

addr

MultipleTypeField

b''

port

ShortField

80

class scapy.contrib.socks.SOCKS5Request

Bases: scapy.packet.Packet

aliastypes
fields_desc
SOCKS5Request fields

cd

ByteEnumField

0

res

ByteField

0

atyp

ByteEnumField

1

addr

MultipleTypeField

b''

port

ShortField

80

class scapy.contrib.socks.SOCKS5UDP

Bases: scapy.packet.Packet

aliastypes
fields_desc
SOCKS5UDP fields

res

ShortField

0

frag

ByteField

0

atyp

ByteEnumField

1

addr

MultipleTypeField

b''

port

ShortField

80

guess_payload_class(s)