Giter Site home page Giter Site logo

Comments (12)

HackTheBridge avatar HackTheBridge commented on August 18, 2024 1

I'm also getting this error for all options :/ I just checked pdtm and is up to date. Worked fine for me a few weeks ago. I'm using MacOS.

projectdiscovery $ asnmap -a AS43996

   ___   _____  __
  / _ | / __/ |/ /_ _  ___ ____
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/

		projectdiscovery.io

[INF] Current asnmap version v1.0.4 (latest)
[FTL] unexpected end of JSON input

from asnmap.

Mzack9999 avatar Mzack9999 commented on August 18, 2024 1

@gprime31 @HackTheBridge Thanks for reporting this bug - It seems like the final endpoint https://api.asnmap.sh/api/v1/asnmap?ip=xxx is returning for some reason an empty answer. I suspect it might be related to TLS configuration/certificates. I'll post an update as soon as we find the root cause. Thanks for your patience!

from asnmap.

MetzinAround avatar MetzinAround commented on August 18, 2024

Did you do the recent install with PDTM or another method?

from asnmap.

MetzinAround avatar MetzinAround commented on August 18, 2024

Just realized you answered that.

could you try installing with PDTM and see if that still causes the error?

from asnmap.

gprime31 avatar gprime31 commented on August 18, 2024

2023-05-22_11-04

from asnmap.

gprime31 avatar gprime31 commented on August 18, 2024

2023-05-22_11-05
Digital ocean droplet.

from asnmap.

gprime31 avatar gprime31 commented on August 18, 2024

2023-05-22_13-20
ok very strange, it works but some throw the error... same with asn numbers.

from asnmap.

gprime31 avatar gprime31 commented on August 18, 2024

tested on:
OS: Ubuntu 20.04.6 LTS x86_64
and
OS: Debian GNU/Linux 11 (bullseye) aarch64 have the error.

Linux Arch AMD-64 and Mint 21.1 AMD-64 work fine, no problems. is there something that comes with those distros by default that the others are missing?

from asnmap.

ehsandeep avatar ehsandeep commented on August 18, 2024

Build test are failing as well with same error

--- FAIL: TestGetASNFromIP (0.49s)
    --- FAIL: TestGetASNFromIP/found (0.27s)
        client_test.go:25: 
            	Error Trace:	/home/runner/work/asnmap/asnmap/libs/client_test.go:25
            	Error:      	Expected nil, but got: &json.SyntaxError{msg:"unexpected end of JSON input", Offset:0}
            	Test:       	TestGetASNFromIP/found
    --- FAIL: TestGetASNFromIP/not_found (0.22s)
        client_test.go:25: 
            	Error Trace:	/home/runner/work/asnmap/asnmap/libs/client_test.go:25
            	Error:      	Expected nil, but got: &json.SyntaxError{msg:"unexpected end of JSON input", Offset:0}
            	Test:       	TestGetASNFromIP/not_found
--- FAIL: TestGetASNFromOrg (0.67s)
    --- FAIL: TestGetASNFromOrg/not_found (0.23s)
        client_test.go:130: 
            	Error Trace:	/home/runner/work/asnmap/asnmap/libs/client_test.go:130
            	Error:      	Expected nil, but got: &json.SyntaxError{msg:"unexpected end of JSON input", Offset:0}
            	Test:       	TestGetASNFromOrg/not_found
