Comments (12)
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.
@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.
Did you do the recent install with PDTM or another method?
from asnmap.
Just realized you answered that.
could you try installing with PDTM and see if that still causes the error?
from asnmap.
from asnmap.
from asnmap.
ok very strange, it works but some throw the error... same with asn numbers.
from asnmap.
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.
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.
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.
@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.
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)
- [FTL] unexpected end of JSON input HOT 1
- When domain is provided, `input` is IP
- Response data inconsistency compare to raw data
- Unexpected end of JSON input HOT 6
- `-output` option is not working HOT 1
- [FTL] invalid character '<' looking for beginning of value - version v1.0.5 HOT 13
- panic: runtime error: index out of range [15] with length 0
- invalid character HOT 1
- invalid character '<' looking for beginning of value HOT 1
- Invalid Character 'e' Error in ASNmap with AS5650
- Support for auth option using latest API with auth
- getting : [FTL] invalid character '<' looking for beginning of value
- unable to add API key for asnmap HOT 1
- output not being writen to stdout with -c -silent HOT 1
- json: cannot unmarshal string into Go value of type []*asnmap.Response
- Different results from different sources HOT 2
- asnmap command is not recognizing please do tell is it the problem for path HOT 3
- The -org option (and not only this one) does not accept Strings
- UDP i/o timeout when executing domain command HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asnmap.