package
2.0.0+incompatible
Repository: https://github.com/dedsecinside/gotor.git
Documentation: pkg.go.dev
# README
REST HTTP API
Get Link Tree
GET http://localhost:8081/tree?link=https://example.com&depth=1
Query Parameters
- link (string): the root URL of the tree
- depth (int): the depth of the tree
Response
{
"url": "https://www.example.com",
"status": "OK",
"status_code": 200,
"children": [{
"url": "https://www.child.com",
"status": "OK",
"status_code": 200,
"children": []
}]
}
Get Emails
GET http://localhost:8081/emails?link=https://random.com
Query Parameters
- link (string): the root URL of the tree
Response
["[email protected]", "[email protected]"]
Get Phone Numbers
GET http://localhost:8081/phone_numbers?link=https://example.com
Query Parameters
- link (string): the root URL of the tree
Response
["+1-234-567-8901", "+1-234-567-8902"]
Get current IP of server
GET http://localhost:{port}/ip
Query parameters
N/A
Response
"127.0.0.1" (returns IP address as plain string)
# Functions
GetEmails writes an array of emails found on the given "link" passed in the query parameters by the client.
GetIP writes the IP address of the current TOR connection being used.
GetPhoneNumbers writes a list of phone numbers using the `tel:` tag.
GetTreeNode returns a LinkTree with the specified depth passed to the query parameter.
No description provided by the author
RunServer starts the server for the API, using the given client and port.