Skip to content

Instantly share code, notes, and snippets.

@Hades32
Created January 18, 2020 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hades32/a5c7b0490ef34f157b23557f363e8dc0 to your computer and use it in GitHub Desktop.
Save Hades32/a5c7b0490ef34f157b23557f363e8dc0 to your computer and use it in GitHub Desktop.
vodafone station endless loop
for(i=0 ; i<getdata['StaticNHostTable'].length ; i++) {
if(index != null) {
if(index == i) {
tt.find('span.inner-dropbox').text(getdata['StaticNHostTable'][i]['HostName']);
MAC = (getdata['StaticNHostTable'][i]['MAC']).split(":");
IP = (getdata['StaticNHostTable'][i]['IP']).split(".");
for(j=0; j<6; j++){
tt.find('.extra_mac_address'+(j+1)).text(MAC[j]);
}
for(k=0; k<4; k++){
tt.find('.extra_ip_address'+(k+1)).text(IP[k]);
}
}
}
else{
tt.find('.inner-dropbox').text(SelDeviceName);
MAC = MacAddrToAdd.split(":");
IP = IPAddrToAdd.split(".");
for(i=0; i<6; i++){ // <-------------------- AND HERE YOU FUCKED UP... Don't use global vars!
tt.find('.extra_mac_address'+(i+1)).text(MAC[i]);
}
for(j=0; j<4; j++){
tt.find('.extra_ip_address'+(j+1)).text(IP[j]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment