Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
github.com/philiptang/aliyun-id-ocr
添加自己的产品密钥
vi idocr.go
// TODO 修改此处,使用配置文件
const APPCODE = "hehe"
类结构
▼ package
idocr
▼ imports
crypto/tls
encoding/base64
encoding/json
errors
fmt
github.com/golang/glog
io/ioutil
net/http
strings
▼ constants
+APPCODE
▼+IDOCR : struct
[fields]
+Address : string
+Birth : string
+EndDate : string
+Issue : string
+Name : string
+Nationality : string
+Num : string
+Sex : string
+StartDate : string
[methods]
+Back(base64img string) : error
+Face(base64img string) : error
-formatResult(input string) : aliDataValue, error
-post(img, face string) : string, error
[functions]
+GetIDCard(faceUrl, backUrl string) : IDOCR, error
-getIDCardOCR(imgFace, imgBack string) : IDOCR, error
▼-aliDataValue : struct
[fields]
+RequestId : string
+Success : bool
[embedded]
+IDOCR : IDOCR
▼-aliDetail : struct
[fields]
+OutputLabel : string
+OutputValue : aliOutputValue
▼-aliOutputValue : struct
[fields]
+DataValue : string
▼-aliResult : struct
[fields]
+Outputs : []aliDetail
▼ functions
-getAndBase64(url string) : string, error
-getIDCardImg(faceUrl, backUrl string) : string, string, error
go test -v 146 ↵
=== RUN TestFace
--- PASS: TestFace (2.42s)
=== RUN TestBack
--- PASS: TestBack (1.02s)
=== RUN TestGet
--- PASS: TestGet (2.52s)
=== RUN TestGetIDCard
--- PASS: TestGetIDCard (5.87s)
=== RUN TestFormatResult
--- PASS: TestFormatResult (0.00s)
PASS
ok _/Users/philiptang/Code/aliyun-id-ocr 11.855s
详细打印
go test -v -stderrthreshold=INFO
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.