Jump to content
UBot Underground

How to limit to run only 1 compiled bot instant at a time


Recommended Posts

Hello,

I am making a bot to auto commenting on forum. But I don't want user to have the ability to run multiple instant of bot at the same time, to keep them from abusing the bot and attract to much attention.

Right now, anyone can open multiple instant of compiled bot. Is there anyway to limit them to only able to run 1 instant of bot?

Thanks guys!

Link to post
Share on other sites

you could write a file to a hidden area on the pc, that the bot is running, and have the bot check in teh beginning if it exists, and if so dont run.

 

but the bad side to this is that if they prematurely end the process of the bot, and the end part of the bot doesnt delete the file, then it could cause the next instance to not run.

Link to post
Share on other sites

you could write a file to a hidden area on the pc, that the bot is running, and have the bot check in teh beginning if it exists, and if so dont run.

 

but the bad side to this is that if they prematurely end the process of the bot, and the end part of the bot doesnt delete the file, then it could cause the next instance to not run.

 

You could overcome this by adding a ui button that deletes the file and call it "reset" or something like that.

 

 

John

 

 

 

Link to post
Share on other sites

Smarter way is to check and see how many processes yourexename.exe*32 is running via shell with VBscript on start up.Good news is You can limit how many bots can be run.VBscript can parse a list of processes in a text file and You can count the processes.If You have other questions for this way I will response tomorrow because of 1 post per day restriction of the forum.

Link to post
Share on other sites

Smarter way is to check and see how many processes yourexename.exe*32 is running via shell with VBscript on start up.Good news is You can limit how many bots can be run.VBscript can parse a list of processes in a text file and You can count the processes.If You have other questions for this way I will response tomorrow because of 1 post per day restriction of the forum.

Thanks guys for all the ideas, that should give me something to work with!

I really interested in Rumen's solution, this sound cool! The bad news for me is I don't know VBscript. Looking forward to see it!

Link to post
Share on other sites

Smarter way is to check and see how many processes yourexename.exe*32 is running via shell with VBscript on start up.Good news is You can limit how many bots can be run.VBscript can parse a list of processes in a text file and You can count the processes.If You have other questions for this way I will response tomorrow because of 1 post per day restriction of the forum.

 

Hey Rumen,

 

You should PM one of the Admin to get your one post a day restriction lifted...

Link to post
Share on other sites

You could do something like this:

 

set(#countforprogram, "cmd.exe", "Global")
gettaskcount()
define gettaskcount {
   set(#countforprogramfile, ".\\task-count-temp.dat", "Global")
   shell("cmd.exe /C tasklist | find /I /C \"{#countforprogram}\"  >\"{#countforprogramfile}\"")
   set(#taskcount, $read file(#countforprogramfile), "Global")
   shell("cmd.exe /C del \"{#countforprogramfile}\"")
}
if($comparison(#taskcount, ">=", 2)) {
   then {
       alert("Stopping. You have to many running. 
Current running count is: {#taskcount}")
       stop script
   }
   else {
       alert("Running. count is: {#taskcount}")
   }
}

 

Kevin

  • Like 3
Link to post
Share on other sites

You could do something like this:

 

set(#countforprogram, "cmd.exe", "Global")
gettaskcount()
define gettaskcount {
   set(#countforprogramfile, ".\\task-count-temp.dat", "Global")
   shell("cmd.exe /C tasklist | find /I /C \"{#countforprogram}\"  >\"{#countforprogramfile}\"")
   set(#taskcount, $read file(#countforprogramfile), "Global")
   shell("cmd.exe /C del \"{#countforprogramfile}\"")
}
if($comparison(#taskcount, ">=", 2)) {
   then {
       alert("Stopping. You have to many running. 
Current running count is: {#taskcount}")
       stop script
   }
   else {
       alert("Running. count is: {#taskcount}")
   }
}

 

Kevin

 

Very nice. +1

 

John

Link to post
Share on other sites

Hell, can anyone help me, I only have standard edition of Ubot, and I dont understand the code. Can anyone explain it for me so I can apply with standard edition? This look so much simpler than my current method.

Link to post
Share on other sites
  • 2 weeks later...

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