Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
This is a configurable script for generating dummy log file output.
The script can be used by the CLI command log-gen
. This expects three arguments, an interval, set of amounts and a line format.
For example if you want to generate 5 lines every second (1000ms), where the line contains a random sentence with between 10 and 20 words, you would use this command:
log-gen -i 1000 -a [5] -f "{lorem(10,20)}"
To understand the timing parameters and generator syntax more, read the following two sections.
This script simply sends all of its output to stdout. So to capture it as an actual log file you can simply redirect the stdout using >
or >>
. For example:
log-gen -i 1000 -a [5] -f "{lorem(10,20)}" > ./MyLogFile.log
You can specify an interval and a set of amounts of lines to be generated throughout that interval.
For example with an interval of "1000" (ms, so 1 second) and an amounts set of "[2,5]", two lines will be output randomly within the first second and five lines will be output within the next second. This repeats until the process is killed.
-i 1000 -a [10]
-i 1000 -a [10,50]
-i 1000 -a [80,80,80,80,500]
Within the given format argument you can use the generator syntax to produce randomly created content for each line. This format is {name(some,parameters)}
, where name is one of the predefined (below) generator functions and the parameters are a comma-separated list of parameters to be passed to the function.
Generator functions are quite simple JavaScript functions, so if you think of one that should be added, feel free to raise an issue or PR on GitHub to suggest it.
{date(format)}
- The date at time of the line output, formatted based on the parameter{ip()}
- Generates an IP address{choices(some,options)}
- Randomly selects one of the parameters passed{range(min,max)}
- Generates a number in the range min..max{lorem(min,max)}
- Generates a sentence with an amount of words based on min and max{camel(min,max)}
- Generates a list of words formatted in PascalCase. Min and max effects the amount of words output.{pascal(min,max)}
- Generates a list of words formatted in camelCase. Min and max effects the amount of words output.FAQs
This is a configurable script for generating dummy log file output.
The npm package log-gen receives a total of 1 weekly downloads. As such, log-gen popularity was classified as not popular.
We found that log-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.