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.
baidu-ocr-api
Advanced tools
npm install baidu-ocr-api --save
登陆 百度bcs控制台中心 申请access key
参看 examples
var ak = 'your ak';
var sk = 'your sk';
var ocr = require('baidu-ocr-api').create(ak,sk);
var opt= {
// url can be a cdn url, or a local url like : __dirname+'/test.jpg'
url:'http://7xod3k.com1.z0.glb.clouddn.com/fbuguhlemsgeilpkxykeluenbjkozzne',
// type: line,text,character default:line
type:'line',
language:'CHN_ENG'
}
ocr.scan(opt,function (err,result) {
if(err){
return console.log(err);
}
console.log(result); // 参看 examples
})
字段名 | 值 | 选项 | 描述 |
---|---|---|---|
url | cdn 地址 本地地址: __diranme+'/test.jpg' | 必选 | 目标地址 |
type | text :识别某张图中的所有文字line : 将结果作为单行文字去解析character :识别某张图中的单个文字 | 可选(默认:line) | 返回结果结构 |
language | , 可选 : CHN_ENG /CHN /ENG | 可选 默认: CHN_ENG | 返回语言类型 |
make test
make cov # Coverage rate
FAQs
OCR for baidu api
The npm package baidu-ocr-api receives a total of 0 weekly downloads. As such, baidu-ocr-api popularity was classified as not popular.
We found that baidu-ocr-api 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.