MCPcopy Create free account
hub / github.com/secdev/scapy / decrypt

Method decrypt

scapy/layers/dot11.py:1923–1932  ·  view source on GitHub ↗
(self, key=None)

Source from the content-addressed store, hash-verified

1921 IntField("icv", None)]
1922
1923 def decrypt(self, key=None):
1924 if key is None:
1925 key = conf.wepkey
1926 if key and conf.crypto_valid:
1927 d = Cipher(
1928 decrepit_algorithms.ARC4(self.iv + key.encode("utf8")),
1929 None,
1930 default_backend(),
1931 ).decryptor()
1932 self.add_payload(LLC(d.update(self.wepdata) + d.finalize()))
1933
1934 def post_dissect(self, s):
1935 self.decrypt()

Callers 2

post_dissectMethod · 0.95
unwepMethod · 0.45

Calls 4

LLCClass · 0.90
encodeMethod · 0.80
add_payloadMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected