Jump to content
UBot Underground

Assigning List Of My Servers To New Domains Loop In Loop


Recommended Posts

Hi All

 

Hoping someone can help with some advise.

 

I am stuck on one of the bots I am currently creating where I have a csv file of domains and another of servers. The domain list represents any domains I have recently purchased and I want the bot to loop through the server and domain list to add the server details into a new column of the domain table. For example

 

Domain list

Domain1.com

Domain2.com

Domain3.com

Domain4.com

 

Server List 

Server1 | IP Address | UserName | Password

Server2 | IP Address | UserName | Password

 

I would like to add them in the domain table like below

 

Domain1.com | Server1 | IP Address | UserName | Password

Domain2.com | Sever2 | IP Address | UserName | Password

Domain3.com | Server1 | IP Address | UserName | Password

Domain4.com | Sever2 | IP Address | UserName | Password

Domain5.com | Server1 | IP Address | UserName | Password

Domain6.com | Sever2 | IP Address | UserName | Password

 

Note the list of domains will be a lot larger than this and the server list also larger, but the main point is that I would like the smaller server list to loop through until the domain list has been populated. 

 

Below is what i have attempted but cannot get my head around this part, any help or advise would be appreciated 

 

clear table(&domains)
clear table(&servers)
ui open file("Select your file with your server details",#serverDetails)
ui open file("Select the file with your domains",#domainList)
create table from file(#serverDetails,&servers)
create table from file(#domainList,&domains)
set(#domRow,0,"Global")
set(#serverRow,0,"Global")
loop($table total rows(&domains)) {
    loop($table total rows(&servers)) {
        set table cell(&domains,#domRow,1,$table cell(&servers,#serverRow,0))
        set table cell(&domains,#domRow,2,$table cell(&servers,#serverRow,1))
        set table cell(&domains,#domRow,3,$table cell(&servers,#serverRow,2))
        
    }
increment(#serverRow)
    increment(#domRow)
}

Edited by bhoffman
Link to post
Share on other sites

HI Nick,

 

These are for new domains and basically want to round robin my servers against any new domains I purchase, my project is much larger than this the ultimate goal is to, CloudFlare setup, DNS NS configuration with my registrar along with site creation in CPanel.

 

Regards

Ben

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...