get duckduckgo urls from dorks



MugGod

Basic
Joined
08.11.19
Messages
44
Reaction score
2
Points
6
Code:
#!/bin/sh
#sunjester / https://underwurld.club/
if [ -z $1 ];
then
        echo "please give a duck dork"
        exit
fi

echo "searching duckduckgo.."
curl -sLk -H 'User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11895.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.125 Safari/537.36' \
        -H 'Host: duckduckgo.com' \
        -H 'Referer: https://duckduckgo.com/' \
        'https://duckduckgo.com/html/?q='$1'&t=h_&ia=web&s=999' >src

echo "gathering links.."
grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" src >links

#echo "removing duplicates.."
cat links |sort|uniq >links2

echo "cleaning up directory"
rm src links
mv links2 urls

echo "done!"
and to use it...
Code:
./duck.sh 'inurl+php+id'
make sure you urlencode your dorks as i did not add that into the script. the urls will be stored in a file named "urls"
 

safecar

Basic
Joined
18.12.20
Messages
6
Reaction score
0
Points
0
Thank you for your work! I tried it and its working well. Is it possible to make it work with google instead of duckduck?
I have got the feeling, google has got better search results than duckduck or does duckduck got any advantage?
 

s1ash

Basic
Joined
01.11.19
Messages
35
Reaction score
0
Points
6
Nice example to see how to do the proper request on bash.
Thanks.
 

survivepos

Carding Novice
Joined
15.02.24
Messages
4
Reaction score
0
Points
1
Code:
#!/bin/sh
#sunjester / https://underwurld.club/
if [ -z $1 ];
then
        echo "please give a duck dork"
        exit
fi

echo "searching duckduckgo.."
curl -sLk -H 'User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11895.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.125 Safari/537.36' \
        -H 'Host: duckduckgo.com' \
        -H 'Referer: https://duckduckgo.com/' \
        'https://duckduckgo.com/html/?q='$1'&t=h_&ia=web&s=999' >src

echo "gathering links.."
grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" src >links

#echo "removing duplicates.."
cat links |sort|uniq >links2

echo "cleaning up directory"
rm src links
mv links2 urls

echo "done!"
and to use it...
Code:
./duck.sh 'inurl+php+id'
make sure you urlencode your dorks as i did not add that into the script. the urls will be stored in a file named "urls"
Thank you!
 
Top Bottom