Jump to content
UBot Underground

Exceeded The Range Of The List


Recommended Posts

I'm having a problem I can't figure out with exceeding the range of $next list item error, which is in a loop. Navigate>$next list item >%URLs.

I didn't have this error last night and confused as to what changed.

 

The code is:

clear list(%URLs)
ui open file("Drupal Target URLs",#URLs)
add list to list(%URLs,$list from file(#URLs),"Delete","Global")
set list position(%URLs,0)
loop($list total(%URLs)) {
    change proxy($next list item(%proxies))
    set proxy credentials("proxy123","123password")
    navigate($next list item(%URLs),"Wait")
    wait for browser event("Page Loaded",10)

 

Any ideas as to what I'm missing?

 

Thanks for any help!

post-8859-0-50276300-1507047623_thumb.jpg

Link to post
Share on other sites

try

set list position(%proxies,0)

and check %URLs count = %URLs count or not

 

i thing error at

change proxy($next list item(%proxies))
Link to post
Share on other sites

 

try

set list position(%proxies,0)

and check %URLs count = %URLs count or not

 

i thing error at

change proxy($next list item(%proxies))

Hi Pash,

I do have proxies list position at 0. Sorry, I guess I should've posted the full code.

The image attached above shows error at $next list item(%URLs) right?

 

Here's the code above the loop:

clear list(%AccountData)
clear list(%proxies)
ui open file("Proxies",#proxies)
add list to list(%proxies,$list from file(#proxies),"Delete","Global")
set list position(%proxies,0)
clear list(%email)
ui text box("Email Address",#EmailAddress)
add item to list(%email,#EmailAddress,"Don\'t Delete","Global")
clear list(%Password)
ui text box("Password (For Accounts)",#Password)
add item to list(%Password,#Password,"Don\'t Delete","Global")
clear list(%URLs)
ui open file("Drupal Target URLs",#URLs)
add list to list(%URLs,$list from file(#URLs),"Delete","Global")
set list position(%URLs,0)
loop($list total(%URLs)) {
    change proxy($next list item(%proxies))
    set proxy credentials("proxy123","123password")
    navigate($next list item(%URLs),"Wait")
    wait for browser event("Page Loaded",10)
Link to post
Share on other sites

try

clear list(%AccountData)
clear list(%proxies)
clear list(%Password)
clear list(%URLs)
clear list(%email)
ui open file("Proxies",#proxies)
add list to list(%proxies,$list from file(#proxies),"Delete","Global")
ui text box("Email Address",#EmailAddress)
ui text box("Password (For Accounts)",#Password)
ui open file("Drupal Target URLs",#URLs)
add item to list(%email,#EmailAddress,"Don\'t Delete","Global")
add item to list(%Password,#Password,"Don\'t Delete","Global")
add list to list(%URLs,$list from file(#URLs),"Delete","Global")
set list position(%proxies,0)
set list position(%URLs,0)
set list position(%proxies,0)
if($comparison($list total(%proxies),"< Less than",$list total(%URLs))) {
    then {
        alert("Error proxy < url

Proxy: {$list total(%proxies)}
Url : {$list total(%URLs)}")
        stop script
    }
    else {
    }
}
loop($list total(%URLs)) {
    change proxy($next list item(%proxies))
    set proxy credentials("proxy123","123password")
    navigate($next list item(%URLs),"Wait")
    wait for browser event("Page Loaded",10)
}

Link to post
Share on other sites

That stopped the script totally. No action in the browser and no Alert.
I'm confused.........
Why do you think it's a proxy issue when the error clearly says %URLs next list issue?

Link to post
Share on other sites

Here is an simple example for everyone

clear list(%urls)
clear list(%proxies)
add list to list(%urls,$list from text("http://google.com
http://ubotstudio.com
http://ubotdocta.ocm
http://yahoo.com
http://bing.com
http://facebook.com
http://twitter.com
url 8",$new line),"Delete","Global")
add list to list(%proxies,$list from text("p1
p2
p3",$new line),"Delete","Global")
loop($list total(%urls)) {
    set(#url NLI,$next list item(%urls),"Global")
    wait(1)
    if($comparison($list position(%proxies),">= Greater than or equal to",$list total(%proxies))) {
        then {
            set list position(%proxies,0)
        }
    }
    set(#proxy NLI,$next list item(%proxies),"Global")
    wait(1)
}
ui stat monitor("list pos urls: {$list position(%urls)}
<br>current url: {#url NLI}","<br>
<br>list pos proxies: {$list position(%proxies)}
<br>current proxy: {#proxy NLI}")

Regards,
CD

looping uneven list.ubot

  • Like 1
Link to post
Share on other sites
  • 4 weeks later...

Hey cjacobs,

 

Please look at my screen shot.  https://www.screencast.com/t/Be3g372W

 

When I looked at your code I saw a couple of things missing.

 

#1 and #3 are paired perfectly and that is great!

 

But when I looked at #2 I did not a version of "set list position" like #4.

 

if you add this command "set list position(%proxies,0)" before or after #4 then it should work.

As long as the lists %proxies and %URLs have the same number of items inside of them.

IF %URLs has more list items than %proxies then you were get the same error but it will state

the %proxies list in the error message.

 

It is also good practice to test for such errors.  I would add an IF command to compare the total

values of %URLs against %proxies.  You definitely don't want less %proxies than %URLs.

 

Otherwise, your code looks good.  Short and concise.

 

I hope I have answered your original question.

 

Buddy

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...