Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
masscan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
masscan
Commits
b1d0d281
Commit
b1d0d281
authored
11 years ago
by
Robert David Graham
Browse files
Options
Downloads
Patches
Plain Diff
DNS LULZ
parent
678d8741
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ranges.c
+2
-2
2 additions, 2 deletions
src/ranges.c
src/templ-payloads.c
+11
-17
11 additions, 17 deletions
src/templ-payloads.c
with
13 additions
and
19 deletions
src/ranges.c
+
2
−
2
View file @
b1d0d281
...
...
@@ -100,10 +100,10 @@ rangelist_add_range(struct RangeList *task, unsigned begin, unsigned end)
/* auto-expand the list if necessary */
if
(
task
->
count
+
1
>=
task
->
max
)
{
unsigned
new_max
=
task
->
max
*
2
+
1
;
size_t
new_max
=
(
size_t
)
task
->
max
*
2
+
1
;
struct
Range
*
new_list
;
if
(
(
size_t
)
new_max
>=
SIZE_MAX
/
sizeof
(
*
new_list
))
if
(
new_max
>=
SIZE_MAX
/
sizeof
(
*
new_list
))
exit
(
1
);
/* integer overflow */
new_list
=
(
struct
Range
*
)
malloc
(
sizeof
(
*
new_list
)
*
new_max
);
if
(
new_list
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
src/templ-payloads.c
+
11
−
17
View file @
b1d0d281
...
...
@@ -41,7 +41,7 @@ struct Payload2 {
struct
NmapPayloads
{
unsigned
count
;
unsigned
max
;
size_t
max
;
struct
Payload
**
list
;
};
...
...
@@ -64,21 +64,15 @@ struct Payload2 hard_coded_payloads[] = {
"
\x30\x0d
"
"
\x06\x09\x2b\x06\x01\x80\x02\x01\x01\x05\x00
"
/*sysDesc*/
"
\x05\x00
"
},
/*^^^^_____IDS LULZ HAH HA HAH*/
{
53
,
65536
,
39
,
0
,
dns_set_cookie
,
"
\x50\xb6
"
/* transaction id */
"
\x01\x20
"
/* quer y*/
"
\x00\x01
"
/* query = 1 */
"
\x00\x00\x00\x00\x00\x00
"
"
\x07
"
"version"
"
\x04
"
"bind"
"
\xc0\x08
"
"
\x00\x10
"
/* TXT */
/*^^^^^^^^_____IDS LULZ HAH HA HAH*/
"
\x00\x03
"
/* CHAOS */
"
\x00\x00
"
/* transaction ID */
"
\x01\x00
"
/* standard query */
"
\x00\x01\x00\x00\x00\x00\x00\x00
"
/* 1 query */
"
\x03
"
"www"
"
\x05
"
"yahoo"
"
\x03
"
"com"
"
\x00
"
"
\x00\x01\x00\x01
"
/* A IN */
{
53
,
65536
,
0x1f
+
8
,
0
,
dns_set_cookie
,
/* 00 */
"
\x50\xb6
"
/* transaction id */
/* 02 */
"
\x01\x20
"
/* quer y*/
/* 04 */
"
\x00\x01
"
/* query = 1 */
/* 06 */
"
\x00\x00\x00\x00\x00\x00
"
/* 0c */
"
\x07
"
"version"
"
\x04
"
"bind"
"
\xc0\x1b
"
/* 1b */
"
\x00\x10
"
/* TXT */
/*^^^^^^^_____IDS LULZ HAH HA HAH*/
/* 1d */
"
\x00\x03
"
/* CHAOS */
/* 1f */
},
{
137
,
65536
,
50
,
0
,
dns_set_cookie
,
"
\xab\x12
"
/* transaction id */
...
...
@@ -413,7 +407,7 @@ payload_add(struct NmapPayloads *payloads,
for
(
i
=
0
;
i
<
port_count
;
i
++
)
{
/* grow the list if we need to */
if
(
payloads
->
count
+
1
>
payloads
->
max
)
{
unsigned
new_max
=
payloads
->
max
*
2
+
1
;
size_t
new_max
=
payloads
->
max
*
2
+
1
;
struct
Payload
**
new_list
;
if
(
new_max
>=
SIZE_MAX
/
sizeof
(
new_list
[
0
]))
...
...
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