Advertisement
svenhoefer

Untitled

Dec 2nd, 2020
1,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.68 KB | None | 0 0
  1. diff --git a/scripts-sh/plugins/smarthomeinfo/smarthomeinfo.so b/scripts-sh/plugins/smarthomeinfo/smarthomeinfo.so
  2. index b6b68b6..4a233c2 100755
  3. --- a/scripts-sh/plugins/smarthomeinfo/smarthomeinfo.so
  4. +++ b/scripts-sh/plugins/smarthomeinfo/smarthomeinfo.so
  5. @@ -92,12 +92,12 @@ then
  6.  
  7.         # login aufbauen und hashen
  8.         CPSTR="$Challenge-$Passwd"
  9. -       if [ -e /bin/asc2uni ]
  10. +       if [ type asc2uni >/dev/null 2>&1 ]
  11.         then
  12.                 asc2uni $CPSTR  > /tmp/anrufer.md5
  13.                 echo "SmartHomeInfo - asc2uni wird genutzt"
  14.         else
  15. -               echo -n $CPSTR | /bin/iconv -f ISO8859-1 -t UTF-16LE > /tmp/anrufer.md5
  16. +               echo -n $CPSTR | iconv -f ISO8859-1 -t UTF-16LE > /tmp/anrufer.md5
  17.                 echo "SmartHomeInfo - iconv wird genutzt"
  18.         fi
  19.         MD5=`md5sum /tmp/anrufer.md5 | sed -e s/' '.*$//`
  20. @@ -123,12 +123,12 @@ else
  21.                 Challenge=`cat /tmp/anrufer.tmp | awk '{match($0,/Challenge>[^<>]+</); print substr($0,RSTART+10,RLENGTH-11)}'`
  22.                 # login aufbauen und hashen
  23.                 CPSTR="$Challenge-$Passwd"
  24. -               if [ -e /bin/asc2uni ]
  25. +               if [ type asc2uni >/dev/null 2>&1 ]
  26.                 then
  27.                         asc2uni $CPSTR  > /tmp/anrufer.md5
  28.                         echo "SmartHomeInfo - asc2uni wird genutzt"
  29.                 else
  30. -                       echo -n $CPSTR | /bin/iconv -f ISO8859-1 -t UTF-16LE > /tmp/anrufer.md5
  31. +                       echo -n $CPSTR | iconv -f ISO8859-1 -t UTF-16LE > /tmp/anrufer.md5
  32.                         echo "SmartHomeInfo - iconv wird genutzt"
  33.                 fi
  34.                 #echo -n $CPSTR > /tmp/anrufer.md5
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement