bash -x pimp .config ./telnet.tar
+ CALL_FB='/bin/bash ./fritzbox'
+ CALL_MPFD='/bin/bash ./multipart_form'
++ mktemp
+ configfile=/tmp/tmp.dILhmvlx8M
+ '[' -z .config ']'
+ cat .config
+ '[' 0 -ne 0 ']'
++ mktemp
+ envfile=/tmp/tmp.9UIkbiLRQL
+ /bin/bash ./fritzbox login --config-file=/tmp/tmp.dILhmvlx8M --environment-file=/tmp/tmp.9UIkbiLRQL
+ rc=0
+ '[' 0 -ne 0 ']'
++ /bin/bash ./fritzbox get --config-file=/tmp/tmp.dILhmvlx8M --environment-file=/tmp/tmp.9UIkbiLRQL /jason_boxinfo.xml
+ boxinfo='
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
+ rc=0
+ '[' 0 -ne 0 ']'
+ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
+ . /tmp/tmp.9UIkbiLRQL
++ FRITZ_BOX=192.168.178.1
++ FRITZ_ADDR=192.168.178.1
++ FRITZ_USER=xyz
++ FRITZ_SID=cee580c02a3ecf16
++ FRITZ_SID_TIME=1473016030
++ FRITZ_ACCESS=Phone:rw,Dial:rw,HomeAuto:rw,BoxAdmin:rw
++ FRITZ_LOGIN=0
++ sed -n -e 's|.*<j:Name>\(.*\)</j:Name>.*|\1|p'
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial>C80E140890F9</j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
+ model='FRITZ!Box 6490 Cable'
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
++ sed -n -e 's|.*<j:HW>\(.*\)</j:HW>.*|\1|p'
+ hwrev=213
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
++ sed -n -e 's|.*<j:Version>\(.*\)</j:Version>.*|\1|p'
+ version=141.06.24
++ sed -n -e 's|.*<j:Revision>\(.*\)</j:Revision>.*|\1|p'
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
+ revision=30308
++ sed -n -e 's|.*<j:OEM>\(.*\)</j:OEM>.*|\1|p'
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
+ oem=avm
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
++ sed -n -e 's|.*<j:Lang>\(.*\)</j:Lang>.*|\1|p'
+ lang=de
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
++ sed -n -e 's|.*<j:Annex>\(.*\)</j:Annex>.*|\1|p'
+ annex=Kabel
++ echo '
<j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
<j:Name>FRITZ!Box 6490 Cable</j:Name>
<j:HW>213</j:HW>
<j:Version>141.06.24</j:Version>
<j:Revision>30308</j:Revision>
<j:Serial></j:Serial>
<j:OEM>avm</j:OEM>
<j:Lang>de</j:Lang>
<j:Annex>Kabel</j:Annex>
<j:Lab></j:Lab>
<j:Country>049</j:Country>
<j:Flag>crashreport</j:Flag>
<j:UpdateConfig>1</j:UpdateConfig></j:BoxInfo>'
++ sed -n -e 's|.*<j:Country>\(.*\)</j:Country>.*|\1|p'
+ country=049
+ echo -e 'Address\t\t192.168.178.1'
Address 192.168.178.1
+ echo -e 'Model\t\tFRITZ!Box 6490 Cable'
Model FRITZ!Box 6490 Cable
+ echo -e 'HWRevision\t213'
HWRevision 213
+ echo -e 'Firmware\t141.06.24-30308'
Firmware 141.06.24-30308
+ echo -e 'Branding\tavm'
Branding avm
+ echo -e 'Annex\t\tKabel'
Annex Kabel
+ echo -e 'Language\tde'
Language de
+ echo -e 'Country\t\t049\n'
Country 049
+ echo 'Uploading the image file to your device ...'
Uploading the image file to your device ...
++ /bin/bash ./multipart_form new
+ form=/tmp/tmp.rpa5Mng9T3
+ /bin/bash ./multipart_form addfield /tmp/tmp.rpa5Mng9T3 sid cee580c02a3ecf16
+ /bin/bash ./multipart_form addfile /tmp/tmp.rpa5Mng9T3 UploadFile ./telnet.tar application/octet-stream
+ /bin/bash ./multipart_form addfield /tmp/tmp.rpa5Mng9T3 apply
++ /bin/bash ./multipart_form postfile /tmp/tmp.rpa5Mng9T3
+ postdata=/tmp/tmp.rpa5Mng9T3/formdata
++ mktemp
+ request=/tmp/tmp.Y2LY2mC1ma
+ echo -e -n 'POST /cgi-bin/firmwarecfg HTTP/1.0\r\n'
+ echo -e -n 'Host: 192.168.178.1\r\n'
+ echo -e -n 'User-Agent: Pimp_my_FRITZBox 1.0\r\n'
+ echo -e -n 'Connection: keep-alive\r\n'
+ cat /tmp/tmp.rpa5Mng9T3/formdata
++ mktemp
+ output=/tmp/tmp.JdZMaXRs2g
+ nc -q 120 192.168.178.1 80
+ rc=0
+ /bin/bash ./multipart_form cleanup /tmp/tmp.rpa5Mng9T3
+ grep -q '<button type="submit" name="install">Update fortsetzen</button>' /tmp/tmp.JdZMaXRs2g
+ echo 'Unexpected response received from your device.'
Unexpected response received from your device.
+ cat /tmp/tmp.JdZMaXRs2g
HTTP/1.0 200 OK
Connection: close
Content-type: text/html; charset=utf-8
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=content-type content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>FRITZ!Box</title>
<link rel="stylesheet" type="text/css" href="/css/default/main.css"/>
<link rel="stylesheet" type="text/css" href="/css/default/static.css"/>
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="/css/default/ie_fix.css"/>
<![endif]-->
</head>
<body>
<div id="main_page_all">
<div id="intro_bar_box">
<div id="intro_bar">
<div id="intro_bar_left" class="oemlogo_avm"></div>
<div id="intro_bar_middle"></div>
</div>
</div>
<div class="clear_float"></div>
<div id="page_content_no_menu_box">
<div class="blue_bar_back">
<h2>FRITZ!Box Update</h2>
</div>
<div id="page_content" class="page_content">
<div class="formular">
<p>Das Update ist fehlgeschlagen:</p>
<p class="ErrorMsg">Es trat ein nicht näher spezifizierter Fehler während des Updates auf. (0)</p>
<p>Wiederholen Sie das Update oder starten Sie die FRITZ!Box neu.</p>
<h4>
<input type="radio" name="action" id="uiChooseUpdate" checked>
<label for="uiChooseUpdate">Update wiederholen</label>
</h4>
<div id="uiUpdatePart" class="formular">
<form method="POST" action="/cgi-bin/firmwarecfg" enctype="multipart/form-data" id="uiMainForm">
<input type="hidden" name="sid" value="cee580c02a3ecf16">
<ol>
<li>
<p>Geben Sie die Datei mit dem Update an:</p>
<input type="file" name="UploadFile" size="40">
</li>
<li>
<p>Starten Sie das Update mit der Schaltfläche "Update".</p>
<button type="submit" name="upgrade" id="uiUpdate">Update</button>
</li>
</ol>
</form>
</div>
<h4>
<input type="radio" name="action" id="uiChooseReboot">
<label for="uiChooseReboot">FRITZ!Box neu starten</label>
</h4>
<div id="uiRebootPart" class="formular">
<p>Klicken Sie auf die Schaltfläche "Neu starten", um mit dem bisherigen FRITZ!OS weiterzuarbeiten.</p>
<form method="POST" action="/cgi-bin/firmwarecfg" enctype="multipart/form-data">
<div>
<input type="hidden" name="sid" value="cee580c02a3ecf16">
<button type="submit" name="reboot" id="uiReboot">Neu starten</button>
</div>
</form>
</div>
<div id="uiStatus"> </div>
</div>
</div>
<script type="text/javascript" src="/js/jxl.js"></script>
<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript">
function init() {
var form = jxl.get("uiMainForm");
if (form) {
form.onsubmit = uiDoOnMainFormSubmit;
}
uiDoOnActionChoice();
jxl.addEventHandler("uiChooseUpdate", "click", uiDoOnActionChoice);
jxl.addEventHandler("uiChooseReboot", "click", uiDoOnActionChoice);
}
function uiDoOnMainFormSubmit() {
jxl.setHtml("uiStatus", "Die Anlage wird aktualisiert. Bitte warten...");
jxl.disable("uiUpdate");
jxl.disable("uiReboot");
jxl.setStyle("uiMainForm", "cursor", "wait");
return true;
}
function uiDoOnActionChoice() {
jxl.display("uiUpdatePart", jxl.getChecked("uiChooseUpdate"));
jxl.display("uiRebootPart", jxl.getChecked("uiChooseReboot"));
}
window.onload = init;
</script>
<div class="clear_float"></div>
</div>
</div>
</div>
</body>
</html>
++ cleanup 0
++ cleanup_file /tmp/tmp.dILhmvlx8M /tmp/tmp.9UIkbiLRQL /tmp/tmp.rpa5Mng9T3/formdata /tmp/tmp.Y2LY2mC1ma /tmp/tmp.rpa5Mng9T3 /tmp/tmp.JdZMaXRs2g
++ '[' 6 -gt 0 ']'
++ '[' 19 -lt 6 ']'
++ '[' -d /tmp/tmp.dILhmvlx8M -o -f /tmp/tmp.dILhmvlx8M ']'
+++ '[' -d /tmp/tmp.dILhmvlx8M ']'
++ rm -f /tmp/tmp.dILhmvlx8M
++ shift
++ '[' 5 -gt 0 ']'
++ '[' 19 -lt 6 ']'
++ '[' -d /tmp/tmp.9UIkbiLRQL -o -f /tmp/tmp.9UIkbiLRQL ']'
+++ '[' -d /tmp/tmp.9UIkbiLRQL ']'
++ rm -f /tmp/tmp.9UIkbiLRQL
++ shift
++ '[' 4 -gt 0 ']'
++ '[' 28 -lt 6 ']'
++ '[' -d /tmp/tmp.rpa5Mng9T3/formdata -o -f /tmp/tmp.rpa5Mng9T3/formdata ']'
++ shift
++ '[' 3 -gt 0 ']'
++ '[' 19 -lt 6 ']'
++ '[' -d /tmp/tmp.Y2LY2mC1ma -o -f /tmp/tmp.Y2LY2mC1ma ']'
+++ '[' -d /tmp/tmp.Y2LY2mC1ma ']'
++ rm -f /tmp/tmp.Y2LY2mC1ma
++ shift
++ '[' 2 -gt 0 ']'
++ '[' 19 -lt 6 ']'
++ '[' -d /tmp/tmp.rpa5Mng9T3 -o -f /tmp/tmp.rpa5Mng9T3 ']'
++ shift
++ '[' 1 -gt 0 ']'
++ '[' 19 -lt 6 ']'
++ '[' -d /tmp/tmp.JdZMaXRs2g -o -f /tmp/tmp.JdZMaXRs2g ']'
+++ '[' -d /tmp/tmp.JdZMaXRs2g ']'
++ rm -f /tmp/tmp.JdZMaXRs2g
++ shift
++ '[' 0 -gt 0 ']'
++ exit 0
+ exit