Warning: session_start(): open(/var/lib/php/sessions/sess_4aov56ol0jkitasbne9i6epshd, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
concept SuccessfulProxyContact {
S proxy, target;
long lastSuccess;
S targetComputerID;
}
sclass ContactInvisibles {
L aware, unaware;
Concepts in = mainConcepts;
void doIt() {
aware = findConcepts(in, IP, aware := true);
print("Aware computers I can see: " + struct(collect(aware, "ip")));
unaware = findConcepts(in, IP, aware := false);
print("Computers I could try to proxy-contact: " + struct(collect(unaware, "ip")));
for (IP ip : unaware)
tryToContact(ip.ip);
}
void tryToContact(S target) {
for (IP proxy : aware) pcall {
print("Trying to contact " + target + " through " + proxy.ip);
long time = now();
S answer = sendToPublicCommBotThroughProxy(proxy.ip, target, "test");
print(" Answer: " + answer);
if (match("test", answer)) {
print(" Success!!\n");
SuccessfulProxyContact contact = uniq(SuccessfulProxyContact, proxy := proxy.ip, +target);
cset(contact, lastSuccess := time);
answer = sendToPublicCommBotThroughProxy(proxy.ip, target, forward("Awareness", "get computer id"));
S computerID = matchOK(answer);
if (computerID != null)
cset(contact, targetComputerID := computerID);
break;
}
}
}
}