[SCRIPT] Run Dillo with a random user agent

<[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Hi list, 

Here is a simple script which runs Dillo with a random user agent on
each run. I've been using it for a long time with no issues. It would
be interesting to have similar functionality built-in to Dillo at some
point, at least for me. 

$ cat rundillo.sh                   
#!/bin/sh

# runs dillo with a random user agent, from a list in agents.txt

# the ua must be the last line of dillorc, this deletes it:
echo -e '$d\nw\nq'| ed ~/.dillo/dillorc

# put a random ua line from agents.txt into the last line of dillorc
# each line in agents.txt must include http_user_agent='...'
cat ~/.dillo/agents.txt | sort -R | head -1 >> ~/.dillo/dillorc 

# run dillo:
dillo

-------------------------------

Here is an example 'agents.txt':


http_user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0'
http_user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0'
http_user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0'
http_user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0'
http_user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0'
http_user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 14.5; rv:123.0) Gecko/20100101 Firefox/123.0'
http_user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 14.5; rv:124.0) Gecko/20100101 Firefox/124.0'
http_user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 14.5; rv:125.0) Gecko/20100101 Firefox/125.0'
http_user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 14.5; rv:126.0) Gecko/20100101 Firefox/126.0'
http_user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 14.5; rv:127.0) Gecko/20100101 Firefox/127.0'

------------------------------

Just make sure there are no blank lines or comments in agents.txt

Anyway, hopefully this will be useful to someone. Enjoy :)

-Alex




_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.