feat(fls): write the installed applications of a .fls, loaded by Java as the original
topologyWriter.ts puts each installed application of a PC or notebook under its key and gives it the system software, as installApp does, with its settings: a server's switch and port, a client's target, DNS recursion, virtual hosts, the peer count, the personal firewall. The applications follow the files, as in Java's own files: the web server, the peer-to-peer application and the e-mail server make their directories only where the files lack them, and the DNS server reads /dns/hosts when it is installed. E-mail accounts, messages and address books are the next step. The Java oracle now reports a personal firewall's rules in full, not their number (the corpus has none; its result is byte-equal). Checked by Java against Java: every corpus file, read and written again, loads with the same applications as the original. The synthetic topology adds every FILIUS application with settings away from its defaults, a personal firewall with a rule, an own index.html (Java makes no second) and a missing /peer2peer directory, which Java makes at the end. 12 mutation probes, among them files and applications in reverse order, each loaded by Java, were all caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,13 +36,13 @@ virtuellen Bildschirm statt „headless".
|
||||
von Router und Heimrouter, DHCP-Client und -Server, die statische
|
||||
NAT-Tabelle des Heimrouters, die Verbindung eines Modems und das
|
||||
Dateisystem (Inhalte als Länge und SHA-256, damit die Referenz klein
|
||||
bleibt; die Dateien von Router und Heimrouter erzeugt Javas Konstruktor aus
|
||||
eigenen Vorlagen, sie stehen nicht in der Datei) und die installierten
|
||||
Programme eines Rechners mit ihren Einstellungen (Klassen, die Filius
|
||||
bleibt; bei Router und Heimrouter stehen vorn die Dateien, die Javas
|
||||
Konstruktor aus eigenen Vorlagen erzeugt, dahinter die aus der Datei) und
|
||||
die installierten Programme eines Rechners mit ihren Einstellungen (die
|
||||
persönliche Firewall samt Regeln) (Klassen, die Filius
|
||||
nicht mitbringt — eigene Anwendungen im Archiv unter `projekt/anwendungen`
|
||||
— fehlen, weil das Werkzeug nur `konfiguration.xml` lädt); E-Mail: Konten des Servers aus der Bean-Liste und aus `/mailserver/konten.txt` (`kontenLaden`), Ordner und Adressbuch des Clients und sein Konto aus `/konten.txt` (`laden`); Kabel (Enden als Gerät/Schnittstelle),
|
||||
Doku-Elemente.
|
||||
Systemsoftware, Dateisysteme und Anwendungen folgen schrittweise.
|
||||
|
||||
## Getter-Standardwerte
|
||||
|
||||
|
||||
@@ -309,17 +309,22 @@ public class FlsOracle {
|
||||
settings.put("dropICMP", firewall.getDropICMP());
|
||||
settings.put("filterSYNSegmentsOnly", firewall.getFilterSYNSegmentsOnly());
|
||||
settings.put("filterUdp", firewall.getFilterUdp());
|
||||
List<Object> rules = new ArrayList<>();
|
||||
for (FirewallRule rule : firewall.getRuleset()) {
|
||||
rules.add(Arrays.asList(rule.srcIP, rule.srcMask, rule.destIP, rule.destMask, rule.port,
|
||||
(int) rule.protocol, (int) rule.action));
|
||||
}
|
||||
settings.put("rules", rules);
|
||||
settings.put("rules", firewallRules(firewall));
|
||||
json.put("firewall", settings);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/** A firewall's rules, each as source, masks, destination, port, protocol and action. */
|
||||
static List<Object> firewallRules(Firewall firewall) {
|
||||
List<Object> rules = new ArrayList<>();
|
||||
for (FirewallRule rule : firewall.getRuleset()) {
|
||||
rules.add(Arrays.asList(rule.srcIP, rule.srcMask, rule.destIP, rule.destMask, rule.port,
|
||||
(int) rule.protocol, (int) rule.action));
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* The installed applications of a PC or notebook, by key: the class, and
|
||||
* the settings the topology layer reads. E-mail: the server's accounts as
|
||||
@@ -388,7 +393,7 @@ public class FlsOracle {
|
||||
json.put("dropICMP", firewall.getDropICMP());
|
||||
json.put("filterSYNSegmentsOnly", firewall.getFilterSYNSegmentsOnly());
|
||||
json.put("filterUdp", firewall.getFilterUdp());
|
||||
json.put("rules", firewall.getRuleset().size());
|
||||
json.put("rules", firewallRules(firewall));
|
||||
}
|
||||
result.add(json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user