### Complete Runner Integration for OSINT (Go) Source: https://context7.com/alpkeskin/mosint/llms.txt Integrates all Mosint services using the `runner` package for concurrent execution. This example demonstrates initializing configuration, creating a runner with a target email, starting the services, printing results, and exporting them to a JSON file. ```go package main import ( "github.com/alpkeskin/mosint/v3/internal/runner" "github.com/alpkeskin/mosint/v3/internal/config" "github.com/alpkeskin/mosint/v3/internal/output" ) func main() { // Initialize configuration config.Cfg = &config.Config{} // ... set API keys ... // Create runner with target email r := runner.New("target@example.com") // Execute all services concurrently (12 workers) r.Start() // Print results to console r.Print() // Export to JSON file out := output.New() out.SetFilePath("results.json") out.JSON(r) // Access individual service results: // r.EmailRepC.Response - EmailRep data // r.HaveibeenpwnedC.Response - HIBP breaches // r.BreachDirectoryC.Response - BreachDirectory data // r.HunterC.Response - Hunter.io data // r.IntelxC.Response - IntelX URLs // r.IpApiC.Response - IP/Domain info // r.PsbdmpC.Urls - Pastebin URLs // r.InstagramC.Exists - Instagram account exists // r.SpotifyC.Exists - Spotify account exists // r.TwitterC.Exists - Twitter account exists // r.GoogleSearchC.Response - Google search URLs // r.DnsC.Records - DNS records } ``` -------------------------------- ### Go Example: EmailRep Service Integration Source: https://context7.com/alpkeskin/mosint/llms.txt A Go code snippet demonstrating how to integrate with the EmailRep service using Mosint's package. It shows initializing the configuration, creating an EmailRep service instance, performing a lookup, and accessing the results. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/emailrep" "github.com/alpkeskin/mosint/v3/internal/config" ) func main() { // Initialize config first config.Cfg = &config.Config{} config.Cfg.Services.EmailRepApiKey = "your-api-key" // Create and use EmailRep service er := emailrep.New() er.Lookup("target@example.com") // Access results // er.Response.Reputation - "high", "medium", "low", "none" // er.Response.Suspicious - boolean // er.Response.Details.Blacklisted // er.Response.Details.CredentialsLeaked // er.Response.Details.DataBreach // er.Response.Details.Disposable // er.Response.Details.FreeProvider er.Print() } ``` -------------------------------- ### Mosint Docker Usage Examples Source: https://context7.com/alpkeskin/mosint/llms.txt Provides commands for building and running Mosint within a Docker container. This includes building the image, displaying help, running a basic investigation, and mounting custom configuration files or output volumes. ```bash # Build the Docker image docker build -t mosint . # Run with Docker (displays help) docker run mosint --help # Run an investigation with Docker docker run mosint target@example.com # Run with custom config mounted docker run -v /path/to/config.yaml:/root/.mosint.yaml mosint target@example.com # Run with JSON output (mount volume for output file) docker run -v $(pwd)/output:/output mosint -o /output/results.json target@example.com ``` -------------------------------- ### Mosint Configuration File Example Source: https://context7.com/alpkeskin/mosint/llms.txt An example of the Mosint configuration file (.mosint.yaml) located in the user's home directory. This file requires API keys for various integrated services to function correctly. ```yaml # Config file: $HOME/.mosint.yaml # Copy this to your home directory as .mosint.yaml services: breach_directory_api_key: YOUR_RAPIDAPI_KEY_HERE emailrep_api_key: YOUR_EMAILREP_API_KEY_HERE hunter_api_key: YOUR_HUNTER_API_KEY_HERE intelx_api_key: YOUR_INTELX_API_KEY_HERE haveibeenpwned_api_key: YOUR_HIBP_API_KEY_HERE settings: intelx_max_results: 20 ``` -------------------------------- ### Install Mosint using Go Source: https://github.com/alpkeskin/mosint/blob/master/README.md This command installs the Mosint tool using the Go package manager. Ensure you have Go installed and configured on your system. The `-v` flag provides verbose output during the installation process. ```sh go install -v github.com/alpkeskin/mosint/v3/cmd/mosint@latest ``` -------------------------------- ### Run Mosint Docker Container Source: https://github.com/alpkeskin/mosint/blob/master/README.md This command runs a Docker container from the 'mosint' image. It passes the `--help` flag to the Mosint application inside the container, displaying its usage instructions. This is useful for verifying the Docker setup and understanding available options. ```sh docker run mosint --help ``` -------------------------------- ### Email Syntax Verification (Go) Source: https://context7.com/alpkeskin/mosint/llms.txt Validates the syntax of an email address before proceeding with further investigations. The `verification` package provides a `Syntax` function that returns `true` if the email format is valid, and `false` otherwise. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/verification" ) func main() { v := verification.New() // Returns true if email syntax is valid isValid := v.Syntax("target@example.com") if !isValid { // Handle invalid email } } ``` -------------------------------- ### Build Mosint Docker Image Source: https://github.com/alpkeskin/mosint/blob/master/README.md This command builds a Docker image for Mosint. It uses the provided Dockerfile in the current directory to create an image tagged as 'mosint'. This allows for containerized deployment and execution of the tool. ```sh docker build -t mosint . ``` -------------------------------- ### IP and Domain Information Lookup using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Retrieves geographic and organizational information about an email domain's IP address using the ipapi service. No API key is explicitly mentioned as required in this snippet. Outputs IP address, location (city, region, country), timezone, organization, ASN, and geographic coordinates. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/ipapi" ) func main() { ip := ipapi.New() ip.GetInfo("target@example.com") // Access IP/domain information // ip.Response.IP - Resolved IP address // ip.Response.City - City location // ip.Response.Region - Region/state // ip.Response.CountryName - Country name // ip.Response.CountryCode - ISO country code // ip.Response.Timezone - Timezone // ip.Response.Org - Organization/ISP // ip.Response.Asn - Autonomous System Number // ip.Response.Latitude - Geographic latitude // ip.Response.Longitude - Geographic longitude ip.Print() } ``` -------------------------------- ### DNS Records Lookup using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Retrieves various DNS records (TXT, MX, A, CNAME) for an email domain using the dns package. No API key is required. Outputs a list of records, each with a type and value. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/dns" ) func main() { d := dns.New() d.Resolver("target@example.com") // Access DNS records for _, record := range d.Records { // record.Type - "TXT", "MX", "A", "CNAME" // record.Value - Record value } d.Print() } ``` -------------------------------- ### IntelX Breached Data Search using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Searches Intelligence X for breached data and leaked credentials. Requires an IntelX API key and optionally sets the maximum number of results. Returns an array of URLs pointing to leaked data on the IntelX platform. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/intelx" "github.com/alpkeskin/mosint/v3/internal/config" ) func main() { config.Cfg = &config.Config{} config.Cfg.Services.IntelXApiKey = "your-intelx-api-key" config.Cfg.Settings.IntelXMaxResults = 20 ix := intelx.New() ix.Search("target@example.com") // Access results - array of IntelX URLs for _, url := range ix.Response { // url format: "https://intelx.io/?did=" // Links to leaked data on IntelX platform } ix.Print() } ``` -------------------------------- ### Mosint Custom Configuration File Usage Source: https://context7.com/alpkeskin/mosint/llms.txt Demonstrates how to specify an alternate configuration file location for Mosint using the `-c` or `--config` flag. This allows for managing different sets of API keys or settings. ```bash # Use a custom config file location mosint -c /path/to/custom-config.yaml target@example.com # Use with output and silent mode mosint --config /etc/mosint/config.yaml --output /tmp/scan.json --silent user@domain.com ``` -------------------------------- ### Run Mosint with an Email Address Source: https://github.com/alpkeskin/mosint/blob/master/README.md This is the basic command to run Mosint against a target email address. Mosint will then query various integrated services to gather information about the provided email. For more detailed usage options, refer to the help flag (`-h`). ```sh mosint example@email.com ``` -------------------------------- ### Google Search for Email Mentions (Go) Source: https://context7.com/alpkeskin/mosint/llms.txt Performs a Google search to find public mentions of a given email address. It uses the `googlesearch` package to query Google and provides access to the URLs where the email was found. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/scrape/googlesearch" ) func main() { gs := googlesearch.New() gs.Search("target@example.com") // Access found URLs for _, url := range gs.Response { // URLs where the email was found publicly } gs.Print() } ``` -------------------------------- ### BreachDirectory Password Leak Search using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Searches for leaked passwords and breach sources using the BreachDirectory API. Requires a BreachDirectory API key (RapidAPI). Outputs success status, number of records found, and details of each breach including if a password was found and its source. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/breachdirectory" "github.com/alpkeskin/mosint/v3/internal/config" ) func main() { config.Cfg = &config.Config{} config.Cfg.Services.BreachDirectoryApiKey = "your-rapidapi-key" bd := breachdirectory.New() bd.Lookup("target@example.com") // Access results // bd.Response.Success - API call success // bd.Response.Found - Number of records found // bd.Response.Result[] - Array of breach results // .HasPassword - Whether password was found // .Sources - Breach sources // .Password - Leaked password (if found) // .Sha1 - SHA1 hash of password // .Hash - Other hash formats bd.Print() } ``` -------------------------------- ### Hunter.io Related Emails Discovery using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Finds related email addresses and domain information using Hunter.io. Requires a Hunter API key. Provides details about the domain, whether the email is disposable or webmail, organization, country, and a list of related emails with confidence scores and associated names/positions. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/hunter" "github.com/alpkeskin/mosint/v3/internal/config" ) func main() { config.Cfg = &config.Config{} config.Cfg.Services.HunterApiKey = "your-hunter-api-key" h := hunter.New() h.Lookup("target@example.com") // Access domain and email data // h.Response.Data.Domain - Target domain // h.Response.Data.Disposable - Is disposable email // h.Response.Data.Webmail - Is webmail provider // h.Response.Data.Organization - Organization name // h.Response.Data.Country - Country // h.Response.Data.Emails[] - Related emails found // .Value - Email address // .Type - personal/generic // .Confidence - Confidence score // .FirstName, .LastName - Associated name // .Position, .Department - Work info h.Print() } ``` -------------------------------- ### Pastebin Dump Search (Go) Source: https://context7.com/alpkeskin/mosint/llms.txt Searches for occurrences of an email address within Pastebin dumps. It utilizes the `psbdmp` service to find relevant dump URLs, which can then be accessed for further investigation. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/psbdmp" ) func main() { p := psbdmp.New() p.Search("target@example.com") // Access pastebin dump URLs for _, url := range p.Urls { // url format: "https://psbdmp.ws/dump/" } p.Print() } ``` -------------------------------- ### Basic Email Investigation with Mosint Source: https://context7.com/alpkeskin/mosint/llms.txt Performs a comprehensive OSINT investigation on a target email address using the default Mosint command-line interface. The output includes various details about the email's reputation and associated data. ```bash # Basic usage - investigate an email address mosint target@example.com # Expected output: # Target Email: target@example.com ✓ # # [*] Email Reputation Lookup # [+] Reputation: high # [+] Blacklisted: false # [+] Disposable: false # [+] Data Breach: true # ... # # [*] HaveIBeenPwned Breaches # [+] Name: LinkedIn # [+] Domain: linkedin.com # [+] Breach Date: 2012-05-05 # ... ``` -------------------------------- ### Detect Social Media Accounts (Go) Source: https://context7.com/alpkeskin/mosint/llms.txt Checks if an email address is associated with Instagram, Spotify, or Twitter accounts. It utilizes specific packages for each social media platform to perform the checks and prints the existence status. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/social/instagram" "github.com/alpkeskin/mosint/v3/pkg/social/spotify" "github.com/alpkeskin/mosint/v3/pkg/social/twitter" ) func main() { email := "target@example.com" // Check Instagram ig := instagram.New() ig.Check(email) // ig.Exists - true if account exists ig.Print() // Check Spotify sp := spotify.New() sp.Check(email) // sp.Exists - true if account exists sp.Print() // Check Twitter tw := twitter.New() tw.Check(email) // tw.Exists - true if account exists tw.Print() } ``` -------------------------------- ### HaveIBeenPwned Breach Lookup using Go Source: https://context7.com/alpkeskin/mosint/llms.txt Checks if an email address appears in known data breaches using the HaveIBeenPwned API. Requires a HaveIBeenPwned API key. Outputs breach details like name, domain, date, pwn count, and data classes. ```go package main import ( "github.com/alpkeskin/mosint/v3/pkg/services/haveibeenpwned" "github.com/alpkeskin/mosint/v3/internal/config" ) func main() { config.Cfg = &config.Config{} config.Cfg.Services.HaveIBeenPwnedApiKey = "your-hibp-api-key" hibp := haveibeenpwned.New() hibp.Lookup("target@example.com") // Access breach data for _, breach := range hibp.Response { // breach.Name - Name of the breached service // breach.Domain - Domain of the breached service // breach.BreachDate - Date of the breach // breach.PwnCount - Number of accounts affected // breach.DataClasses - Types of data exposed (emails, passwords, etc.) // breach.IsVerified - Whether the breach is verified } hibp.Print() } ``` -------------------------------- ### Mosint Silent Mode with JSON Output Source: https://context7.com/alpkeskin/mosint/llms.txt Runs an email investigation in silent mode and outputs the results to a JSON file. This is useful for programmatic processing and integration with other security tools. ```bash # Silent mode with JSON output mosint -s -o results.json target@example.com # The results.json file will contain: # { # "email": "target@example.com", # "verified": true, # "emailrep": { # "email": "target@example.com", # "reputation": "high", # "suspicious": false, # "details": { # "blacklisted": false, # "credentials_leaked": true, # "data_breach": true, # "free_provider": false, # "deliverable": true # } # }, # "haveibeenpwned": [...], # "breachdirectory": {...}, # "hunter": {...}, # "instagram_exists": true, # "spotify_exists": false, # "twitter_exists": true, # "google_search": [...], # "dns_records": [...] # } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.