I use the "Find Blocked Domain In Lists" / "Query lists"-option. I search for "Microsoft" and get the message "Over 100 results found for microsoft - This can be overridden using the -all option". So how to use the "all"-option? After searching for a solution in the internet it seems I have to edit the queries.js-File. What changes do I have to do to get the query-results on the screen?
From the command terminal on the Pi: pihole -q -adlist -all microsoft
The option does not exist from the web admin gui:
pihole -q -h
Usage: pihole -q [option] <domain>
Example: 'pihole -q -exact domain.com'
Query the adlists for a specified domain
Options:
-adlist Print the name of the block list URL
-exact Search the block lists for exact domain matches
-all Return all query matches within a block list
-h, --help Show this help dialog
Like @schnugg, I get the same message in the web gui
Match found in Blacklist
adbroker.mp.dse.microsoft.com
[i] Over 100 results found for microsoft
This can be overridden using the -all option
But the terminal shows me (with and without -all)
pi@nanopineo:~$ pihole -q -adlist Microsoft
Match found in Blacklist
adbroker.mp.dse.microsoft.com
pi@nanopineo:~$
pi@nanopineo:~$ pihole -q -adlist -all Microsoft
Match found in Blacklist
adbroker.mp.dse.microsoft.com
pi@nanopineo:~$
Yes, you are right. But do you actually have over 100 entries with "Microsoft" in your lists? Probably you have over 100 entries and the error is that one entry is shown
The script on the web GUI is using the same command as the command line, with the exception of the added "-all". Note that the "exact" modifier is selectable on the web GUI interface.
Run these two commands and there should be a difference in outputs:
Likely, both are.
Commands are normally case-sensitive in Unix unless stated otherwise.
So 'microsoft' and 'Microsoft' might very well produce different results
OK, many thanks JFB! I edited the queryads.php and now I can see all results also in the GUI. I cant see the sense of the 100-result-restriction in the GUI ...
Thanks @Bucking_Horn.
I now had a closer look into the code and the behavior.
If I query the lists on the web interface, the entered domain gets converted to lowercase in queryads.js.
So I have no influence to upper/lower case.
But on the CLI the domain input in fact is case-sensitive.
Since the domain names are not case-sensitive, I wonder why this was made this way.
I expected that the CLI script does the low case convertion and not the Java Script.
Then the output from CLI and the web interface would always be equal.
At the moment I'm not sure if the gravity domains also gets converted to lower case as well.