Open jaikishantulswani opened 4 years ago
You can pipe the output into sed
.
$ python linkfinder.py -i https://example.com/example.js -o cli | sed 's#^\/#https://example.com/#g'
Hi @EdOverflow thank you for your reply. Here as per your solution only the parent domain is appended to all the relative urls. But I have some scenario where I use -d
flag and linkfinder found some more sub domains and their relative url's too, so how we append them ?
Example:
python linkfinder.py -i https://example.com -d -o cli
/test
/test1
/test2
https://new.example.com
/demo1
/demo2
So in the above scenario there is one more subdomain and their relative url's found so how we append https://new.example.com too.
Regards, @jaikishantulswani
Hi @EdOverflow any workaround for this ?
Hi @EdOverflow any workaround for this ?
@jaikishantulswani, as far as I can tell this might be too difficult to solve as is because it is not always clear which host the JS file belongs to. In your example, there is no guarantee that /demo2
belongs to https://new.example.com
, so you might end up with a lot of false-positives.
I am open to suggestions though. Maybe someone out there knows of a potential solution for this problem.
@GerbenJavado @EdOverflow Is there any workaround to append domain name before the relative url's like full url ?