This file is indexed.

/usr/share/anyremote/cfg-data/Utils/weather.sh is in anyremote-data 6.5-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# Params
#  1. -current|-forecast
#  2. location

if [ "x$1" = "x" ] || [ "x$2" = "x" ]; then
   exit 1;
fi

if [ "x$1" = "x-current" ]; then

  curl -m 5 -s "http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$2"| \
    sed -n '/Updated:/,/<\/table>/p'|grep -v "Moon Phase"|grep -v "Raw METAR"| \
    sed 's/<\/td><td>/ /g;s/<tr>//g;s/<td>//g;s/<\/span>//g;s/<span class="nowrap">//g;s/<b>//g;s/<\/b>//g;s/<.*table>//g;s/<\/td>//g'| \
    tr '\n' ' '|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g'| \
    sed -e '/^[ \t]$/d'|tr -s ' \t'|tr -d '\t'|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g'| \
    sed -e 's/^[ \t]*//g'|sed '/^$/d'
fi

if [ "x$1" = "x-forecast" ]; then

  curl -m 5 -s "http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$2"| \
    sed -n '/name="forecast"/,/<\/table>/p'| \
    sed 's/<td align="right"//g;s/<img src.*>//g;s/<td align="left">//g;s/<.*center>//g;s/<table.*>//g;s/<\/a>//g;s/<\/div>//g;s/<br>//g;s/<a name.*>//g;'|\
    sed 's/<\/td><td>/ /g;s/<tr>//g;s/<td>//g;s/<\/span>//g;s/<span class="nowrap">//g;s/<b>//g;s/<\/b>//g;s/<.*table>//g;s/<\/td>//g'| \
    tr '\n' ' '|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g;s/ >//g'| \
    sed -e '/^[ \t]$/d'|tr -s ' \t'|tr -d '\t'|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g'| \
    sed -e 's/^[ \t]*//g'|sed '/^$/d'
fi

if [ "x$1" = "x-temperature" ]; then

  curl -m 2 -s "http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$2"| \
    sed -n '/Updated:/,/<\/table>/p'|grep -v "Moon Phase"|grep -v "Raw METAR"| \
    sed 's/<\/td><td>/ /g;s/<tr>//g;s/<td>//g;s/<\/span>//g;s/<span class="nowrap">//g;s/<b>//g;s/<\/b>//g;s/<.*table>//g;s/<\/td>//g'| \
    tr '\n' ' '|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g'| \
    sed -e '/^[ \t]$/d'|tr -s ' \t'|tr -d '\t'|sed 's/<\/tr>/\n/g;s/<br \/>/\n/g;s/&deg;//g;s/&nbsp;//g'| \
    sed -e 's/^[ \t]*//g;/^$/d'|grep Temperature|sed 's/Temperature//g'
fi

#ID=`id -u`
#curl -s "http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$2" > /tmp/weather.${ID}.html

#WHERE=`grep "Observed at" /tmp/weather.${ID}.html|sed 's/<br \/>/\n/g'|td -s ' '`


#cat /tmp/weather.${ID}.html |grep 'td class'|grep taR|grep -v "img src"|sed 's/<tr class=[^>]*>//g;s/<td class=[^>]*>//g;s/<\/td>//g;s/<td>//g;s/<b>//g;s/<\/b>//g;s/<\/tr>//g'|tr -s ' '|tr -d \\t

exit 1;