Skip to content

Latest commit

 

History

History
463 lines (448 loc) · 39.5 KB

File metadata and controls

463 lines (448 loc) · 39.5 KB

RevEng.AI Python SDK

This is the Python SDK for the RevEng.AI API.

To use the SDK you will first need to obtain an API key from https://reveng.ai.

Installation

Once you have the API key you can install the SDK via pip:

pip install revengai

Usage

The following is an example of how to use the SDK to get the logs of an analysis:

import os
import revengai

configuration = revengai.Configuration(api_key={'APIKey': os.environ["API_KEY"]})

# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = revengai.AnalysesCoreApi(api_client)
    analysis_id = 715320

    try:
        # Gets the logs of an analysis
        api_response = api_instance.get_analysis_logs(analysis_id)
        print("The response of AnalysesCoreApi->get_analysis_logs:\n")
        print(api_response)
    except Exception as e:
        print("Exception when calling AnalysesCoreApi->get_analysis_logs: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.reveng.ai

Class Method HTTP request Description
AnalysesCommentsApi create_analysis_comment POST /v2/analyses/{analysis_id}/comments Create a comment for this analysis
AnalysesCommentsApi delete_analysis_comment DELETE /v2/analyses/{analysis_id}/comments/{comment_id} Delete a comment
AnalysesCommentsApi get_analysis_comments GET /v2/analyses/{analysis_id}/comments Get comments for this analysis
AnalysesCommentsApi update_analysis_comment PATCH /v2/analyses/{analysis_id}/comments/{comment_id} Update a comment
AnalysesCoreApi create_analysis POST /v2/analyses Create Analysis
AnalysesCoreApi delete_analysis DELETE /v2/analyses/{analysis_id} Delete Analysis
AnalysesCoreApi find_similar_functions_batch POST /v2/analyses/{analysis_id}/similarity/functions Batch Symbol ANN using Analysis ID
AnalysesCoreApi get_analysis_basic_info GET /v2/analyses/{analysis_id}/basic Gets basic analysis information
AnalysesCoreApi get_analysis_function_map GET /v2/analyses/{analysis_id}/func_maps Get Analysis Function Map
AnalysesCoreApi get_analysis_logs GET /v2/analyses/{analysis_id}/logs Gets the logs of an analysis
AnalysesCoreApi get_analysis_params GET /v2/analyses/{analysis_id}/params Gets analysis param information
AnalysesCoreApi get_analysis_status GET /v2/analyses/{analysis_id}/status Gets the status of an analysis
AnalysesCoreApi get_binary_ann POST /v2/binary_ann/{analysis_id} Binary Ann
AnalysesCoreApi list_analyses GET /v2/analyses/list Gets the most recent analyses
AnalysesCoreApi lookup_binary_id GET /v2/analyses/lookup/{binary_id} Gets the analysis ID from binary ID
AnalysesCoreApi requeue_analysis POST /v2/analyses/{analysis_id}/requeue Requeue Analysis
AnalysesCoreApi update_analysis PATCH /v2/analyses/{analysis_id} Update Analysis
AnalysesCoreApi update_analysis_tags PATCH /v2/analyses/{analysis_id}/tags Update Analysis Tags
AnalysesCoreApi upload_file POST /v2/upload Upload File
AnalysesDynamicExecutionApi get_dynamic_execution_status GET /v2/analyses/{analysis_id}/dynamic-execution/status Get the status of a dynamic execution task
AnalysesDynamicExecutionApi get_network_overview GET /v2/analyses/{analysis_id}/dynamic-execution/network-overview Get the dynamic execution results for network overview
AnalysesDynamicExecutionApi get_process_dump GET /v2/analyses/{analysis_id}/dynamic-execution/process-dumps/{dump_name} Get the dynamic execution results for a specific process dump
AnalysesDynamicExecutionApi get_process_dumps GET /v2/analyses/{analysis_id}/dynamic-execution/process-dumps Get the dynamic execution results for process dumps
AnalysesDynamicExecutionApi get_process_registry GET /v2/analyses/{analysis_id}/dynamic-execution/process-registry Get the dynamic execution results for process registry
AnalysesDynamicExecutionApi get_process_tree GET /v2/analyses/{analysis_id}/dynamic-execution/process-tree Get the dynamic execution results for process tree
AnalysesDynamicExecutionApi get_ttps GET /v2/analyses/{analysis_id}/dynamic-execution/ttps Get the dynamic execution results for ttps
AnalysesResultsMetadataApi get_capabilities GET /v2/analyses/{analysis_id}/capabilities Gets the capabilities from the analysis
AnalysesResultsMetadataApi get_communities GET /v2/analyses/{analysis_id}/communities Gets the communities found in the analysis
AnalysesResultsMetadataApi get_functions_list GET /v2/analyses/{analysis_id}/functions/list Gets functions from analysis
AnalysesResultsMetadataApi get_pdf GET /v2/analyses/{analysis_id}/pdf Gets the PDF found in the analysis
AnalysesResultsMetadataApi get_sbom GET /v2/analyses/{analysis_id}/sbom Gets the software-bill-of-materials (SBOM) found in the analysis
AnalysesResultsMetadataApi get_tags GET /v2/analyses/{analysis_id}/tags Get function tags with maliciousness score
AnalysesResultsMetadataApi get_vulnerabilities GET /v2/analyses/{analysis_id}/vulnerabilities Gets the vulnerabilities found in the analysis
AnalysesSecurityChecksApi create_scurity_checks_task POST /v2/analyses/{analysis_id}/security-checks Queues a security check process
AnalysesSecurityChecksApi get_security_checks GET /v2/analyses/{analysis_id}/security-checks Get Security Checks
AnalysesSecurityChecksApi get_security_checks_task_status GET /v2/analyses/{analysis_id}/security-checks/status Check the status of a security check process
AuthenticationUsersApi get_requester_user_info GET /v2/users/me Get the requesters user information
AuthenticationUsersApi get_user GET /v2/users/{user_id} Get a user's public information
AuthenticationUsersApi get_user_activity GET /v2/users/activity Get auth user activity
AuthenticationUsersApi get_user_comments GET /v2/users/me/comments Get comments by user
AuthenticationUsersApi login_user POST /v2/auth/login Authenticate a user
BinariesApi download_zipped_binary GET /v2/binaries/{binary_id}/download-zipped Downloads a zipped binary with password protection
BinariesApi get_binary_additional_details GET /v2/binaries/{binary_id}/additional-details Gets the additional details of a binary
BinariesApi get_binary_details GET /v2/binaries/{binary_id}/details Gets the details of a binary
BinariesApi get_binary_die_info GET /v2/binaries/{binary_id}/die-info Gets the die info of a binary
BinariesApi get_binary_externals GET /v2/binaries/{binary_id}/externals Gets the external details of a binary
BinariesApi get_related_binaries GET /v2/binaries/{binary_id}/related Gets the related binaries of a binary.
CollectionsApi create_collection POST /v2/collections Creates new collection information
CollectionsApi delete_collection DELETE /v2/collections/{collection_id} Deletes a collection
CollectionsApi get_collection GET /v2/collections/{collection_id} Returns a collection
CollectionsApi list_collections GET /v2/collections Gets basic collections information
CollectionsApi update_collection PATCH /v2/collections/{collection_id} Updates a collection
CollectionsApi update_collection_binaries PATCH /v2/collections/{collection_id}/binaries Updates a collection binaries
CollectionsApi update_collection_tags PATCH /v2/collections/{collection_id}/tags Updates a collection tags
ConfidenceApi get_analysis_tag_score POST /v2/confidence/analysis/{analysis_id}/tag_score Calculate Tag Confidence Score for an Analysis
ConfidenceApi get_analysis_threat_score GET /v2/confidence/analysis/{analysis_id}/threat_score Calculate Threat Score for Binary
ConfidenceApi get_functions_name_score POST /v2/confidence/functions/name_score Calculate function name confidence for a set of Functions
ConfidenceApi get_functions_threat_score POST /v2/confidence/functions/threat_score Calculate Threat Score for a set of Functions
ExternalSourcesApi create_external_task_mb POST /v2/analysis/{analysis_id}/external/mb Pulls data from VirusTotal
ExternalSourcesApi create_external_task_vt POST /v2/analysis/{analysis_id}/external/vt Pulls data from VirusTotal
ExternalSourcesApi get_mb_data GET /v2/analysis/{analysis_id}/external/mb Get MalwareBazaar data
ExternalSourcesApi get_mb_task_status GET /v2/analysis/{analysis_id}/external/mb/status Check the status of MalwareBazaar data retrieval
ExternalSourcesApi get_vt_data GET /v2/analysis/{analysis_id}/external/vt Get VirusTotal data
ExternalSourcesApi get_vt_task_status GET /v2/analysis/{analysis_id}/external/vt/status Check the status of VirusTotal data retrieval
FirmwareApi get_binaries_for_firmware_task GET /v2/firmware/get-binaries/{task_id} Upload firmware for unpacking
FirmwareApi upload_firmware POST /v2/firmware Upload firmware for unpacking
FunctionsAIDecompilationApi create_ai_decompilation_comment POST /v2/functions/{function_id}/ai-decompilation/comments Create a comment for this function
FunctionsAIDecompilationApi create_ai_decompilation_task POST /v2/functions/{function_id}/ai-decompilation Begins AI Decompilation Process
FunctionsAIDecompilationApi delete_ai_decompilation_comment DELETE /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} Delete a comment
FunctionsAIDecompilationApi get_ai_decompilation_comments GET /v2/functions/{function_id}/ai-decompilation/comments Get comments for this function
FunctionsAIDecompilationApi get_ai_decompilation_rating GET /v2/functions/{function_id}/ai-decompilation/rating Get rating for AI decompilation
FunctionsAIDecompilationApi get_ai_decompilation_task_result GET /v2/functions/{function_id}/ai-decompilation Polls AI Decompilation Process
FunctionsAIDecompilationApi get_ai_decompilation_task_status GET /v2/functions/{function_id}/ai-decompilation/status Check the status of a function ai decompilation
FunctionsAIDecompilationApi update_ai_decompilation_comment PATCH /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} Update a comment
FunctionsAIDecompilationApi upsert_ai_decompilation_rating PATCH /v2/functions/{function_id}/ai-decompilation/rating Upsert rating for AI decompilation
FunctionsBlockCommentsApi generate_block_comments_for_block_in_function POST /v2/functions/{function_id}/block-comments/single Generate block comments for a specific block in a function
FunctionsBlockCommentsApi generate_block_comments_for_function POST /v2/functions/{function_id}/block-comments Generate block comments for a function
FunctionsBlockCommentsApi generate_overview_comment_for_function POST /v2/functions/{function_id}/block-comments/overview Generate overview comment for a function
FunctionsCoreApi ai_unstrip POST /v2/analyses/{analysis_id}/functions/ai-unstrip Performs matching and auto-unstrip for an analysis and its functions
FunctionsCoreApi analysis_function_matching POST /v2/analyses/{analysis_id}/functions/matches Perform matching for the functions of an analysis
FunctionsCoreApi auto_unstrip POST /v2/analyses/{analysis_id}/functions/auto-unstrip Performs matching and auto-unstrip for an analysis and its functions
FunctionsCoreApi batch_function_matching POST /v2/functions/matches Perform function matching for an arbitrary batch of functions, binaries or collections
FunctionsCoreApi cancel_ai_unstrip DELETE /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel Cancels a running ai-unstrip
FunctionsCoreApi cancel_auto_unstrip DELETE /v2/analyses/{analysis_id}/functions/unstrip/cancel Cancels a running auto-unstrip
FunctionsCoreApi get_analysis_strings GET /v2/analyses/{analysis_id}/functions/strings Get string information found in the Analysis
FunctionsCoreApi get_function_blocks GET /v2/functions/{function_id}/blocks Get disassembly blocks related to the function
FunctionsCoreApi get_function_callees_callers GET /v2/functions/{function_id}/callees_callers Get list of functions that call or are called by the specified function
FunctionsCoreApi get_function_capabilities GET /v2/functions/{function_id}/capabilities Retrieve a functions capabilities
FunctionsCoreApi get_function_details GET /v2/functions/{function_id} Get function details
FunctionsCoreApi get_function_strings GET /v2/functions/{function_id}/strings Get string information found in the function
FunctionsCoreApi get_similar_functions GET /v2/functions/{function_id}/similar-functions Get list of similar functions
FunctionsDataTypesApi generate_function_data_types_for_analysis POST /v2/analyses/{analysis_id}/functions/data_types Generate Function Data Types
FunctionsDataTypesApi generate_function_data_types_for_functions POST /v2/functions/data_types Generate Function Data Types for an arbitrary list of functions
FunctionsDataTypesApi get_function_data_types GET /v2/analyses/{analysis_id}/functions/{function_id}/data_types Get Function Data Types
FunctionsDataTypesApi list_function_data_types_for_analysis GET /v2/analyses/{analysis_id}/functions/data_types List Function Data Types
FunctionsDataTypesApi list_function_data_types_for_functions GET /v2/functions/data_types List Function Data Types
FunctionsDataTypesApi update_function_data_types PUT /v2/analyses/{analysis_id}/functions/{function_id}/data_types Update Function Data Types
FunctionsDecompilationApi check_function_decompilation_task GET /v2/functions/{function_id}/decompilation/status Check the status of a function decompilation
FunctionsDecompilationApi create_decompilation_comment POST /v2/functions/{function_id}/decompilation/comments Create a comment for this function
FunctionsDecompilationApi create_function_decompilation_task POST /v2/functions/{function_id}/decompilation Queues a function decompilation
FunctionsDecompilationApi delete_decompilation_comment DELETE /v2/functions/{function_id}/decompilation/comments/{comment_id} Delete a comment
FunctionsDecompilationApi get_decompilation_comments GET /v2/functions/{function_id}/decompilation/comments Get comments for this function
FunctionsDecompilationApi get_function_decompilation GET /v2/functions/{function_id}/decompilation Get decompilation result
FunctionsDecompilationApi update_decompilation_comment PATCH /v2/functions/{function_id}/decompilation/comments/{comment_id} Update a comment
FunctionsRenamingHistoryApi batch_rename_function POST /v2/functions/rename/batch Batch Rename Functions
FunctionsRenamingHistoryApi get_function_name_history GET /v2/functions/history/{function_id} Get Function Name History
FunctionsRenamingHistoryApi rename_function_id POST /v2/functions/rename/{function_id} Rename Function
FunctionsRenamingHistoryApi revert_function_name POST /v2/functions/history/{function_id}/{history_id} Revert the function name
ModelsApi get_models GET /v2/models Gets models
SearchApi search_binaries GET /v2/search/binaries Binaries search
SearchApi search_collections GET /v2/search/collections Collections search
SearchApi search_functions GET /v2/search/functions Functions search
SearchApi search_tags GET /v2/search/tags Tags search

Documentation For Models