Osınt toolu
go version Eğer Hata Veriyorsa, Sırasıyla: Kod: sudo apt update sudo apt install golang-go -y
Çalışma Dizinini Oluşturalım Sırasıyla: Kod: mkdir ~/osint_helper cd ~/osint_helper
Scripti Oluşturalım Go Dosyamızı Oluşturuyoruz: Kod: nano consent_first_osint.go Açılan Editöre Aşağıdaki Kodu Yapıştırıyoruz: Kod: // Consent-first OSINT Helper (No API, No Scraping, Links Only) // go build -o osint_helper consent_first_osint.go package main
import ( cryptoRand "crypto/rand" "encoding/binary" "errors" "fmt" "html" "math/rand" "net/url" "os" "regexp" "strings" "time" )
const mustPhrase = "İZİN VERİYORUM"
func requireConsent(text string) error { t := strings.ToUpper(strings.TrimSpace(text)) // Normalize ASCII fallback too if !strings.Contains(t, mustPhrase) && !strings.Contains(t, "IZIN VERIYORUM") { return errors.New("açık rıza metninde 'İZİN VERİYORUM' ifadesi bulunmalı") } return nil }
func normalizeSpaces(s string) string {
s = strings.TrimSpace(s)
re := regexp.MustCompile(\s+)
return re.ReplaceAllString(s, " ")
}
func quoteExact(s string) string { s = normalizeSpaces(s) if s == "" { return "" } return fmt.Sprintf(""%s"", s) }
func e164ish(phone string) string {
// Basit bir normalizasyon (kesin doğrulama yapmaz)
digits := regexp.MustCompile(\D+).ReplaceAllString(phone, "")
if strings.HasPrefix(digits, "0") && len(digits) >= 11 {
// TR varsayımı: 0xxxxxxxxxx -> +90xxxxxxxxxx
digits = "90" + digits[1:]
}
if strings.HasPrefix(digits, "90") {
return "+" + digits
}
if strings.HasPrefix(digits, "9") && !strings.HasPrefix(digits, "90") {
return "+" + digits
}
if strings.HasPrefix(phone, "+") {
return phone
}
// son çare: olduğu gibi
return phone
}
type Link struct { Label string URL string }
func g(q string) string { return "https://www.google.com/search?q=" + url.QueryEscape(q) } func ddg(q string) string { return "https://duckduckgo.com/?q=" + url.QueryEscape(q) }
func buildDorks(fullName, phone string) []Link { exact := quoteExact(fullName) plain := normalizeSpaces(fullName) phone = strings.TrimSpace(phone) comb := strings.TrimSpace(strings.Join([]string{exact, phone}, " "))
var links []Link
// Genel
links = append(links,
Link{"Google (ad tam eşleşme)", g(exact)},
Link{"Google (ad + telefon)", g(comb)},
Link{"DuckDuckGo (ad tam eşleşme)", ddg(exact)},
Link{"DuckDuckGo (ad + telefon)", ddg(comb)},
)
// Haber / PDF / Resmi benzeri (kamusal)
links = append(links,
Link{"Google News (ad)", "https://news.google.com/search?q=" + url.QueryEscape(plain)},
Link{"Resmi PDF dorku", g(fmt.Sprintf("%s filetype:pdf", exact))},
)
// Sosyal profil arama (manuel inceleme)
links = append(links,
Link{"LinkedIn kişi arama", "https://www.linkedin.com/search/results/people/?keywords=" + url.QueryEscape(plain)},
Link{"X/Twitter kişi arama", "https://x.com/search?q=" + url.QueryEscape(plain) + "&f=user"},
Link{"GitHub kullanı cı arama", "https://github.com/search?q=" + url.QueryEscape(plain) + "&type=users"},
Link{"Instagram arama", "https://www.instagram.com/explore/search/keyword/?q=" + url.QueryEscape(plain)},
Link{"Facebook arama", "https://www.facebook.com/search/people/?q=" + url.QueryEscape(plain)},
)
// Görseller
links = append(links,
Link{"Google Görseller (ad)", "https://www.google.com/search?tbm=isch&q=" + url.QueryEscape(plain)},
)
// Telefon odaklı (tam eşleşme aramaları)
if phone != "" {
e := e164ish(phone)
links = append(links,
Link{"Google (telefon tam eşleşme)", g(quoteExact(e))},
Link{"DuckDuckGo (telefon tam eşleşme)", ddg(quoteExact(e))},
)
}
// Bazı faydalı dork varyasyonları
dorks := []string{
fmt.Sprintf("%s site:tr", exact),
fmt.Sprintf("%s -site:linkedin.com -site:facebook.com", exact),
fmt.Sprintf("%s AND (cv OR özgeçmiş OR resume)", exact),
fmt.Sprintf("%s (\"iletişim\" OR \"contact\")", exact),
fmt.Sprintf("%s (\"hakkında\" OR \"about\")", exact),
fmt.Sprintf("%s (\"@gmail.com\" OR \"@outlook.com\")", exact), // sadece kamusal index
fmt.Sprintf("%s (\"telefon\" OR \"cep\" OR \"gsm\")", exact),
}
for _, d := range dorks {
links = append(links, Link{"Google dork", g(d)})
}
return links
}
func shuffleLinks(links []Link, seed int64) { r := rand.New(rand.NewSource(seed)) r.Shuffle(len(links), func(i, j int) { links[i], links[j] = links[j], links[i] }) }
func makeMarkdown(fullName, phone, consent string, links []Link) string { ts := time.Now().UTC().Format("2006-01-02 15:04 MST") var b strings.Builder fmt.Fprintf(&b, "# OSINT Yardımcı Raporu (Scrape Yok, Bağlantı Sadece)\n\n") fmt.Fprintf(&b, "- Oluşturulma: %s\n", ts) fmt.Fprintf(&b, "- Hedef Ad-Soyad: %s\n", fullName) if strings.TrimSpace(phone) != "" { fmt.Fprintf(&b, "- Hedef Telefon: %s\n", e164ish(phone)) } else { fmt.Fprintf(&b, "- Hedef Telefon: —\n") } cons := strings.ReplaceAll(normalizeSpaces(consent), "\n", " ") if len(cons) > 240 { cons = cons[:240] + "…" } fmt.Fprintf(&b, "- Açık Rıza (özet): %s\n\n", cons) fmt.Fprintf(&b, "> Not: Bu rapor yalnızca kamusal arama bağlantıları içerir; otomatik veri çekimi yapılmaz.\n\n") fmt.Fprintf(&b, "## Bağlantılar (rastgele sıralı)\n\n") for _, l := range links { fmt.Fprintf(&b, "- %s\n", l.Label, l.URL) } return b.String() }
func makeHTML(markdown string) string {
// Basit, bağımsız HTML (Markdown'u düz metin gibi kaçırıp
ile gösteriyoruz)
escaped := html.EscapeString(markdown)
escaped = strings.ReplaceAll(escaped, "\n", "
")
return `
func save(path string, data []byte) error { return os.WriteFile(path, data, 0644) }
func cryptoSeed() int64 { var b [8]byte _, err := cryptoRand.Read(b[:]) if err != nil { // Yedek: zamanı kullan return time.Now().UnixNano() } return int64(binary.LittleEndian.Uint64(b[:])) }
func usage() { fmt.Println("Kullanım:") fmt.Println(" ./osint_helper "Ad Soyad" "+90 5xx xxx xx xx" "AÇIK RIZA METNİ (İÇİNDE 'İZİN VERİYORUM' GEÇMELİ)"") }
func main() { if len(os.Args) < 4 { usage() os.Exit(1) }
fullName := normalizeSpaces(os.Args[1])
phone := os.Args[2]
consent := os.Args[3]
if err := requireConsent(consent); err != nil {
fmt.Println("[HATA]", err)
os.Exit(2)
}
links := buildDorks(fullName, phone)
// “Rastgele arasın” talebi için: sadece link sırasını rastgeleleştiriyoruz.
// Her çalıştırmada farklı bir sıra için kriptografik tohum kullanıyoruz.
seed := cryptoSeed()
shuffleLinks(links, seed)
// Yine de deterministik rapor istersen, ada göre sabit bir seed üretmek:
// seed = int64(crc32.ChecksumIEEE([]byte(fullName)))
md := makeMarkdown(fullName, phone, consent, links)
html := makeHTML(md)
// Dosya adlarını tarih + isimle üretelim
safeName := strings.ToLower(strings.ReplaceAll(fullName, " ", "_"))
date := time.Now().Format("20060102_150405")
mdPath := fmt.Sprintf("osint_raporu_%s_%s.md", safeName, date)
htmlPath := fmt.Sprintf("osint_raporu_%s_%s.html", safeName, date)
if err := save(mdPath, []byte(md)); err != nil {
fmt.Println("[HATA] Markdown kaydedilemedi:", err)
os.Exit(3)
}
if err := save(htmlPath, []byte(html)); err != nil {
fmt.Println("[HATA] HTML kaydedilemedi:", err)
os.Exit(4)
}
fmt.Println("✅ Rapor oluşturuldu:")
fmt.Println(" -", mdPath)
fmt.Println(" -", htmlPath)
fmt.Println("\nNot: Bu araç otomatik veri toplamıyor; yalnızca kamusal arama bağlantıları üretir.")
} Kaydet CTRL+O Çık CTRL+X
Source: detailyang/awesome-cheatsheet