Guest User

WolframAlpha bash API Scraper / used to get timespan for crypto challenge 20101008

a guest
Sep 24th, 2010
1,414
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Israel Torres
  3. # Fri Sep 24 10:44:47 PDT 2010
  4. # WolframAlpha API Scraper / used to get timespan for crypto challenge 20101008 crypto.israeltorres.org
  5. ttotl=`curl -s 'http://api.wolframalpha.com/v1/query?input=from+Tue+Sep+14+19%3A00%3A21+PDT+2010+to+Fri+Oct+8+17%3A00+PDT+2010&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
  6. tleft=`curl -s 'http://api.wolframalpha.com/v1/query?input=now+to+Fri+Oct+8+17%3A00+PDT+2010&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
  7. telap=`curl -s 'http://api.wolframalpha.com/v1/query?input=from+Tue+Sep+14+19%3A00%3A21+PDT+2010+to+now&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
  8. echo -e "total time:\t$ttotl"
  9. echo -e "time remaining:\t$tleft"
  10. echo -e "time elapsed:\t$telap"
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×