Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
pickleparser
Advanced tools
A pure Javascript implemented parser for Python pickle format
ParserOptions
to customize Unpickling.For more details, see: Supported Opcodes
Online Pickle to JSON Convertor
$ npm install pickleparser
import fs from 'node:fs/promises';
import path from 'node:path';
import { Parser } from 'pickleparser';
async function unpickle(fname: string) {
const pkl = await fs.readFile(path.join(fname), 'binary');
const buffer = Buffer.from(pkl, 'binary');
const parser = new Parser();
return parser.parse(buffer);
}
const obj = await unpickle('pickled.pkl');
console.log(obj);
const fileSelector = document.getElementById('file_selector');
const jsonResultPreviewer = document.getElementById('json_result_previewer');
fileSelector.addEventListener('change', function (e) {
const file = fileSelector.files[0];
const reader = new FileReader();
reader.onload = function (event) {
const buffer = new Uint8Array(event.target.result);
const parser = new pickleparser.Parser();
const obj = parser.parse(buffer);
const json = JSON.stringify(obj, null, 4);
jsonResultPreviewer.innerText = json;
}
reader.readAsArrayBuffer(file);
});
npx pickleparser file.pkl file.json
# or
npm i pickleparser -g
pickletojson file.pkl file.json
MIT
FAQs
A pure Javascript implemented parser for Python pickle format
The npm package pickleparser receives a total of 5,789 weekly downloads. As such, pickleparser popularity was classified as popular.
We found that pickleparser 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.