Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4b5517de
Commit
4b5517de
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
duplicate IPs not added to index
parent
d0dbb31b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/sbl/sbbslist.c
+40
-10
40 additions, 10 deletions
xtrn/sbl/sbbslist.c
with
40 additions
and
10 deletions
xtrn/sbl/sbbslist.c
+
40
−
10
View file @
4b5517de
...
...
@@ -347,7 +347,7 @@ BOOL check_imsg_support(ulong ip_addr)
send
(
sock
,
buf
,
strlen
(
buf
),
0
);
/* Get response */
while
((
rd
=
sockreadline
(
sock
,
buf
,
sizeof
(
buf
),
3
0
))
>
0
)
{
while
((
rd
=
sockreadline
(
sock
,
buf
,
sizeof
(
buf
),
6
0
))
>
0
)
{
printf
(
"%s
\n
"
,
buf
);
if
(
strstr
(
buf
,
"Synchronet"
))
{
success
=
TRUE
;
...
...
@@ -390,7 +390,7 @@ BOOL check_imsg_support(ulong ip_addr)
}
/* Get response */
while
((
rd
=
sockreadline
(
sock
,
buf
,
sizeof
(
buf
),
1
0
))
>
0
)
{
while
((
rd
=
sockreadline
(
sock
,
buf
,
sizeof
(
buf
),
6
0
))
>
0
)
{
printf
(
"%s
\r\n
"
,
buf
);
if
(
strstr
(
buf
,
"Synchronet"
))
{
success
=
TRUE
;
...
...
@@ -448,10 +448,11 @@ int main(int argc, char **argv)
return
(
1
);
}
#if 0
if(_putenv("TZ=UCT0"))
printf("!putenv() FAILED");
tzset();
#endif
now
=
time
(
NULL
);
if
((
i
=
_sopen
(
"SBL.DAB"
,
O_RDWR
|
O_BINARY
,
SH_DENYNO
,
S_IREAD
|
S_IWRITE
))
==-
1
)
{
...
...
@@ -588,6 +589,36 @@ int main(int argc, char **argv)
sysop
=
""
;
nodes
[
0
]
=
0
;
}
if
(
bbs
.
number
[
i
].
modem
.
min_rate
==
0xffff
)
{
telnet_port
=
bbs
.
number
[
i
].
telnet
.
port
;
if
(
telnet_port
==
0
)
telnet_port
=
23
;
strcpy
(
telnet_addr_buf
,
bbs
.
number
[
i
].
telnet
.
addr
);
telnet_addr
=
telnet_addr_buf
;
if
(
!
strnicmp
(
telnet_addr
,
"TELNET:"
,
7
))
telnet_addr
+=
7
;
if
(
!
strnicmp
(
telnet_addr
,
"//"
,
2
))
telnet_addr
+=
2
;
p
=
strchr
(
telnet_addr
,
':'
);
if
(
p
!=
NULL
)
{
*
p
=
0
;
telnet_port
=
atoi
(
p
+
1
);
}
printf
(
"Resolving IP address for: %s"
,
telnet_addr
);
ip_addr
=
resolve_ip
(
telnet_addr
);
printf
(
"
\n
"
);
if
(
ip_addr
!=
0
)
{
for
(
ip
=
0
;
ip
<
ip_total
;
ip
++
)
if
(
ip_addr
==
ip_list
[
ip
])
break
;
if
(
ip
<
ip_total
)
/* already verified, ignore */
continue
;
}
}
if
(
i
&&
!
stricmp
(
bbs
.
number
[
i
].
modem
.
number
,
bbs
.
number
[
i
-
1
].
modem
.
number
))
continue
;
// duplicate
if
(
i
&&
!
stricmp
(
bbs
.
number
[
i
].
modem
.
location
,
bbs
.
number
[
i
-
1
].
modem
.
location
))
...
...
@@ -604,8 +635,9 @@ int main(int argc, char **argv)
fprintf
(
html
,
"<TR>"
);
sprintf
(
name
,
"<A HREF=
\"
#%s
\"
>%s</A>"
,
bbs
.
name
,
bbs
.
name
);
if
(
bbs
.
number
[
i
].
modem
.
min_rate
==
0xffff
/* && bbs.name[0]=='E' */
)
{
if
(
bbs
.
number
[
i
].
modem
.
min_rate
==
0xffff
)
{
#if 0 // moved
telnet_port=bbs.number[i].telnet.port;
if(telnet_port==0)
telnet_port=23;
...
...
@@ -621,6 +653,7 @@ int main(int argc, char **argv)
*p=0;
telnet_port=atoi(p+1);
}
#endif
#if !VERIFY
/* set to 1 for no-verification */
verified
=
TRUE
;
...
...
@@ -629,7 +662,7 @@ int main(int argc, char **argv)
printf
(
"Verifying %d/%d %s:%d "
,
total_attempts
,
total_systems
,
telnet_addr
,
telnet_port
);
ip_addr
=
resolve_ip
(
telnet_addr
);
//
ip_addr=resolve_ip(telnet_addr);
/* already done above */
if
(
!
ip_addr
)
strcpy
(
verify_result
,
"bad hostname"
);
else
{
...
...
@@ -700,11 +733,7 @@ int main(int argc, char **argv)
sprintf
(
verify_result
,
"non-Synchronet"
);
}
/* Check Finger */
for
(
ip
=
0
;
ip
<
ip_total
;
ip
++
)
if
(
ip_addr
==
ip_list
[
ip
])
break
;
if
(
ip
>=
ip_total
&&
!
fingered
)
{
/* not already checked */
ip_list
[
ip_total
++
]
=
ip_addr
;
if
(
!
fingered
)
{
/* not already checked */
if
(
check_imsg_support
(
ip_addr
))
{
fingered
=
TRUE
;
printf
(
"[IM]"
);
...
...
@@ -715,6 +744,7 @@ int main(int argc, char **argv)
}
}
ip_list
[
ip_total
++
]
=
ip_addr
;
closesocket
(
sock
);
}
...
...
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