1

I'd like to use an html form for users to type in their search terms and then update iframes on a page with the src attribute being the search page of multiple sites, namely Google Desktop, Salesforce and our development wiki. The issue I'm having is with Google Desktop. It appears they attach a hash on the end of your search request that prohibits me from just using:

http://127.0.0.1:4664/search?q=whatever&flags=68&num=10&s=pxCw38_-Hd7wCIZtD7-wbl6aaJY

If i could just send the search term, my job would be done.

Any clue on generating this hash via javascript?
Or possibly another route to integrate Google Desktop with other searches?

Nakilon
  • 34,866
  • 14
  • 107
  • 142
textual
  • 9,872
  • 2
  • 17
  • 10
  • Can you tell, which terms are in URL your provided? Maybe it's Base64? – Nakilon Dec 11 '10 at 17:55
  • in the above example, i was searching for 'whatever'. the other query string vars (flags, num and s) were added by google desktop app. – textual Dec 30 '10 at 23:48

2 Answers2

1

According to: http://code.google.com/apis/desktop/docs/queryapi.html


The stored query URL has the first part of the URL that you need to perform any Google Desktop query. It looks something like the following:

http://127.0.0.1:4664/search&s=1ftR7c_hVZKYvuYS-RWnFHk91Z0?q=

How you get the stored query URL depends on whether your code is running on Windows or Mac OS X.

Windows

Get the query URL from the registry using the following value name:

HKEY_CURRENT_USER\Software\Google\Google Desktop\API\search_url

Mac OS X

Use CFPreferences to fetch the stored query URL from the user preferences domain com.google.Desktop.WebServer using the key search_url. For example:

CFStringRef val = CFPreferencesCopyValue(
    CFSTR("search_url"),
    CFSTR("com.google.Desktop.WebServer"),
    kCFPreferencesCurrentUser,
    kCFPreferencesAnyHost);
if (val) {
  // act on the value
  CFRelease(val);
}

So, not sure how to get to that value from javascript, but it looks like they expect query terms to be appended to the end.

tiwahu
  • 356
  • 3
  • 5
1

Someone tried to fetch the hash by sniffing traffic: http://graag.blogspot.com/2007/10/sniffing-google-desktop-for-linux.html