Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: failed to connect to host=localhost user=username database=database: dial error (dial tcp [::1]:5432: connect: connection refused) #1022

Open
iprincs opened this issue Apr 26, 2024 · 1 comment

Comments

@iprincs
Copy link

iprincs commented Apr 26, 2024

->amass amass enum -config config.yaml
panic: failed to connect to host=localhost user=username database=database: dial error (dial tcp [::1]:5432: connect: connection refused)

goroutine 1 [running]:
github.com/owasp-amass/asset-db/repository.New(...)
/build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/owasp-amass/asset-db@v0.3.3/repository/sql.go:39
github.com/owasp-amass/asset-db.New({0x131d024?, 0x4?}, {0xc004e986e0?, 0x47a658?})
/build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/owasp-amass/asset-db@v0.3.3/assetdb.go:20 +0xae
github.com/caffix/netmap.NewGraph({0xc0004b2000?, 0x2d?}, {0xc004e986e0?, 0x5?}, {0x5?, 0xc0000b85e8?})
/build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/caffix/netmap@v0.2.5/graph.go:49 +0x134
github.com/owasp-amass/amass/v4/systems.(*LocalSystem).setupGraphDBs(0xc0003c0660, 0xc00049a000)
/build/amass-OqngEC/amass-4.2.0/systems/local.go:227 +0x317
github.com/owasp-amass/amass/v4/systems.NewLocalSystem(0xc00049a000)
/build/amass-OqngEC/amass-4.2.0/systems/local.go:86 +0x2bb
main.runEnumCommand({0xc0000400a0?, 0xc000040090?, 0xc0001423c0?})
/build/amass-OqngEC/amass-4.2.0/cmd/amass/enum.go:167 +0x348
main.main()
/build/amass-OqngEC/amass-4.2.0/cmd/amass/main.go:110 +0x2f2

-> amass amass -version
v4.2.0

config.yaml file -->
scope:
domains: # domain names to be in scope
- example.com
ips: # IP addresses to be in scope, multiple methods of inserting ip addresses can be used
- 192.0.2.1
- 192.0.2.2
- 192.168.0.3-8
- 192.168.0.10-192.168.0.20
asns: # ASNs that are to be in scope
- 1234
- 5678
cidrs: # CIDR ranges that are to be in scope
- 192.0.2.0/24
- 192.0.2.128/25
ports: # ports to be used when actively reaching a service
- 80
- 443
blacklist: # subdomains to be blacklisted
- example.example1.com
options:
resolvers:
- "resolvers.txt" # array of 1 path or multiple IPs to use as a resolver
- 76.76.19.19
datasources: "./datasources.yaml" # the file path that will point to the data source configuration
wordlist: # global wordlist(s) to uses
- "./wordlists/deepmagic.com_top50kprefixes.txt"
- "./wordlists/deepmagic.com_top500prefixes.txt"
database: "postgres://username:password@localhost:5432/database?testing=works" # databases URI to be used when adding entries
bruteforce: # specific option to use when brute forcing is needed
enabled: true
wordlists: # wordlist(s) to use that are specific to brute forcing
- "./wordlists/subdomains-top1mil-5000.txt"
alterations: # specific option to use when brute forcing is needed
enabled: true
wordlists: # wordlist(s) to use that are specific to alterations
- "./wordlists/subdomains-top1mil-110000.txt"

datasourse.yaml file -->
datasources:

  • name: 360PassiveDNS
    ttl: 3600
    creds:
    account:
    apikey: null
  • name: ASNLookup
    creds:
    account:
    apikey: null
  • name: Ahrefs
    ttl: 4320
    creds:
    account:
    apikey: null
  • name: AlienVault
    creds:
    account:
    apikey: null
  • name: BeVigil
    creds:
    account:
    apikey: null
  • name: BigDataCloud
    creds:
    account:
    apikey: null
  • name: BinaryEdge
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: BufferOver
    creds:
    account:
    apikey: null
  • name: BuiltWith
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: C99
    ttl: 4320
    creds:
    account1:
    apikey: null
    account2:
    apikey: null
  • name: Censys
    ttl: 10080
    creds:
    account:
    apikey: null
    secret: null
  • name: Chaos
    ttl: 4320
    creds:
    account:
    apikey: null
  • name: CIRCL
    creds:
    account:
    username: null
    password: null
  • name: CertCentral
    creds:
    account:
    username: null
    apikey: null
  • name: DNSDB
    ttl: 4320
    creds:
    account:
    apikey: null
  • name: DNSlytics
    creds:
    account:
    apikey: null
  • name: DNSRepo
    creds:
    account:
    apikey: null
  • name: Deepinfo
    creds:
    account:
    apikey: null
  • name: Detectify
    creds:
    account:
    apikey: null
  • name: FacebookCT
    ttl: 4320
    creds:
    app1:
    apikey: null
    secret: null
    app2:
    apikey: null
    secret: null
  • name: FOFA
    ttl: 10080
    creds:
    account:
    username: null
    apikey: null
  • name: FullHunt
    creds:
    account:
    apikey: null
  • name: GitHub
    ttl: 4320
    creds:
    accountname:
    apikey: null
  • name: GitLab
    ttl: 4320
    creds:
    accountname:
    apikey: null
  • name: HackerTarget
    ttl: 1440
    creds:
    account:
    apikey: null
  • name: Hunter
    creds:
    account:
    apikey: null
  • name: IntelX
    creds:
    account:
    apikey: null
  • name: IPdata
    creds:
    account:
    apikey: null
  • name: IPinfo
    creds:
    account:
    apikey: null
  • name: LeakIX
    creds:
    account:
    apikey: null
  • name: Netlas
    creds:
    account:
    apikey: null
  • name: ONYPHE
    ttl: 4320
    creds:
    account:
    apikey: null
  • name: Pastebin
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: PassiveTotal
    ttl: 10080
    creds:
    account:
    username: null
    apikey: null
  • name: PentestTools
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: PublicWWW
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: Quake
    ttl: 4320
    creds:
    account:
    apikey: null
  • name: SOCRadar
    creds:
    account:
    apikey: null
  • name: SecurityTrails
    ttl: 1440
    creds:
    account:
    apikey: null
  • name: Shodan
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: Spamhaus
    ttl: 1440
    creds:
    account:
    username: null
    password: null
  • name: ThreatBook
    creds:
    account1:
    apikey: null
  • name: URLScan
    creds:
    account:
    apikey: null
  • name: VirusTotal
    ttl: 10080
    creds:
    account:
    apikey: null
  • name: WhoisXMLAPI
    creds:
    account:
    apikey: null
  • name: Yandex
    ttl: 1440
    creds:
    account:
    username: null
    apikey: null
  • name: ZETAlytics
    ttl: 1440
    creds:
    account:
    apikey: null
  • name: ZoomEye
    ttl: 1440
    creds:
    account:
    username: null
    password: null

this is the global options that will be considered. For example, minimum_ttl would be a global option used to compare

the minimum_ttl to the other datasources ttl.

global_options:
minimum_ttl: 1440

@navreet1425
Copy link

having same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants