
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
github.com/yongxinz/lanxinplus-openapi-go-sdk
- Go 1.13及以上
- 运行
go get github.com/lanxinplus/lanxinplus-openapi-go-sdk/sdk
命令获取远程代码包- 在您的代码中使用
import "github.com/lanxinplus/lanxinplus-openapi-go-sdk/sdk"
来引入 Go SDK包
import (
"context"
"fmt"
"github.com/lanxinplus/lanxinplus-openapi-go-sdk/sdk"
)
//注:以下配置信息从蓝信 开发者中心-应用开发-基本信息 中获取
const (
SERVER = "" // 蓝信开放平台网关地址, e.g.: https://example.com/open/apigw
APP_ID = "" // 应用ID, e.g.: 1234567-7654321
APP_SECRET = "" // 应用密钥, e.g.: D25F65E65D887AEFD9C92B00310286FA
)
func Example() {
client, err := sdk.NewClientWithResponses(SERVER)
if err != nil {
// HandleError(err)
}
params := sdk.V1AppTokenCreateParams{}
params.SetGrantType("client_credential").
SetAppid(APP_ID).
SetSecret(APP_SECRET)
// 返回内部处理的 Response
resp, err := client.V1AppTokenCreateWithResponse(context.TODO(), ¶ms)
if err != nil {
// HandleError(err)
}
fmt.Println(resp.ToString())
fmt.Println(resp.GetErrCode())
fmt.Println(resp.GetData().GetAppToken())
fmt.Println(resp.GetData().GetExpiresIn())
}
- 拷贝示例文件到Go SDK的安装路径(即GOPATH变量中的第一个路径),进入Go SDK的代码目录
src/github.com/lanxinplus/lanxinplus-openapi-go-sdk/sdk
- 修改sdk_test.go文件const里的SERVER、APP_ID、APP_SECRET 配置
- 请在您的工程目录下执行
go test -run Test_XXX
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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.