TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityJaqAppRiskScanRequest req = new AlibabaSecurityJaqAppRiskScanRequest();
AlibabaSecurityJaqAppRiskScanRequest.ScanAppInfo obj1 = new AlibabaSecurityJaqAppRiskScanRequest.ScanAppInfo();
obj1.setAppOsType(1L);
obj1.setCallbackUrl("http://aaa.com/callback");
obj1.setData("http://xsx.com/123412.apk");
obj1.setDataType(1L);
obj1.setMd5("dd5b29a800246d7089febf228286d901");
obj1.setSize(21341L);
req.setAppInfo(obj1);
req.setScanTypes("vuln,malware,fake");
req.setExtParam("test");
AlibabaSecurityJaqAppRiskScanResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityJaqAppRiskScanRequest req = new AlibabaSecurityJaqAppRiskScanRequest();
AlibabaSecurityJaqAppRiskScanRequest.ScanAppInfoDomain obj1 = new AlibabaSecurityJaqAppRiskScanRequest.ScanAppInfoDomain();
obj1.AppOsType = 1L;
obj1.CallbackUrl = "http://aaa.com/callback";
obj1.Data = "http://xsx.com/123412.apk";
obj1.DataType = 1L;
obj1.Md5 = "dd5b29a800246d7089febf228286d901";
obj1.Size = 21341L;
req.AppInfo_ = obj1;
req.ScanTypes = "vuln,malware,fake";
req.ExtParam = "test";
AlibabaSecurityJaqAppRiskScanResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityJaqAppRiskScanRequest;
$app_info = new ScanAppInfo;
$app_info->app_os_type="1";
$app_info->callback_url="http://aaa.com/callback";
$app_info->data="http://xsx.com/123412.apk";
$app_info->data_type="1";
$app_info->md5="dd5b29a800246d7089febf228286d901";
$app_info->size="21341";
$req->setAppInfo(json_encode($app_info));
$req->setScanTypes("vuln,malware,fake");
$req->setExtParam("test");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.security.jaq.app.risk.scan' \
-d 'partner_id=apidoc' \
-d 'sign=113E0122B86C9C94CC28F7821E3D806F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+15%3A48%3A47' \
-d 'v=2.0' \
-d 'app_info=null' \
-d 'ext_param=test' \
-d 'scan_types=vuln%2Cmalware%2Cfake'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityJaqAppRiskScanRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.app_info=""
req.scan_types="vuln,malware,fake"
req.ext_param="test"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.security.jaq.app.risk.scan");
add_param(pRequest,"app_info","数据结构JSON示例");
add_param(pRequest,"scan_types","vuln,malware,fake");
add_param(pRequest,"ext_param","test");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.security.jaq.app.risk.scan', {
'app_info':'数据结构JSON示例',
'scan_types':'vuln,malware,fake',
'ext_param':'test'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})