Main leekspin module for generating mocked Onion Relay (OR) and Hidden Service (HS) descriptors and writing them to disk.
nacl = True¶If pynacl was found by leekspin.ntor.nacl.
generateDescriptors(bridge=True, withoutTAP=False, withoutNTOR=False)[source]¶Create keys, certs, signatures, documents and descriptors for an OR.
| Parameters: |
|
|---|---|
| Returns: | A 3-tuple of strings:
for a mock Tor relay/bridge. |
generateHSDesc(replica)[source]¶Generate a @type rendezvous-service-descriptor for an Hidden
Service.
Todo
Make generation of permanent_ids deal with HS “stealth”
authorisation.
Todo
Implement per-client session_keys and
descriptor_cookies, see rend-spec.txt §2.1.
| Parameters: | replica (int) – The replica number for this particular descriptor.
This influences the secret-id-part of the descriptor (see
calculateSecretIDPart()). |
|---|---|
| Return type: | str |
| Returns: | A @type rendezvous-service-descriptor as a string. |
createHiddenServiceDescriptors(count, replicas=2)[source]¶Generate hidden service descriptors.
| Parameters: |
|
|---|
createRelayOrBridgeDescriptors(count, bridge=True, **kwargs)[source]¶Generate all types of descriptors and write them to files.
| Parameters: |
|---|
create(count, descriptorType=None, withoutTAP=False, withoutNTOR=False)[source]¶Create count descriptors of type descriptor_type.
| Parameters: |
|
|---|