Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
small helper library that provides one an ability to parse AAMVA magnetic stripe. regex was created based on 2012 spec
NOTE: To support this effort, please contribute swipe streams for unsupported types and I would love to add support or fix things that are not working yet
npm install aamva -g
// Generate SSN from random state
var aamva = require('aamva');
var stripe_data = '%FLDELRAY BEACH^DOE$JOHN$^4818 S FEDERAL BLVD^ \?\
;6360100462172082009=2101198299090=?\
#! 33435 I 1600 ECCECC00000?';
var barcode_data = '@ANSI 6360100102DL00390190ZF02290063DLDAADOE,JOHNDAG5929 N \
ROCK STDAIDELRAY SHOREDAJFLDAK44556- DAQJ621625830080DARI DAS \
DAT DBA20210108DBB19770204DBC1DBD20120612DBHN DAU600ZFZFAREPLACED\
: 00000000ZFB ZFCP771206120090ZFD ZFE07-01-11
';
var res = aamva.stripe(stripe_data);
console.log("DMV ID:",res.id()); /* D621720820090 */
console.log("First name:",res.name().first); /* JOHN */
console.log("Last name:",res.name().last); /* DOE */
console.log("Middle name:",res.name().middle); /* "" */
console.log("Sex:",res.sex()); /* MALE, FEMALE, MISSING/INVALID */
console.log("DOB:",res.birthday()); /* Thu Jan 08 1987 00:00:00 GMT-0500 (EST) */
console.log("Entire object", res);
var res2 = aamva.pdf417(barcode_data);
console.log("DMV ID:",res2.id()); /* D621720820090 */
console.log("First name:",res2.name().first); /* JOHN */
console.log("Last name:",res2.name().last); /* DOE */
console.log("Middle name:",res2.name().middle); /* "" */
console.log("Sex:",res2.sex()); /* MALE, FEMALE, MISSING/INVALID */
console.log("DOB:",res2.birthday()); /* Thu Jan 08 1987 00:00:00 GMT-0500 (EST) */
console.log("Entire object", res2);
/*
output:
{ state: 'FL',
city: 'DELRAY BEACH',
name: [Function],
address: '4818 S FEDERAL BLVD',
iso_iin: '636010',
dl: '0462172082009',
expiration_date: '2101',
birthday: [Function],
dl_overflow: '0',
cds_version: '#',
jurisdiction_version: '!',
postal_code: '33435 ',
class: 'I ',
klass: 'I ', // same as 'class'
restrictions: ' ',
endorsments: ' ',
sex: [Function],
height: '600',
weight: ' ',
hair_color: ' ',
eye_color: ' ',
misc: ' ECCECC00000',
id: [Function] }
*/
npm test
If you find a bug or willing to add some enhancement, pull requests are very welcome
FAQs
Parse AAMVA magnetic stripe
We found that aamva 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.