As Config 1 is running, is it possible to immediately send any hits it gets to another config for it to check?
For example:
Config 1 is running and once it gets a hit, Config 2 will start and use that hit to check.
I can’t combine both configs into one because the other config is limited to 5 bots while this one is 160 bots.
A solution I thought of is to auto save hits from Config 1 into a text file, while Config 2 is running in an infinite loop that constantly checks the file for new data.
Wanted to ask incase there’s an easier way to do so.
Hi man. Good question. Last night i was thinking the same. Im not sure about that. You wanted this probably because you have a normal config running and wanted to check the hits directly to the selenium/puppeteer to check with the other, right ? Im not sure how can this be done automatically.
I’m not using selenium but its pretty much the same idea where hits are directly sent to other config. I’m asking here incase there was an already built-in mechanic or if there is an easier work around than using scripts.
Thanks for the response but this just puts Config 2 in an infinite loop and doesn’t start till Config 1 gets a hit. But what I was curious about is how to send the hits from Config 1 to Config 2 as it gets them.
My plan was to append the hits into a txt file and make Config 2 read that file. But since it has 5 bots I was worried all 5 bots will take the same hit and use it where I only want each bot to take a different hit.
Maybe adding a random delay and removing the line from the txt file as it grabs it solves it?
Config 1 runs normally with a wordlist and outputs to a file.
Config 2 runs in an infinite loop (e.g., with infinite data pool) and monitors the file (maybe put a 1000 ms delay block so it doesn’t loop too fast). As soon as there is some data in the file, it grabs the first line, deletes it and saves the file again.
Currently, there is no way to easily implement job-to-job communication without modifying OB2’s code or doing some reflection magic.
Seems to work! Adding a random delay is crucial or else all the bots will take the same line.
Here’s how it works:
1- Random Delay (I set 1 to 3 seconds)
2- Read all lines from hits.txt
3- Outputs the first line from hits.txt (So I can see which line it took)
4- Remove that line from the file
5- Save the file after removing the line
However, its not perfect. Out of 50 lines checked, 2 of the bots would take the same line.
To minimize the chances of this happening, just increase the delay range.
But thank you all for the help!
Lolicode:
BLOCK:RandomInteger
LABEL:randDelay
minimum = 1000
maximum = 3000
=> VAR @randDelay
ENDBLOCK
BLOCK:Delay
milliseconds = @randDelay
ENDBLOCK
BLOCK:FileReadLines
LABEL:ReadLines
path = "hits.txt"
=> VAR @ReadLines
ENDBLOCK
BLOCK:ConstantString
LABEL:OutputNumber
value = @ReadLines[0]
=> CAP @Output
ENDBLOCK
BLOCK:RemoveFromList
LABEL:RemoveLine
list = @ReadLines
ENDBLOCK
BLOCK:FileWriteLines
LABEL:SaveLines
path = "hits.txt"
lines = @ReadLines
ENDBLOCK