Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
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
savoirfairelinux
opendht
Commits
c72ea8ce
Commit
c72ea8ce
authored
8 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
tools/scanner: don't use a certificate
parent
ea168353
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dhtscanner.cpp
+3
-4
3 additions, 4 deletions
tools/dhtscanner.cpp
with
3 additions
and
4 deletions
tools/dhtscanner.cpp
+
3
−
4
View file @
c72ea8ce
...
...
@@ -73,11 +73,9 @@ main(int argc, char **argv)
gnutls_global_init
();
#endif
auto
params
=
parseArgs
(
argc
,
argv
);
auto
ca_tmp
=
dht
::
crypto
::
generateIdentity
(
"DHT Node CA"
);
auto
crt_tmp
=
dht
::
crypto
::
generateIdentity
(
"Scanner node"
,
ca_tmp
);
DhtRunner
dht
;
dht
.
run
(
params
.
port
,
crt_tmp
,
true
,
params
.
network
);
dht
.
run
(
params
.
port
,
{}
,
true
,
params
.
network
);
if
(
not
params
.
bootstrap
.
first
.
empty
())
dht
.
bootstrap
(
params
.
bootstrap
.
first
.
c_str
(),
params
.
bootstrap
.
second
.
c_str
());
...
...
@@ -86,12 +84,13 @@ main(int argc, char **argv)
std
::
cout
<<
"Scanning network..."
<<
std
::
endl
;
auto
all_nodes
=
std
::
make_shared
<
NodeSet
>
();
// Set hash to 1 because 0 is the null hash
dht
::
InfoHash
cur_h
{};
cur_h
.
setBit
(
8
*
HASH_LEN
-
1
,
1
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
2
));
std
::
atomic_uint
done
{
false
};
std
::
atomic_uint
done
{
0
};
step
(
dht
,
done
,
all_nodes
,
cur_h
,
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