Laika sniffs content for emails, phone numbers and social media urls.
-
Plain text
-
No protection
- Emails
- Phone Numbers
- Social Media URLs
-
HTML Entities
- Emails
- Phone Numbers
- Social Media URLs
-
HTML Comments
- Emails
- Phone Numbers
- Social Media URLs
-
CSS Display none
- Emails
- Phone Numbers
- Social Media URLs
-
JS Concatenation
- ~Emails
- Phone Numbers
- Social Media URLs
-
HTML Symbol substitution
- Emails
- Phone Numbers
- Social Media URLs
-
-
Clickable link
-
No protection
- Emails
- Phone Numbers
- Social Media URLs
-
HTML entities
- ~Emails
- Phone Numbers
- Social Media URLs
-
URL encoding
- Emails
- Phone Numbers
- Social Media URLs
-
Concatenation JS
- Emails
- Phone Numbers
- Social Media URLs
-
go install github.com/bastean/laika/cmd/laika@latest
laika -h
Usage: laika [OPTIONS] sources...
Sniffs the content of the sources
E.g.: laika -jsonStore "laika" -urls -emails http://localhost:8080
-emails
Sniff emails in the content (Required)
-jsonStore string
Store filepath to save the sniffed content (default "In Memory")
-silent
Do not show the sniffed content
-urls
If the sources for sniffing content are urls (Required)
go install github.com/bastean/laika/cmd/laika-server@latest
laika-server -h
Usage: laika-server [OPTIONS]
Sniff Test Server
E.g.: laika-server -p 8080
-p int
Port (default 8080)
go get github.com/bastean/laika
go get -u github.com/bastean/laika
package main
import (
"log"
"github.com/bastean/laika"
)
func main() {
// Test Server
sources := []string{"http://localhost:8080"}
// Alias for "nil"
inMemory := laika.NewInMemoryStore()
fromZero := laika.NewEmptyData()
sniff := laika.New(fromZero)
sniff.SetStore(inMemory)
// Sniffs all HTML recursively
sniff.ContentFromUrls(sources)
// Sniffs all emails in the sniffed HTML
sniff.EmailsFromContent()
// Return an array with all emails sniffed from the HTML
emails := sniff.SniffedEmails()
log.Println(emails)
}
package main
import (
"log"
"github.com/bastean/laika"
)
func main() {
// Test Server
sources := []string{"http://localhost:8080"}
localJson := laika.NewLocalJsonStore(".", "laika")
fromExistingData, err := laika.ReadDataFromStore(localJson)
if err != nil {
fromExistingData = laika.NewEmptyData()
}
sniff := laika.New(fromExistingData)
sniff.SetStore(localJson)
// Sniffs all HTML recursively
sniff.ContentFromUrls(sources)
// Sniffs all emails in the sniffed HTML
sniff.EmailsFromContent()
// Return an array with all emails sniffed from the HTML
emails := sniff.SniffedEmails()
log.Println(emails)
// Saves the sniffed data in the store
sniff.SaveSniffed()
}
-
laika.json
{ "Sniffed": { "localhost:8080": [ { "Source": "/", "Content": "<html>...</html>", "Found": { "Emails": ["email@example.com", "..."] } }, { "Source": "/dashboard", "Content": "<html>...</html>", "Found": { "Emails": ["email@example.com", "..."] } }, { "Source": "/dashboard/admin", "Content": "<html>...</html>", "Found": { "Emails": ["email@example.com", "..."] } } ] } }
- Contributions and Feedback are always welcome!