
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
github.com/suddani/json_to_csv
Converts a file containing json objects to a csv
go get github.com/suddani/json_to_csv/cmd/json_to_csv
go clean -i -n github.com/suddani/json_to_csv/...
NAME:
json_to_csv - Converts a file containing json objects to a csv
USAGE:
json_to_csv [global options] [command] FILE
VERSION:
v0.0.4
DESCRIPTION:
Convert a stream of json objects to csv
If no file is given stdin is used
COMMANDS:
filter only filters the original file and does not convert to csv
keys-only only print keys
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--filter FILTER, -f FILTER FILTER by key,value0,value1,value2
--filter-file FILE Load filter from a FILE, per line instead of commad seperated
--key-file FILE Load keys from a FILE, one per line
--keys KEYS, -k KEYS KEYS to use for csv. Comma sperated
--limit LIMIT, -l LIMIT Print only LIMIT number of rows (default: 0)
--no-header Print no header line (default: false)
--output FILE, -o FILE Sets the output FILE (default: "-")
--regex-filter Treat filter as regex (default: false)
--stdout Print to stdout as well as to output (default: false)
--help, -h show help (default: false)
--version, -v print the version (default: false)
printf "{\"name\":\"user\",\"id\":1}\n{\"name\":\"other\",\"id\":2}" | json_to_csv
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv keys-only
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -f country,us filter
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"it\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -f country,us.it
printf "country\nus\nit" > simple_filter && \
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"it\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv --filter-file simple_filter
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -k id,name
printf "id\nname" > simple_keys && \
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv --key-file simple_keys
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -f country,us --no-header
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -l 1
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -l 1 -o somefile.csv
printf "{\"name\":\"user\",\"id\":1,\"country\":\"us\"}\n{\"name\":\"other\",\"id\":2,\"country\":\"de\"}\n{\"name\":\"other2\",\"id\":3,\"country\":\"de\"}" | json_to_csv -k country --no-header|sort|uniq -c
FAQs
Unknown package
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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.