Speedport LTE 2 Status abfrage

  • VB.NET

Es gibt 8 Antworten in diesem Thema. Der letzte Beitrag () ist von Andrejd1987.

    Speedport LTE 2 Status abfrage

    Hi lang ist´s her
    und da wollte ich mal ein kleines Tool schreiben um den status abzufragen des Routers Speedport LTE 2.

    also da man mit Speedport.ip ja auf der Login seite den Status sieht mit den Balken und ob jetzt lte verbunden ist oder nicht, müsste man das abfragen ja ohne eines logins bewerkstelligen können oder ?

    da ich nicht ganz so fitt in sachen Router abfrage bin weis ich da noch nicht ganz weiter.
    die Grund idee war eigentlich das für mein Handy zu machen für WB8 ;)
    aber so für den PC wäre das schon nicht schlecht wenn man nicht jedesmal die seite aufmachen will ;)

    mfg Andrejd


    Okay ich versuche von der "speedport.ip." seite aus dem Quelltext daten auszulesen.
    Würde das eigentlich funktionieren ?
    beim grob durchschauen bin ich da noch nicht ganz schlau geworden ;)

    mfg Andrejd

    was meint ihr soll ich den kompletten Quelltext hier reinhauen ?
    bzw. nur

    HTML-Quellcode

    1. <body> bis </body>

    ich würde es ja vvlt. hinkriegen wenn ich nur wüsste welchen wert ich abrufen müsste. ;)


    mfg Andrejd
    Bilder
    • Status.jpg

      35,4 kB, 1.078×304, 283 mal angesehen
    • Tool.jpg

      22,46 kB, 391×302, 305 mal angesehen

    Dieser Beitrag wurde bereits 9 mal editiert, zuletzt von „Andrejd1987“ ()

    Bei dem LTE und Sim sollte es genügen abzufragen welches bild vorhanden ist.
    gibt dort wahrscheinlich 2 stück einmal eins mit grün und eins mit grau/rot für nicht verbunden.

    das ganze natürlich per RegEx. Und die adresse speedport.ip kannst du nur abrufen wenn du im gleichen netzwerk bist. also per lan/wlan mit diesem router verbunden bist.


    Und ansonsten falls nicht mit Bildern dann per CSS Class/ID bei nem div tag.

    Hau am besten mal den Quelltext hier rein mit einem Spoiler drum.

    Mfg
    Grüße , xChRoNiKx

    Nützliche Links:
    Visual Studio Empfohlene Einstellungen | Try-Catch heißes Eisen
    Okay nur das mit LTE und Sim das selbe Bild benutzen, ;) und ja falls es so nicht rüberkam, will ich natürlich von meinem eigenem Router den Status abfragen ohne jedesmal den Browser auf zu machen und gegebenfalls einzuloggen.

    und wie gesagt ist das ein langer Quelltext.
    erstmal nur 500 zeilen weil sonst die antwort zu lang ist :(

    Spoiler anzeigen

    HTML-Quellcode

    1. <head>
    2. <link rel="icon" type="image/vnd.microsoft.icon" href="/images/favicon.ico" />
    3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    4. <title> Router </title>
    5. <script type="text/javascript" src="/js/loadbyver.js?ver=V100R001C748SP056"></script>
    6. <script type="text/javascript">
    7. loadCss("/lang/lang.css");
    8. loadRes("/lang/msgerrcode.res");
    9. loadRes("/lang/wan.res");
    10. loadJs("/js/util.js");
    11. loadJs("/js/util/base.js");
    12. loadRes("/lang/sim_lock.res");
    13. </script>
    14. <style type="text/css">
    15. .STYLE1 {
    16. font-size: 12px;
    17. font-family: Arial;
    18. }
    19. a {
    20. color: #000000;
    21. cursor: hand;
    22. font-family: Arial;
    23. font-size: 14px;
    24. text-decoration: none;
    25. }
    26. td {
    27. font-family: Arial;
    28. font-size: 14px;
    29. }
    30. a:hover {
    31. color: #990000;
    32. }
    33. body {
    34. margin: 0 0 0 0;
    35. font-family: Arial;
    36. }
    37. .page_title
    38. {
    39. color : gray;
    40. font-family:Arial;
    41. font-size:28px;
    42. font-weight:bold;
    43. display:none;
    44. }
    45. .readonly
    46. {
    47. background-color:#dddddd;
    48. }
    49. .hand
    50. {
    51. cursor:hand;
    52. }
    53. #tdPLMN{
    54. color:#ffffff;
    55. }
    56. </style>
    57. <script language="JavaScript" type="text/javascript">
    58. var chgPassword1Menu = "Admin_2_0_4_1";
    59. var chgPassword2Menu = "Admin_2_0_4_1";
    60. var chgPassword3Menu = "Admin_2_0_4_1";
    61. var verifyPin1Menu = "Admin_2_2_0_1";
    62. var verifyPin2Menu = "Admin_2_2_0_1";
    63. var verifyPin3Menu = "Admin_2_2_0_1";
    64. var simLock1Menu = "Admin_2";
    65. var simLock2Menu = "Admin_2_11";
    66. var simLock3Menu = "Admin_2_11_0";
    67. var MACRO_SIM_CARD_INVALID = 0;
    68. var MACRO_PIN_REQ = 1;
    69. var MACRO_PUK_REQ = 2;
    70. var MACRO_PIN_DISABLE = 3;
    71. var MACRO_PIN_VALIDATE = 4;
    72. var passwordChanged = function(domain, isChanged) {
    73. this.domain = domain;
    74. this.isChanged = isChanged;
    75. };
    76. var equipMode = 0;
    77. var simStatus = 4;
    78. var curStatus = [3,0,2,3,4,'0x00000000','0x00000000','internet.home','0','0','Telekom.de'];
    79. var host = [["InternetGatewayDevice.LANDevice.1.LANHostConfigManagement.IPInterface.1","192.168.1.1"],null];
    80. var wanIPMAC = {'dataip' : '2.174.94.37' , 'voiceip' : '' , 'dataMAC':'00:1E:10:1F:06:03', 'voiceMAC' : '00:1E:10:1F:06:05'};
    81. var passwordChangedArray = new Array(new passwordChanged("InternetGatewayDevice.UserInterface.X_Web.UserInfo.1","1"),null);
    82. var passwordChangedObj = passwordChangedArray[0];
    83. var simLockStatus = [2,10];
    84. var oldAddrPrimary = host[0][1];
    85. var pushinfo_enable = "disable";
    86. var LoginError = "0:1074266212";
    87. var Cookieflag = 0;
    88. var LoginTimes = 0;
    89. var LoginErrorCode = 0;
    90. var MACRO_THOME_DOMAIN = "speedport.ip";
    91. var hostname = window.location.hostname.toLowerCase();
    92. if ((hostname == oldAddrPrimary)
    93. || ((window.location.protocol.toLowerCase() != "http:") && (hostname == MACRO_THOME_DOMAIN)))
    94. {
    95. top.location.replace("http://"+MACRO_THOME_DOMAIN);
    96. }
    97. var list = LoginError.split(":");
    98. if (list.length == 2)
    99. {
    100. LoginTimes = list[0];
    101. LoginErrorCode = list[1];
    102. }
    103. if ((location.host != host[0][1])&&(location.host != wanIPMAC.dataip)&&(window.location.hostname.toLowerCase() != MACRO_THOME_DOMAIN))
    104. {
    105. if("enable" == pushinfo_enable)
    106. {
    107. window.location.replace("http://"+MACRO_THOME_DOMAIN+"/html/pushinfo.asp");
    108. }
    109. else
    110. {
    111. window.location.replace("http://"+MACRO_THOME_DOMAIN+"/html/domainError.asp");
    112. }
    113. }
    114. var inittime = 0;
    115. var initcount = 0;
    116. var firmenu = 'Admin_0';
    117. var secmenu = 'Admin_0_0';
    118. var thirdmenu = 'Admin_0_0_0';
    119. var strCookie = document.cookie;
    120. var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    121. var base64DecodeChars = new Array(
    122. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    123. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    124. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
    125. 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
    126. -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
    127. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
    128. -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
    129. 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
    130. function base64encode(str) {
    131. var out, i, len;
    132. var c1, c2, c3;
    133. len = str.length;
    134. i = 0;
    135. out = "";
    136. while(i < len) {
    137. c1 = str.charCodeAt(i++) & 0xff;
    138. if(i == len)
    139. {
    140. out += base64EncodeChars.charAt(c1 >> 2);
    141. out += base64EncodeChars.charAt((c1 & 0x3) << 4);
    142. out += "==";
    143. break;
    144. }
    145. c2 = str.charCodeAt(i++);
    146. if(i == len)
    147. {
    148. out += base64EncodeChars.charAt(c1 >> 2);
    149. out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
    150. out += base64EncodeChars.charAt((c2 & 0xF) << 2);
    151. out += "=";
    152. break;
    153. }
    154. c3 = str.charCodeAt(i++);
    155. out += base64EncodeChars.charAt(c1 >> 2);
    156. out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
    157. out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
    158. out += base64EncodeChars.charAt(c3 & 0x3F);
    159. }
    160. return out;
    161. }
    162. function base64decode(str) {
    163. var c1, c2, c3, c4;
    164. var i, len, out;
    165. len = str.length;
    166. i = 0;
    167. out = "";
    168. while(i < len) {
    169. do {
    170. c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
    171. } while(i < len && c1 == -1);
    172. if(c1 == -1)
    173. break;
    174. do {
    175. c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
    176. } while(i < len && c2 == -1);
    177. if(c2 == -1)
    178. break;
    179. out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
    180. do {
    181. c3 = str.charCodeAt(i++) & 0xff;
    182. if(c3 == 61)
    183. return out;
    184. c3 = base64DecodeChars[c3];
    185. } while(i < len && c3 == -1);
    186. if(c3 == -1)
    187. break;
    188. out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
    189. do {
    190. c4 = str.charCodeAt(i++) & 0xff;
    191. if(c4 == 61)
    192. return out;
    193. c4 = base64DecodeChars[c4];
    194. } while(i < len && c4 == -1);
    195. if(c4 == -1)
    196. break;
    197. out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
    198. }
    199. return out;
    200. }
    201. function SubmitForm(type)
    202. {
    203. var adminRadio = document.getElementById('rd_Username_admin');
    204. var guestRadio = document.getElementById('rd_Username_guest');
    205. var Username = "";
    206. if(adminRadio.checked)
    207. {
    208. Username = "admin";
    209. }
    210. else if(guestRadio.checked)
    211. {
    212. Username = "user";
    213. }
    214. var Password = document.getElementById('txt_Password');
    215. if (Username == "")
    216. {
    217. SetErrInfo(1, gErrStr0);
    218. if (type)
    219. return false;
    220. else
    221. return;
    222. }
    223. if (Password.value == "" && Username == "admin")
    224. {
    225. SetErrInfo(1, gErrStr1);
    226. if (type)
    227. return false;
    228. else
    229. return;
    230. }
    231. if(passwordChangedObj.isChanged === "0") {
    232. var cookie = "FirstMenu=" + chgPassword1Menu + "; path=/";
    233. document.cookie = cookie;
    234. var cookie = "SecondMenu=" + chgPassword2Menu + "; path=/";
    235. document.cookie = cookie;
    236. var cookie = "ThirdMenu=" + chgPassword3Menu + "; path=/";
    237. document.cookie = cookie;
    238. } else if(simStatus == MACRO_PIN_REQ || simStatus == MACRO_PUK_REQ) {
    239. var cookie = "FirstMenu=" + verifyPin1Menu + "; path=/";
    240. document.cookie = cookie;
    241. var cookie = "SecondMenu=" + verifyPin2Menu + "; path=/";
    242. document.cookie = cookie;
    243. var cookie = "ThirdMenu=" + verifyPin3Menu + "; path=/";
    244. document.cookie = cookie;
    245. }
    246. else if(1 == simLockStatus[0])
    247. {
    248. var cookie = "FirstMenu=" + simLock1Menu + "; path=/";
    249. document.cookie = cookie;
    250. var cookie = "SecondMenu=" + simLock2Menu + "; path=/";
    251. document.cookie = cookie;
    252. var cookie = "ThirdMenu=" + simLock3Menu + "; path=/";
    253. document.cookie = cookie;
    254. } else {
    255. var cookie = "FirstMenu=" + firmenu + "; path=/";
    256. document.cookie = cookie;
    257. var cookie = "SecondMenu=" + secmenu + "; path=/";
    258. document.cookie = cookie;
    259. var cookie = "ThirdMenu=" + thirdmenu + "; path=/";
    260. document.cookie = cookie;
    261. }
    262. var date = new Date();
    263. date.setTime(date.getTime()+(365*24*60*60*1000));
    264. var expires = "; expires="+date.toGMTString();
    265. var lantype = getSelectVal('Language');
    266. var cookie = "Language=" + lantype + expires + "; path=/";
    267. document.cookie = cookie;
    268. var form = new webSubmitForm();
    269. form.setAction('/index/login.cgi');
    270. form.addParameter('Username', Username);
    271. form.addParameter('Password', base64encode(Password.value));
    272. if(!hassubmit) {
    273. form.submit();
    274. hassubmit = true;
    275. }
    276. if (type)
    277. return true;
    278. }
    279. hassubmit = false;
    280. function get_cookie (cookie_name)
    281. {
    282. var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
    283. if (results)
    284. {
    285. return (results[2]);
    286. }
    287. else
    288. {
    289. return "";
    290. }
    291. }
    292. function showConnectionStatus(connStatus)
    293. {
    294. var strMode = 'gray';
    295. if( 3==connStatus[0] )
    296. {
    297. strMode = 'g';
    298. }
    299. else if(0==connStatus[0] || 6==connStatus[0])
    300. {
    301. strMode = 'r';
    302. }
    303. else
    304. {
    305. if(1 == connStatus[8] && 0 === connStatus[9])
    306. {
    307. strMode = 'r';
    308. }
    309. else
    310. {
    311. strMode = 'searching';
    312. }
    313. }
    314. var objConn = document.getElementById("netmode_id");
    315. if (3==connStatus[0] || connStatus[10] != '')
    316. {
    317. objConn.innerHTML = gVarNetMode[connStatus[4]];
    318. }
    319. else
    320. {
    321. objConn.innerHTML = gVarNetMode[0];
    322. }
    323. var connLightElem = document.getElementById("cardBar");
    324. connLightElem.src = "/images/point_" + strMode + ".gif";
    325. }
    326. function showSimStatus(simCardStatus)
    327. {
    328. var simCardLight = "gray";
    329. if(1 == simCardStatus || 2 != simLockStatus[0])
    330. {
    331. simCardLight = "r";
    332. }
    333. else if(2 == simCardStatus )
    334. {
    335. simCardLight = "g";
    336. }
    337. var simLightElem = document.getElementById("ratBar");
    338. simLightElem.src = "/images/point_" + simCardLight + ".gif";
    339. }
    340. function showSigRate(status, sigRate)
    341. {
    342. var sigImageElem = document.getElementById("evdoBar");
    343. if(2 != simLockStatus[0])
    344. {
    345. sigImageElem.src = "/images/level_0.gif";
    346. }
    347. else
    348. {
    349. if(1 == status[8])
    350. {
    351. sigImageElem.src = "/images/roam_level_" + status[3] + ".gif";
    352. }
    353. else if(0 == status[8])
    354. {
    355. sigImageElem.src = "/images/level_" + status[3] + ".gif";
    356. }
    357. }
    358. }
    359. function setOperatorAndRoaming(status)
    360. {
    361. if(2 != status[2])
    362. {
    363. $('tdPLMN').innerHTML = "";
    364. $("tdRoam").style.display = "none";
    365. }
    366. else
    367. {
    368. $('tdPLMN').innerHTML = status[10];
    369. if(1 == status[8])
    370. {
    371. $("tdRoam").style.display = "";
    372. if(0 == status[9])
    373. {
    374. $('imgRoam').src = '/images/roam_disable.gif';
    375. }
    376. else
    377. {
    378. $('imgRoam').src = '/images/roam.gif';
    379. }
    380. }
    381. else if(0 == status[8])
    382. {
    383. $("tdRoam").style.display = "none";
    384. }
    385. }
    386. }
    387. function statusChanged(status)
    388. {
    389. showConnectionStatus(status);
    390. showSimStatus(status[2]);
    391. showSigRate(status, status[3]);
    392. setOperatorAndRoaming(status);
    393. }
    394. var xmlHttpSignal = null;
    395. function signalStateChange()
    396. {
    397. if(4 == xmlHttpSignal.readyState && 200 == xmlHttpSignal.status)
    398. {
    399. try
    400. {
    401. var connStatus = eval(xmlHttpSignal.responseText);
    402. statusChanged(connStatus);
    403. xmlHttpSignal = null;
    404. }
    405. catch (e)
    406. {
    407. var forjslint = 0;
    408. }
    409. }
    410. }
    411. function RefreshSignalPic()
    412. {
    413. if(xmlHttpSignal == null)
    414. {
    415. xmlHttpSignal = CreateXMLHttp();
    416. xmlHttpSignal.onreadystatechange = signalStateChange;
    417. xmlHttpSignal.open("GET", "/html/conn_status.asp", true);
    418. xmlHttpSignal.send(null);
    419. }
    420. setTimeout("RefreshSignalPic()", 8000);
    421. }
    422. function LoadFrame()
    423. {
    424. if(equipMode == 1)
    425. {
    426. document.getElementById('id_equip').style.display = 'block';
    427. document.getElementById('id_normal').style.display = 'none';
    428. return;
    429. }
    430. document.cookie = "SessionID_R3=0; path=/";
    431. var lang = get_cookie('Language');
    432. setSelect('Language', lang);
    433. if ((LoginErrorCode > 0)
    434. && (LoginErrorCode < gPubErrStrArray.length)
    435. && (LoginErrorCode != 3)
    436. && (LoginErrorCode != '0'))
    437. {
    438. SetErrInfo(1, gPubErrStrArray[LoginErrorCode]);
    439. }
    440. var password = document.getElementById("txt_Password");
    441. password.focus();
    442. setTimeout("RefreshSignalPic()", 8000);
    443. }
    444. function onCancel()
    445. {
    446. var Password = document.getElementById('txt_Password');
    447. var adminRadio = document.getElementById('rd_Username_admin');
    448. var guestRadio = document.getElementById('rd_Username_guest');
    449. adminRadio.checked = true;
    450. guestRadio.checked = false;
    451. Password.disabled = false;
    452. Password.className = "";
    453. Password.value = '';
    454. var errinfo = document.getElementById("errInfoTable_id");
    455. if(errinfo) {
    456. errinfo.style.visibility = "";
    457. }
    458. }
    459. function onHandleKeyDown(e)
    460. {
    461. var key = 0;
    462. if (window.event)
    463. key = window.event.keyCode;
    464. else if (e)
    465. key = e.which ;
    466. if (key == 13)
    467. {
    468. return SubmitForm(1);
    469. }
    470. return true;
    471. }
    472. function ChangeLanguage()
    473. {
    474. var date = new Date();
    475. date.setTime(date.getTime()+(365*24*60*60*1000));
    476. var expires = "; expires="+date.toGMTString();
    477. var lantype = getSelectVal('Language');
    478. var cookie = "Language=" + lantype + expires + "; path=/";
    479. document.cookie = cookie;
    480. var form = new webSubmitForm();
    481. form.setAction('/tes/chglogin.cgi');
    482. form.submit();
    483. }
    484. function SetErrInfo(type, str)
    485. {
    486. var extraStr = '';
    487. if (type > 0)
    488. {
    489. extraStr = str + ' ';
    490. if (0 == LoginTimes)
    491. {
    492. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + str;
    493. return;
    494. }
    495. }
    496. if(Cookieflag == 1)
    497. {
    498. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + gErrStr2;
    499. }


    mfg Andrejd
    Okay hier erstmal der rest vom Quelltext
    Spoiler anzeigen

    HTML-Quellcode

    1. else if (Cookieflag == 2)
    2. {
    3. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + gErrStr3;
    4. }
    5. else if (LoginTimes == 0)
    6. {
    7. getElement('erroinfoId').innerHTML = '<font color="#0000FF">' + gErrStr4;
    8. }
    9. else if (LoginTimes == 1)
    10. {
    11. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + gErrStr8;
    12. }
    13. else if (LoginTimes == 2)
    14. {
    15. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + gErrStr9;
    16. }
    17. else if (LoginTimes >= 3)
    18. {
    19. getElement('erroinfoId').innerHTML = '<font color="#FF3300">' + gErrStr10;
    20. }
    21. }
    22. function showPasswordField(flg)
    23. {
    24. var passwordObj = document.getElementById("txt_Password");
    25. var errinfo = document.getElementById("errInfoTable_id");
    26. if(!passwordObj)
    27. {
    28. return;
    29. }
    30. if(flg)
    31. {
    32. passwordObj.disabled = false;
    33. passwordObj.className = "";
    34. if(errinfo) {
    35. errinfo.style.visibility = "";
    36. }
    37. }
    38. else
    39. {
    40. passwordObj.value = "";
    41. passwordObj.disabled = true;
    42. passwordObj.className = "readonly";
    43. if(errinfo) {
    44. errinfo.style.visibility = "hidden";
    45. }
    46. }
    47. }
    48. function getcookie(name){
    49. var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    50. if(arr != null){
    51. return unescape(arr[2]);
    52. }else{
    53. return "";
    54. }
    55. }
    56. document.onkeypress = onHandleKeyDown;
    57. </script>
    58. </head>
    59. <body onLoad="LoadFrame();">
    60. <div id="id_equip" style="display:none">
    61. <span style="font-size:20pt; font-weight:bold; color:red">
    62. The route is in Equipment Mode now!!!<br />
    63. Please set it to Normal Mode.
    64. </span>
    65. </div>
    66. <div id="id_normal">
    67. <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    68. <tr>
    69. <td height="76" valign="top" style="background-color:#e3007a;">
    70. <div style="width:100%;height:68px;overflow:hidden; padding-top:5px">
    71. <table width="100%" border="0" cellpadding="0" cellspacing="0" height="68" background="/images/logoback.gif">
    72. <tr>
    73. <td width="162" height="68">
    74. <table width="162" border="0" cellpadding="0" cellspacing="0" height="100%" background="/images/logoback.gif" >
    75. <tr>
    76. <td width="112">
    77. <img src="/images/logo.gif" border="0" style="position:relative; top:0px"></img>
    78. </td>
    79. </tr>
    80. </table>
    81. </td>
    82. <td width="200" style="color:#FFFFFF;font-size:22px;padding-top:25px;"><script type="text/javascript">document.write(gVarTitle)</script></td>
    83. <td valign="top">
    84. <table width="100%" height="61" border="0" >
    85. <tr>
    86. <td height="25" colspan="5" style=''></td>
    87. </tr>
    88. <tr>
    89. <td height="27" width="18">&nbsp;</td>
    90. <td valign="middle">
    91. <span class="page_title"><script type="text/javascript">document.write(gVarTitle)</script></span>
    92. </td>
    93. <td width=200 class="TitleText">
    94. <div id="title_id">&nbsp;</div>
    95. </td>
    96. <td width="20px" style="font-family: Arial; font-size: 12px;">
    97. <table style="text-align: center;" cellpadding="0" cellspacing="0">
    98. <tr>
    99. <td style="font-size: 12px; padding-left: 10px; padding-right: 10px;" id="tdPLMN" nowrap>
    100. </td>
    101. </tr>
    102. </table>
    103. </td>
    104. <td width=200>
    105. <div style="width:250px;">
    106. <table >
    107. <tr>
    108. <td style="font-family: Arial; font-size: 12px;" id="tdRoam">
    109. <table width="100%" style="text-align:center; margin-top:5px;" cellpadding="0" cellspacing="0" >
    110. <tr>
    111. <td>
    112. <div style="font-size: 12px; color:#ffffff; font-weight:600;" id="network_rat_id">ROAMING</div>
    113. </td><td>&nbsp;</td><td>
    114. <img height="20px" width="20px" style="" id="imgRoam">
    115. </td>
    116. </tr>
    117. </table>
    118. </td>
    119. <td style="font-family: Arial; font-size: 12px;">
    120. <table width="100%" style="text-align:center;" cellpadding="0" cellspacing="0" >
    121. <tr><td>
    122. <div style="font-size: 12px; color:#ffffff; font-weight:600;margin-top:5px;" id="sig_id">SIG</div>
    123. </td><td>&nbsp;&nbsp;</td><td><script type="text/javascript">
    124. var imgurl = "/images/level_" + curStatus[3] + ".gif";
    125. document.write('<img height="18px" width="32" src="' + imgurl + '" id="evdoBar" />');
    126. </script></td><td>&nbsp;&nbsp;</td></tr>
    127. </table>
    128. </td>
    129. <td style="font-family: Arial; font-size: 12px;">
    130. <table width="100%" style="text-align:center;margin-top:5px;" cellpadding="0" cellspacing="0" >
    131. <tr>
    132. <td>
    133. <div style="font-size: 12px; color:#ffffff; font-weight:600;" id="netmode_id">
    134. <script type="text/javascript">
    135. if ((3==curStatus[0]) || (3 == curStatus[1]))
    136. {
    137. document.write( gVarNetMode[curStatus[4]] );
    138. }
    139. else
    140. {
    141. document.write( gVarNetMode[0] );
    142. }
    143. </script>
    144. </div>
    145. </td>
    146. <td>&nbsp;</td><td><script type="text/javascript">
    147. var strMode = 'gray';
    148. if ((3 == curStatus[0]))
    149. {
    150. strMode = 'g';
    151. }
    152. else if(0==curStatus[0] || 6==curStatus[0])
    153. {
    154. strMode = 'r';
    155. }
    156. else
    157. {
    158. if(1 == curStatus[8] && 0 === curStatus[9])
    159. {
    160. strMode = 'r';
    161. }
    162. else
    163. {
    164. strMode = 'searching';
    165. }
    166. }
    167. document.write('<img height="20px" width="20px" src="/images/point_' + strMode + '.gif" id="cardBar" />');
    168. </script></td><td>&nbsp;&nbsp;</td></tr>
    169. </table>
    170. </td>
    171. <td style="font-family: Arial; font-size: 12px;">
    172. <table width="100%" style="text-align:center; margin-top:5px;" cellpadding="0" cellspacing="0" >
    173. <tr><td>
    174. <div style="font-size: 12px; color:#ffffff; font-weight:600;" id="network_rat_id">SIM</div>
    175. </td><td>&nbsp;</td><td><script type="text/javascript">
    176. var simColor = "gray";
    177. if(1 == curStatus[2])
    178. {
    179. simColor = "r";
    180. }
    181. else if(2 == curStatus[2] )
    182. {
    183. simColor = "g";
    184. }
    185. document.write('<img height="20px" width="20px" src="/images/point_' + simColor + '.gif" id="ratBar" />');
    186. </script></td><td>&nbsp;&nbsp;</td></tr>
    187. </table>
    188. </td>
    189. </tr>
    190. </table>
    191. </div>
    192. </td>
    193. <td width="40px"></td>
    194. </tr>
    195. <tr> </tr>
    196. </table>
    197. </td>
    198. <td width="18" >&nbsp;</td>
    199. </tr>
    200. </table>
    201. </div>
    202. </td>
    203. </tr>
    204. <tr>
    205. <td height="500" background="/images/loginbackground.gif" align="center">
    206. <table height="225" width="292" cellpadding="0" cellspacing="0"
    207. border="0" style="position: relative; top: -30px;">
    208. <tr>
    209. <td>
    210. <table height="225" class="index_login_table" cellpadding="0" cellspacing="0"
    211. border="0">
    212. <tr>
    213. <td width="6" background="/images/logleft.gif"></td>
    214. <td background="/images/logmid.gif">
    215. <table width="83%" height="101" border="0" cellpadding="0"
    216. cellspacing="0">
    217. <tr>
    218. <td height="10"></td>
    219. </tr>
    220. <tr>
    221. <td width="100" align="right">
    222. <img src="/images/password.png"width="41" height="37"></img>
    223. </td>
    224. <td width="136" align="center" id="passwordId">&nbsp;
    225. <script language="JavaScript" type="text/javascript">document.write(gVarPwd);</script>
    226. </td>
    227. <td align="center">
    228. <input id="txt_Password" name="Password" type="password"
    229. style="height: 22px; width: 155px; font-family: Arial;">
    230. </td>
    231. </tr>
    232. <tr>
    233. <td height="10"></td>
    234. </tr>
    235. <tr>
    236. <td align="right">
    237. <img src="/images/language.png" width="41" height="37"></img>
    238. </td>
    239. <td align="center" id="languageId">&nbsp;
    240. <script language="JavaScript" type="text/javascript">document.write(gVarLang);</script>
    241. </td>
    242. <td align="center">
    243. <script type="text/javascript">
    244. var selectStr = '<select name="Language" size="1" id="Language" onchange="ChangeLanguage();" style="width: 155px; height: 22px;font-family:Arial">';
    245. var langNow = getcookie("Language");
    246. var langSelectedIndex = 0;
    247. for(var index = 0 ; index < languageArray.length; index ++) {
    248. if(langNow===languageArray[index].value) {
    249. selectStr+='<option value="'+ languageArray[index].value +'" selected>'+ languageArray[index].display +'</option>';
    250. langSelectedIndex = index;
    251. } else {
    252. selectStr+='<option value="'+ languageArray[index].value +'">'+ languageArray[index].display +'</option>';
    253. }
    254. }
    255. selectStr += '</select>';
    256. document.write(selectStr);
    257. </script>
    258. </td>
    259. </tr>
    260. <tr>
    261. <td></td>
    262. <td></td>
    263. <td></td>
    264. </tr>
    265. </table>
    266. <table width="100%" border="0" cellpadding="0" cellspacing="0" id="errInfoTable_id">
    267. <tr>
    268. <td height="10"></td>
    269. <td></td>
    270. <td></td>
    271. <td></td>
    272. </tr>
    273. <tr>
    274. <td width="2%">
    275. <td width="51" height="32" align="right">
    276. <img src="/images/sigh.gif" width="25" height="20"></img>
    277. </td>
    278. <td width="6" align="left"></td>
    279. <td align="left" id="erroinfoId" class="newclass">
    280. <script language="JavaScript" type="text/javascript">SetErrInfo(0, "");</script>
    281. </td>
    282. </tr>
    283. </table>
    284. </td>
    285. <td width="7" background="/images/logright.gif"></td>
    286. </tr>
    287. </table>
    288. </td>
    289. </tr>
    290. <tr>
    291. <td height="30"></td>
    292. </tr>
    293. <tr>
    294. <td>
    295. <table height="35" width="100%" cellpadding="0" cellspacing="0"
    296. border="0" style="border-color: #efefef;">
    297. <tr>
    298. <td class="index_login_button_left_width">&nbsp;</td>
    299. <td id="loginleft" height="38" width="5" background="/images/loginitleftt.gif">
    300. </td>
    301. <td id="loginmid0" width="60" align="center" class="hand" onClick="SubmitForm(0);" background="/images/lognitmid.gif">
    302. <img src="/images/login.png" onClick="SubmitForm(0);" width="37" height="32" ></img>
    303. </td>
    304. <td id="loginmid" width="55" align="left" class="hand" onClick="SubmitForm(0);" background="/images/lognitmid.gif">
    305. <a id="btnLogin" href="#" onClick="SubmitForm(0);" >
    306. <script language="JavaScript" type="text/javascript">document.write(gVarLogin);</script>
    307. </a>
    308. </td>
    309. <td id="loginright" height="38" width="6" background="/images/loginitright.gif"></td>
    310. <td>&nbsp;</td>
    311. <td id="cancelleft" height="38" width="5" background="/images/loginitleftt.gif">
    312. </td>
    313. <td id="cancelmid0" width="55" align="center" class="hand" onClick="onCancel();" background="/images/lognitmid.gif">
    314. <img src="/images/cancel.png" width="37" height="32" onClick="onCancel();"></img>
    315. </td>
    316. <td id="cancelmid" height="38" width="60" class="hand" onClick="onCancel();" background="/images/lognitmid.gif" align="center">
    317. <a href="#" onClick="onCancel();" id="btnCancel">
    318. <script language="JavaScript" type="text/javascript">document.write(gVarCancel);</script>
    319. </a>
    320. </td>
    321. <td id="cancelright" height="38" width="6" background="/images/loginitright.gif"></td>
    322. <td class="index_login_button_right_width">&nbsp;</td>
    323. </tr>
    324. </table>
    325. </td>
    326. </tr>
    327. </table>
    328. </td>
    329. </tr>
    330. <tr>
    331. <td style="background-color: #d1d1d1" valign="bottom"></td>
    332. </tr>
    333. </table>
    334. <div style="width:100%;left:0;bottom:0;position:fixed">
    335. <table id="tabCopyright" width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
    336. <tr>
    337. <td style="background-color:#d1d1d1">
    338. <div align="center" class="STYLE1"><script type="text/javascript">document.write(gVarRight);</script></div>
    339. </td>
    340. </tr>
    341. </table>
    342. </div>
    343. <div style="display:none;">
    344. <input id="rd_Username_admin" style="display:none;" type="radio" name="Username" value="admin" onclick="showPasswordField(true);" checked="checked" />
    345. <input id="rd_Username_guest" style="display:none;" type="radio" name="Username" value="guest" onclick="showPasswordField(false);" />
    346. </div>
    347. <script type="text/javascript">
    348. statusChanged(curStatus);
    349. if(langNow === "") {
    350. document.getElementById("Language").selectedIndex = langSelectedIndex;
    351. }
    352. </script>
    353. </div>
    354. </body>
    355. </html>


    und ich habe glaube was endeckt ;) bzw. wegen dem status der Balken.

    Quellcode

    1. <img src="/images/level_3.gif" id="evdoBar" height="18px" width="32">

    müsste ich nicht einfach abfragen welches bild die id="evdobar" benutzt, bzw. die id abfragen oder ?

    ich möchte ja nur mit hilfe der ID evdoBar herausfinden welches bild gerade benutzt wird. "erstmal ;)"
    geht das nur über HttpWebRequest oder auch mit dem Webbrowser ?

    mfg Andrejd

    Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „Andrejd1987“ ()

    Okay nice nach unzähligen suchen habe ich das gefunden ;)
    Link

    VB.NET-Quellcode

    1. WebBrowser.Document.GetElementById("Id").GetAttribute("src")

    damit kann ich jetzt die id´s abrufen ob das jeweilige Bild gerade benutzt wird.

    VB.NET-Quellcode

    1. If webb1.Document.GetElementById("evdoBar").GetAttribute("src") = "http://speedport.ip/images/level_3.gif" Then
    2. ProgressBar1.Value = 100
    3. ProgressBar2.Value = 100
    4. ProgressBar3.Value = 100
    5. End If

    nur mal den teil wer für das verantwortlich ist

    so und jetzt denke ich mal das dass so alles klappt aber ich lasse den thread mal noch auf, vllt. finde ich noch was ;)

    mfg Andrejd