[INF] google.com resolve to [142.251.2[11](https://github.com/projectdiscovery/asnmap/actions/runs/5087766935/jobs/9143446381?pr=125#step:6:12).238 2607:f8b0:400a:800::200e]
[INF] google.com resolve to [142.251.211.238 2607:f8b0:400a:800::200e]
[INF] somerandomdomainnamethatisfake.com resolve to []
FAIL
FAIL	github.com/projectdiscovery/asnmap/libs	2.098s
--- FAIL: TestProcessForDomainInput (0.25s)
    --- FAIL: TestProcessForDomainInput/Domain (0.25s)
        runner_test.go:[13](https://github.com/projectdiscovery/asnmap/actions/runs/5087766935/jobs/9143446381?pr=125#step:6:14)1: 
            	Error Trace:	/home/runner/work/asnmap/asnmap/runner/runner_test.go:131
            	Error:      	Expected nil, but got: &json.SyntaxError{msg:"unexpected end of JSON input", Offset:0}
            	Test:       	TestProcessForDomainInput/Domain

from asnmap.

tarunKoyalwar avatar tarunKoyalwar commented on August 18, 2024
echo AS134029 | ./asnmap                                                      1 ↵

   ___   _____  __              
  / _ | / __/ |/ /_ _  ___ ____ 
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/ 

		projectdiscovery.io

[INF] Current asnmap version v1.0.4 (latest)
HTTP/1.1 502 Bad Gateway
Cf-Cache-Status: BYPASS
Cf-Ray: 7d0043e5de651bdc-BOM
Connection: keep-alive
Date: Wed, 31 May 2023 15:31:41 GMT
Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=CpnpIaf4YwqhMT4LzAaBRG1DJWhRFNFkCf9FTe3OhHROombJRTZXCOBn6NrYBQN6mo%2BwqBCdSmTDXN%2F6%2BNjGmhP1DemI3aNW%2Fbu8nucuc5qwxdsAT4yf5f0Xv3DexAKqL30SVm5SdJ3B37w%3D"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
Vary: Accept-Encoding
Content-Length: 0


got response: 
[FTL] unexpected end of JSON input

from asnmap.

tarunKoyalwar avatar tarunKoyalwar commented on August 18, 2024

@ehsandeep seems to be resolved now . not able to reproduce it

$ echo AS134029 | ./asnmap    

   ___   _____  __              
  / _ | / __/ |/ /_ _  ___ ____ 
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/ 

		projectdiscovery.io

[INF] Current asnmap version v1.0.4 (latest)
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: max-age=14400
Cf-Cache-Status: EXPIRED
Cf-Ray: 7dde3bd699fef488-BOM
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Tue, 27 Jun 2023 14:03:29 GMT
Last-Modified: Mon, 26 Jun 2023 21:57:52 GMT
Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BsAqYrbFnPkkIQxY1r6dL8ywrkmmNIltlZAKUvVV4eRPrmqyTs5o%2FusFONKUPP8Vi63D1ruqeNd5jACuZjab4csjarvT7CZyFbw0pPGVKRbNlL0vHnk05ATgSg0tG06d7bvFEDe0qt4tvNo%3D"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
Strict-Transport-Security: max-age=15724800; includeSubDomains
Vary: Accept-Encoding

11d
[{"FirstIp":"103.57.226.0","LastIp":"103.57.226.255","ASN":134029,"Country":"IN","Org":"UIDAI-AS-IN Unique Identification Authority of India"},{"FirstIp":"103.58.114.0","LastIp":"103.58.114.255","ASN":134029,"Country":"IN","Org":"UIDAI-AS-IN Unique Identification Authority of India"}]
0


got response: [{"FirstIp":"103.57.226.0","LastIp":"103.57.226.255","ASN":134029,"Country":"IN","Org":"UIDAI-AS-IN Unique Identification Authority of India"},{"FirstIp":"103.58.114.0","LastIp":"103.58.114.255","ASN":134029,"Country":"IN","Org":"UIDAI-AS-IN Unique Identification Authority of India"}]
103.57.226.0/24
103.58.114.0/24

from asnmap.

srand2 avatar srand2 commented on August 18, 2024

Hey I just updated to latest version 1.0.4 and I'm receiving the error described here:

└─▪  echo AS197568 | asnmap

   ___   _____  __
  / _ | / __/ |/ /_ _  ___ ____
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/

                projectdiscovery.io

[INF] Current asnmap version v1.0.4 (latest)
[FTL] unexpected end of JSON input

from asnmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.