Search the Community
Showing results for tags 'configuration'.
Found 2 results
TL;DR - Add configuration open to make the networks behave more realistically, allowing for network traffic to be sniffed. There's not much more to be said here. Add the ability, in configuration at least, to make all packets sniffable. So they behave more like real packets, instead of magically reaching only their intended target and nobody else. In your code listening for network events, you'd just need to check if the target address matched your modem's address. Or maybe add this feature by default to the network library, that you can enable or disable. Preferably, this would include all ports, or at least an open to sniff all ports. It would add some additional challenge for servers, and give the data card more of a use (encryption and decryption). It would also allow for routers to easily sniff traffic, to route it, without it necessarily needing to be the target.
An API that makes creating and reading configuration files easier. Any line starting with a '#' is ignored in config files. Documentation: loadConfig(string: path) Returns a stream of the file the path points to. saveConfig(string: path) Creates a config file at the given path. If a config file with the same name already exists it will be overwritten. flush() Clears all properties currently in memory. addProperty(string: name, value) Adds a property to the config. Note that the order properties appear in the config is the same order that the functions are called in. addComment(string: text) Adds a comment to the config. Comments are lines that start with '#', you could do this with addProperty, but this saves memory and doesn't add an '=' at the end of the line. getNumber(stream: file, string: name): number Returns the value of property 'name' as a number. getBoolean(stream: file, string: name): boolean Returns the value of property 'name' as a boolean. getString(stream: file, string: name): string Returns the value of property 'name' as a string. Download: pastebin get wE9xT51N /lib/config.lua