Ignore:
Timestamp:
Nov 6, 2012, 9:17:39 PM (13 years ago)
Author:
gost
Message:

[callmonitor] add new 7390 laborfirmware

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswaptools_callmonitor/var/swap/titanplugins/callmonitor1/fritzbox_msg_new.sh

    r18425 r18474  
    201201loadFritzBook () {
    202202 if [ $usePhoneBook = "1" ]; then
     203                rm $FRITZBUCH
    203204                if [ ! -f $FRITZBUCH ]; then
    204205                        # Challenge abholen
     
    219220                        SID=`wget -O - --post-data="$POSTDATA" "http://$FRITZBOXIP/cgi-bin/webcm" 2>/dev/null| grep "name=\"sid\"" | head -1 | awk '{match($0,/value="[^"]+"/); print substr($0,RSTART+7,RLENGTH-8)}'`
    220221                        echo "login aufbauen und hashen ende"
     222
    221223                        $CURL --data "telcfg:settings/Phonebook/Books/Select=0&getpage=../html/de/menus/menu2.html&var:pagename=fonbuch&sid=$SID&var:menu=fon&var:lang=de" http://$FRITZBOXIP/cgi-bin/webcm  | grep ">TrFon" | sed s/'<script type="text\/javascript">'// | sed s/';<\/script>'// | sed s/'('/'"'/ | sed s/')'/'"'/ > /tmp/curlhelp.tmp
    222 
    223224                        while read line
    224225                                do
     
    232233                        done < /tmp/curlhelp.tmp
    233234                        rm /tmp/curlhelp.tmp
     235
     236                        if [ ! -f $FRITZBUCH ]; then
     237                                #testen ob neues Telefonbuch
     238                                #$CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua > /tmp/test.curl
     239                                $CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua | grep "<td class=\"tname\">" | sed s/"<td class=\"tname\">"/"\nfritztele<"/ | sed s/">"/"<"/g | sed s/"'"//g | sed s/'"'//g > /tmp/curlhelp.tmp
     240                                while read line
     241                                        do
     242                                                art=`echo $line | cut -d'<' -f1`
     243                                                if [ $art == "fritztele" ]; then
     244                                                        name=`echo $line | cut -d'<' -f2`
     245                                                        nummer=`echo $line | cut -d'<' -f8`
     246                                                        echo "$nummer#$name" >> $FRITZBUCH
     247                                                fi
     248                                        done < /tmp/curlhelp.tmp
     249                                rm /tmp/curlhelp.tmp
     250                        fi
     251
    234252                fi
    235253                cp $FRITZBUCH $FRITZCACHE
Note: See TracChangeset for help on using the changeset viewer.