Skip to content

Commit

Permalink
osint-in-go
Browse files Browse the repository at this point in the history
  • Loading branch information
R3DHULK authored Jan 31, 2023
1 parent bd19044 commit 3f50a18
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions osint.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package main

import (
"bufio"
"fmt"
"net/http"
"os"
)

func main() {
fmt.Println("Enter a search term:")
scanner := bufio.NewScanner(os.Stdin)
scanner.Scan()
term := scanner.Text()

// Perform a Google search for the search term
resp, err := http.Get("https://www.google.com/search?q=" + term)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()

// Print the response status and header information
fmt.Println("Response status:", resp.Status)
for k, v := range resp.Header {
fmt.Println(k, ":", v)
}
}

0 comments on commit 3f50a18

Please sign in to comment.