Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
ea5020d0
Commit
ea5020d0
authored
16 years ago
by
Phil
Browse files
Options
Downloads
Patches
Plain Diff
Added ASN1F_BOOLEAN field
parent
d7b3bce2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/asn1fields.py
+5
-0
5 additions, 0 deletions
scapy/asn1fields.py
with
5 additions
and
0 deletions
scapy/asn1fields.py
+
5
−
0
View file @
ea5020d0
...
@@ -115,6 +115,11 @@ class ASN1F_INTEGER(ASN1F_field):
...
@@ -115,6 +115,11 @@ class ASN1F_INTEGER(ASN1F_field):
def
randval
(
self
):
def
randval
(
self
):
return
RandNum
(
-
2
**
64
,
2
**
64
-
1
)
return
RandNum
(
-
2
**
64
,
2
**
64
-
1
)
class
ASN1F_BOOLEAN
(
ASN1F_field
):
ASN1_tag
=
ASN1_Class_UNIVERSAL
.
BOOLEAN
def
randval
(
self
):
return
RandChoice
(
True
,
False
)
class
ASN1F_NULL
(
ASN1F_INTEGER
):
class
ASN1F_NULL
(
ASN1F_INTEGER
):
ASN1_tag
=
ASN1_Class_UNIVERSAL
.
NULL
ASN1_tag
=
ASN1_Class_UNIVERSAL
.
NULL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment