FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node_pcap/util.js at master · John-Lin/node_pcap · GitHub
John-Lin
/
node_pcap
Public
forked from
node-pcap/node_pcap
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node_pcap
/
util.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (17 loc) · 457 Bytes
Breadcrumbs
node_pcap
/
util.js
Copy path
File metadata and controls
20 lines (17 loc) · 457 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function
lpad
(
str
,
len
)
{
while
(
str
.
length
<
len
)
{
str
=
"0"
+
str
;
}
return
str
;
}
var
int8_to_hex
=
[
]
;
var
int8_to_hex_nopad
=
[
]
;
var
int8_to_dec
=
[
]
;
for
(
var
i
=
0
;
i
<=
255
;
i
++
)
{
int8_to_hex
[
i
]
=
lpad
(
i
.
toString
(
16
)
,
2
)
;
int8_to_hex_nopad
[
i
]
=
i
.
toString
(
16
)
;
int8_to_dec
[
i
]
=
i
.
toString
(
)
;
}
exports
.
int8_to_dec
=
int8_to_dec
;
exports
.
int8_to_hex
=
int8_to_hex
;
exports
.
int8_to_hex_nopad
=
int8_to_hex_nopad
;
Back
|
FazBrowse Home
|
New Git URL