scapy.contrib.tacacs

TACACS

Based on tacacs+ v6 draft https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06

class scapy.contrib.tacacs.TacacsAccountingReply(_pkt, /, *, server_msg_len=None, data_len=None, status=None, server_msg=b'', data=b'')[源代码]

基类:Packet

Tacacs accounting reply body from section 6.2 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-6.2

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SERVER MSG LEN        |            DATA LEN           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     STATUS    |           SERVER MSG          |      DATA     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                    Fig. TacacsAccountingReply                    
TacacsAccountingReply fields

server_msg_len

FieldLenField

None

data_len

FieldLenField

None

status

ByteEnumField

None

server_msg

StrLenField

b''

data

StrLenField

b''

class scapy.contrib.tacacs.TacacsAccountingRequest(_pkt, /, *, flags=0, authen_method=0, priv_lvl=1, authen_type=1, authen_service=1, user_len=None, port_len=None, rem_addr_len=None, arg_cnt=None, arg_len_list=[], user=b'', port=b'', rem_addr=b'')[源代码]

基类:Packet

Tacacs accounting request body from section 6.1 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-6.1

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     | AUTHEN METHOD |    PRIV LVL   |  AUTHEN TYPE  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AUTHEN SERVICE|    USER LEN   |    PORT LEN   |  REM ADDR LEN |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    ARG CNT    |          ARG LEN LIST         |      USER     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |              PORT             |    REM ADDR   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                   Fig. TacacsAccountingRequest                   
TacacsAccountingRequest fields

flags

ByteEnumField

0

authen_method

ByteEnumField

0

priv_lvl

ByteEnumField

1

authen_type

ByteEnumField

1

authen_service

ByteEnumField

1

user_len

FieldLenField

None

port_len

FieldLenField

None

rem_addr_len

FieldLenField

None

arg_cnt

FieldLenField

None

arg_len_list

FieldListField

[]

user

StrLenField

b''

port

StrLenField

b''

rem_addr

StrLenField

b''

guess_payload_class(pay)[源代码]
class scapy.contrib.tacacs.TacacsAuthenticationContinue(_pkt, /, *, user_msg_len=None, data_len=None, flags=1, user_msg=b'', data=b'')[源代码]

基类:Packet

Tacacs authentication continue body from section 4.3 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-4.3

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          USER MSG LEN         |            DATA LEN           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     |            USER MSG           |      DATA     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                Fig. TacacsAuthenticationContinue                 
TacacsAuthenticationContinue fields

user_msg_len

FieldLenField

None

data_len

FieldLenField

None

flags

ByteEnumField

1

user_msg

StrLenField

b''

data

StrLenField

b''

class scapy.contrib.tacacs.TacacsAuthenticationReply(_pkt, /, *, status=1, flags=0, server_msg_len=None, data_len=None, server_msg=b'', data=b'')[源代码]

基类:Packet

Tacacs authentication reply body from section 4.2 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-4.2

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     STATUS    |     FLAGS     |         SERVER MSG LEN        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            DATA LEN           |           SERVER MSG          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TacacsAuthenticationReply                  
TacacsAuthenticationReply fields

status

ByteEnumField

1

flags

ByteEnumField

0

server_msg_len

FieldLenField

None

data_len

FieldLenField

None

server_msg

StrLenField

b''

data

StrLenField

b''

class scapy.contrib.tacacs.TacacsAuthenticationStart(_pkt, /, *, action=1, priv_lvl=1, authen_type=1, authen_service=1, user_len=None, port_len=None, rem_addr_len=None, data_len=None, user=b'', port=b'', rem_addr=b'', data=b'')[源代码]

基类:Packet

Tacacs authentication start body from section 4.1 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-4.1

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     ACTION    |    PRIV LVL   |  AUTHEN TYPE  | AUTHEN SERVICE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    USER LEN   |    PORT LEN   |  REM ADDR LEN |    DATA LEN   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              USER             |              PORT             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            REM ADDR           |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TacacsAuthenticationStart                  
TacacsAuthenticationStart fields

action

ByteEnumField

1

priv_lvl

ByteEnumField

1

authen_type

ByteEnumField

1

authen_service

ByteEnumField

1

user_len

FieldLenField

None

port_len

FieldLenField

None

rem_addr_len

FieldLenField

None

data_len

FieldLenField

None

user

StrLenField (Cond)

b''

port

StrLenField

b''

rem_addr

StrLenField

b''

data

StrLenField

b''

class scapy.contrib.tacacs.TacacsAuthorizationReply(_pkt, /, *, status=0, arg_cnt=None, server_msg_len=None, data_len=None, arg_len_list=[], server_msg=b'', data=b'')[源代码]

基类:Packet

Tacacs authorization reply body from section 5.2 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-5.2

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     STATUS    |    ARG CNT    |         SERVER MSG LEN        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            DATA LEN           |          ARG LEN LIST         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           SERVER MSG          |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TacacsAuthorizationReply                   
TacacsAuthorizationReply fields

status

ByteEnumField

0

arg_cnt

FieldLenField

None

server_msg_len

FieldLenField

None

data_len

FieldLenField

None

arg_len_list

FieldListField

[]

server_msg

StrLenField

b''

data

StrLenField

b''

guess_payload_class(pay)[源代码]
class scapy.contrib.tacacs.TacacsAuthorizationRequest(_pkt, /, *, authen_method=0, priv_lvl=1, authen_type=1, authen_service=1, user_len=None, port_len=None, rem_addr_len=None, arg_cnt=None, arg_len_list=[], user=b'', port=b'', rem_addr=b'')[源代码]

基类:Packet

Tacacs authorization request body from section 5.1 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-5.1

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AUTHEN METHOD |    PRIV LVL   |  AUTHEN TYPE  | AUTHEN SERVICE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    USER LEN   |    PORT LEN   |  REM ADDR LEN |    ARG CNT    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          ARG LEN LIST         |              USER             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PORT             |            REM ADDR           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TacacsAuthorizationRequest                  
TacacsAuthorizationRequest fields

authen_method

ByteEnumField

0

priv_lvl

ByteEnumField

1

authen_type

ByteEnumField

1

authen_service

ByteEnumField

1

user_len

FieldLenField

None

port_len

FieldLenField

None

rem_addr_len

FieldLenField

None

arg_cnt

FieldLenField

None

arg_len_list

FieldListField

[]

user

StrLenField

b''

port

StrLenField

b''

rem_addr

StrLenField

b''

guess_payload_class(pay)[源代码]
class scapy.contrib.tacacs.TacacsClientPacket(_pkt, /)[源代码]

基类:Packet

Super class for tacacs packet in order to get them unencrypted Obfuscation methodology from section 3.7 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-3.7

aliastypes
post_dissect(pay)[源代码]
class scapy.contrib.tacacs.TacacsHeader(_pkt, /, *, version=192, type=1, seq=1, flags=0, session_id=0, length=None)[源代码]

基类:TacacsClientPacket

Tacacs Header packet from section 3.8 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-3.8

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    VERSION    |      TYPE     |      SEQ      |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SESSION ID                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             LENGTH                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. TacacsHeader                         
TacacsHeader fields

version

ByteEnumField

192

type

ByteEnumField

1

seq

ByteField

1

flags

ByteEnumField

0

session_id

IntField

0

length

IntField

None

guess_payload_class(payload)[源代码]
hashret()[源代码]
payload_guess

Possible sublayers: TacacsAuthenticationReply, TacacsAuthenticationStart

post_build(p, pay)[源代码]
class scapy.contrib.tacacs.TacacsPacketArguments(_pkt, /, *, data=b'')[源代码]

基类:Packet

Class defined to handle the arguments listed at the end of tacacs+ Authorization and Accounting packets.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TacacsPacketArguments                    
TacacsPacketArguments fields

data

StrLenField

b''

guess_payload_class(pay)[源代码]
pre_dissect(s)[源代码]
scapy.contrib.tacacs.obfuscate(pay, secret, session_id, version, seq)[源代码]

Obfuscation methodology from section 3.7 https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-3.7