
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@vorlefan/xlsx
Advanced tools
This is a experimental product. Only use it if you know what are you doing xD ctrl+shift+v
I was working into a PaaS that requires to read a .xls|xlsx file and extract the data into a readable .json, in which will be sent for the database. Seeking around the web, I found the amazing 'mongo-xlsx', however, the data generated was a messy. So, I had the idea to create a package around the 'mongo-xlsx', in which I would use the other package 'string-similarity', to construct a better parse. In the end, it worked as I wanted and needed for the project. Then, I had decide to construct a 'better one' from the one I have built to share with everyone. Please, if you can contribute with pull-requests, do it. I guess that this package can be pretty useful for everyone to use :)
mongo-xlsx
string-similarity
@vorlefan/path
With npm do:
npm install @vorlefan/xlsx
With yarn do:
yarn add @vorlefan/xlsx
import * as XLSX from '@vorlefan/xlsx'
import { xlsxConvertor } from '@vorlefan/xlsx'
interface XLSX_CONVETOR {
filepath: string | Function // the full filepath of the input file (.xls)
pathRoute?: PathRoute | null // If it is null, it will use the default, you can define one by using
// @vorlefan/path
routeName?: string // the route in which will save the output, * by default is main
callback?: Function | null // returns a function where the first paramater
// is the data generated, and the second is the error
}
xlsxConvertor({filepath, pathRoute = null, routeName = 'main', callback = null } : XLSX_CONVETOR)
// Example: at the main folder
xlsxConvertor({ filepath: './example.xls', }).then(console.log).catch(console.error)
// Or, if there is a 'example' folder at the 'main' folder
xlsxConvertor({ filepath: ({path_route}) => {
path_route.join('example', 'main')
return path_route.plug('example', 'example.xlsx')
}, routeName: 'example' })
import { XLSXPath } from '@vorlefan/xlsx'
XLSXPath.get('main')
This is the default PathRoute using '@vorlefan/path'. It have by default a route with the 'main' folder of your project.
import { XLSX_GroupByValue } from '@vorlefan/xlsx'
// arguments
interface GROUP_BY_VALUES {
search: string // search the key-value word by using similarity algorithim
node?: 'key' | 'value' // it will search on 'keys' or 'values'?
model: Array<object> // the model array that will be used (generad from xlsxConverter)
}
// return
interface GET_BY_KEY_OR_VALUE {
data: Array<any> | Record<any, any>
original_key: string
key: string
}
XLSX_GroupByValue({ search, node: 'key', model }: GROUP_BY_VALUES) : GET_BY_KEY_OR_VALUE
// Example:
const { XLSX_GroupByValue, XLSXPath } = require('@vorlefan/xlsx')
void (async function () {
const model = await XLSXPath.json()
.set('main')
.read({ filename: 'test.json' })
const data = XLSX_GroupByValue({
search: 'hashimoto',
node: 'value',
model,
})
await XLSXPath.json()
.set('main')
.store({ data, force: true, filename: `${data.key}.json` })
})()
While it is true that it can be used in production, there are as well, several fields on the package that needs to be improved! If you want to use this package, my recommendations is: use it only for study or to contribute. If you want to use in production, be at your own risky xD
By the sake of helping xD, take a look at the folder 'example' of this repository. May it help you, in case of using on production
This media is from the example/intermediate
From this Excel:
To this .json file:
Then we gonna split, taking only the data from CONDENSED CONSOLIDATED BALANCE SHEETS (Unaudited):
FAQs
convert xlsx file into beautiful json file
We found that @vorlefan/xlsx 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.