|
Tweet
|
|
openapi-generator generate -i /usr/share/doc/avast-rest/api.yaml -g python -o /tmp/rest-apipython |
|
import openapi_client from openapi_client.api import default_api from pprint import pprint configuration = openapi_client.Configuration(host = "http://127.0.0.1:8080") filename = "eicar.com.txt" content = "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" with openapi_client.ApiClient(configuration) as api_client: api_instance = default_api.DefaultApi(api_client) api_response = api_instance.v1_scan_post(filename, body=content, full=True, archives=True, pup=False、heuristics=80) pprint(api_response) |
|
#!/usr/bin/env bash # 使用方法: scan-rest.sh [FILE]... API='http://127.0.0.1:8080' for f in "$@" ; do printf "$f\t" curl "$API/v1/scan?filename=$(basename "$f")" \ -H "Content-Type: application/octet-stream" \ --data-binary "@$f" done |
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout /etc/pki/tls/private/example.key \ -out /etc/pki/tls/certs/example.crt |
|
upstream avast_backend { server 127.0.0.1:8080; keepalive 8; } server { server_name example.local; listen 443 ssl; ssl_certificate /etc/pki/tls/certs/example.crt; ssl_certificate_key /etc/pki/tls/private/example.key; client_max_body_size 100M; location /avast/ { proxy_pass http://avast_backend/; proxy_http_version 1.1; }} |
|
curl -v --insecure 'https://example.local/avast/v1/scan?filename=test.dat' -H "Content-Type: application/octet-stream" --data-binary '@/usr/share/redhat-release/EULA' |
|
|---|
![]() |
||
| Intel®、インテル®、Intel® ロゴ、Atom™、Core™、Xeon®、Phi™、Pentinum®は、米国およびその他の国におけるIntel® Corporation の商標です。 NVIDIA®、NVIDIA®ロゴ、GeForce、Quadroは、米国NVIDIA® corporationの登録商標です。 AMD®, AMD® Arrowロゴ、ならびにその組み合わせは、Advanced Micro Devices, Inc.の商標です。 Microsoft®(その他商標・登録商標名)は、米国 Microsoft® Corporation の米国およびその他の国における登録商標または商標です。 Windows®の正式名称は、Microsoft® Windows® Operating Systemです。 Linux® は、Linus Torvalds 氏の米国およびその他の国における登録商標です。 RED HATとShadowman logoは米国およびそのほかの国において登録されたRed Hat, Inc. の商標です。 CentOSの名称およびそのロゴは、CentOS ltdの商標または登録商標です。 Ubuntu は Canonical Ltd. の登録商標です。 Linux Mint は Linux Mark Institute の商標です。 IMSL® は、米国およびその他の国における Rouge Wave Software, Inc. の商標です。 Avast™ は、Avast Software の商標です。 AVG® は AVG Technologies の登録商標です。 Python® はPSFの登録商標です。 その他、記載されている会社名、製品名は、各社の登録商標または商標です。 | ||
|