Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@mhycy/aliyun-dns
Advanced tools
Aliyun dns api wrapper for node.js
$ npm install @mhycy/node-aliyun-dns
const AliyunDNS = require('@mhycy/node-aliyun-dns');
const accessKeyId = "<accessKeyId>";
const accessKeySecret = "<accessKeySecret>";
const client = AliyunDNS.createClient(accessKeyId, accessKeySecret, true);
(async function () {
let SubDomain = 'test.example.com';
let Type = 'A';
let DomainRecord = await client.DescribeSubDomainRecords({SubDomain, Type});
console.log(DomainRecord);
})();
console.log
output:
{
"PageNumber": 1,
"TotalCount": 1,
"PageSize": 20,
"RequestId": "02E6E21C-1A27-446B-925F-63502A1F2C9D",
"DomainRecords": {
"Record": [
{
"RR": "test",
"Status": "ENABLE",
"Value": "1.2.3.4",
"Weight": 1,
"RecordId": "12345678901234567",
"Type": "A",
"DomainName": "example.com",
"Locked": false,
"Line": "default",
"TTL": 600
}
]
}
}
Official API Document see: 云解析 DNS > API文档 > API概览
Use SubDomain
to update dns record.
client.UpdateRecordBySubDomain({
SubDomain: String,
Type: String|"A",
TargetValue: String
})
Example:
client.UpdateRecordBySubDomain({
SubDomain: "test.example.com",
Type: "A",
TargetValue: "1.2.3.4"
});
Return:
// All path
{
Status: boolean
}
// Update Success
{
Status: true,
Result: {
RecordId: "12345678901234567",
RequestId: "D80773EC-7C22-44B7-BD34-68A4A4F68BBE"
}
}
// Haven't update because target value equle current value
{
Status: true,
Message: "Target value equle current value"
}
// SubDomain infomation not found
{
Status: false,
Message: "SubDomain infomation not found"
}
FAQs
Aliyun dns api wrapper for node.js
We found that @mhycy/aliyun-dns 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
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.