Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
json-to-properties
Advanced tools
A standalone util to transform language files in JSON format, into .properties files.
A util to convert files in .json format into .properties format, and vice versa.
npm install json-to-properties -g
Running json-to-properties
will convert any .json file that are found in the current directory, into to .properties.
Example
{
"KEY1": {
"KEY2": "Hello"
},
"KEY3":"World"
}
result into a file containing
KEY1.KEY2=Hello
KEY3=World
Various options are supported, including
Running the util with -c expects a config file in .json format containing two attributes: src
and dist
, where
src
points to the directory containing the files to process anddist
points to the directory where the output files will be writtenExample config.json
{
src: "c:\json\myfiles",
dist: "c:\properties\myconvertedfiles"
}
and run with
json-to-properties -c config.json
Performs the reversal process, converting .properties files into .json files.
Example
KEY1.KEY2=Hello
KEY3=World
result into a file containing
{
"KEY1": {
"KEY2": "Hello"
},
"KEY3":"World"
}
Accepts a number value identifying the number of spaces used within the output .json file. This is used in relation with -r
Run using
json-to-properties -r -s 4
will use 4 spaces for each indented hierarchy.
The sample
folder contains both .json and .properties fileS to download and test on.
FAQs
A standalone utility to transform language files in JSON format into .properties files, and languages files in .properties format into JSON format.
The npm package json-to-properties receives a total of 566 weekly downloads. As such, json-to-properties popularity was classified as not popular.
We found that json-to-properties 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.