diff --git a/Packs/FTP/.pack-ignore b/Packs/FTP/.pack-ignore deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Packs/FTP/.secrets-ignore b/Packs/FTP/.secrets-ignore deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Packs/FTP/Integrations/FTP/FTP.py b/Packs/FTP/Integrations/FTP/FTP.py deleted file mode 100644 index 47975534d230..000000000000 --- a/Packs/FTP/Integrations/FTP/FTP.py +++ /dev/null @@ -1,87 +0,0 @@ -import demistomock as demisto # noqa: F401 -from CommonServerPython import * # noqa: F401 -""" IMPORT """ - -from ftplib import FTP - -""" MAIN """ - -def main(): - HOST = demisto.params().get('host') - PORT = demisto.params().get('port') if demisto.params().get('port') else '21' - USER = demisto.params()['credentials']['identifier'] - PASSWD = demisto.params()['credentials']['password'] - - if demisto.command() == "test-module": - try: - with FTP() as ftp: - ftp.connect(host=HOST,port=int(PORT)) - ftp.login(user=USER, passwd=PASSWD) - ftp.voidcmd('NOOP') - - demisto.results("ok") - except Exception as excp: - return_error(f"Error occurred - Error: {str(excp)}") - - if demisto.command() == "ftp-ls": - path = demisto.args().get('path') - list_path = path if path else '~/' - try: - with FTP() as ftp: - ftp.connect(host=HOST, port=int(PORT)) - ftp.login(user=USER, passwd=PASSWD) - outputs = CommandResults( - outputs_prefix='FTP.List', - outputs={ - 'Files': ftp.nlst(f"{list_path}") - } - ) - return_results(outputs) - - except IndexError: - return_results("There is no file or folder") - except Exception as excp: - return_error(f"Error occurred - Error: {str(excp)}") - - if demisto.command() == "ftp-put": - entry_id = demisto.args().get('entry_id') - target = demisto.args().get('target') - - try: - with FTP() as ftp: - ftp.connect(host=HOST, port=int(PORT)) - ftp.login(user=USER, passwd=PASSWD) - fileObject = demisto.getFilePath(entry_id) - with open(fileObject['path'], 'rb') as file: - ftp.storbinary(f'STOR {target}/{fileObject["name"]}', file) - - return_results(f'File uploaded to {target}/{fileObject["name"]} successfully') - - except Exception as excp: - return_error(f"Error occurred - Error: {str(excp)}") - - if demisto.command() == "ftp-get": - file_path = demisto.args().get('file_path') - file_name = demisto.args().get('file_name') - - try: - with FTP() as ftp: - ftp.connect(host=HOST, port=int(PORT)) - ftp.login(user=USER, passwd=PASSWD) - with open(f'/tmp/{file_name}', 'wb') as file: - ftp.retrbinary(f'RETR {file_path}/{file_name}', file.write) - - with open(f"/tmp/{file_name}", "r") as f: - data = f.read() - return_results( - fileResult(filename = file_name, data = data) - ) - - except Exception as excp: - return_error(f"Error occurred - Error: {str(excp)}") - - - - -if __name__ in ("__main__", "__builtin__", "builtins"): - main() diff --git a/Packs/FTP/Integrations/FTP/FTP.yml b/Packs/FTP/Integrations/FTP/FTP.yml deleted file mode 100644 index 67d0c02d2b0e..000000000000 --- a/Packs/FTP/Integrations/FTP/FTP.yml +++ /dev/null @@ -1,62 +0,0 @@ -category: Utilities -commonfields: - id: FTP - version: -1 -configuration: -- display: 'Host' - name: host - required: true - section: Connect - type: 0 -- display: 'Port' - name: port - defaultvalue: "21" - required: false - section: Connect - type: 0 -- display: Username - name: credentials - type: 9 - required: false -- advanced: true - display: Use system proxy settings - name: proxy - required: false - section: Connect - type: 8 -description: 'FTP integration to download or upload files to a remote FTP server. Please note that FTP transfer is insecure. Please use it with care.' -display: FTP -name: FTP -script: - commands: - - arguments: - - description: The path to list. - name: path - description: List all the files under the current folder. - name: ftp-ls - - arguments: - - name: entry_id - required: true - description: The Entry ID of the file to upload. - - name: target - required: true - description: The target FTP server to upload the file to. - description: Upload file to FTP server. - name: ftp-put - - arguments: - - name: file_path - required: true - description: The path to the file to download from the FTP server. - - name: file_name - required: true - description: The file name to download from the FTP server. - description: Download file from FTP server. - name: ftp-get - dockerimage: demisto/python3:3.10.14.96411 - runonce: false - script: '' - subtype: python3 - type: python -fromversion: 6.0.0 -tests: -- No tests (auto formatted) diff --git a/Packs/FTP/Integrations/FTP/FTP_description.md b/Packs/FTP/Integrations/FTP/FTP_description.md deleted file mode 100644 index 554e7812f7b0..000000000000 --- a/Packs/FTP/Integrations/FTP/FTP_description.md +++ /dev/null @@ -1,7 +0,0 @@ -### Community Integration - -No support or maintenance is provided by the author. Customers are encouraged to engage with the user community for questions and guidance at the [Cortex XSOAR Live Discussions](https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/bd-p/Cortex_XSOAR_Discussions). - -It supports anonymous login. Please input anonymous as username and leave password empty. - -Please be noted that FTP transfer is insecure. Please use it with care. \ No newline at end of file diff --git a/Packs/FTP/Integrations/FTP/FTP_image.png b/Packs/FTP/Integrations/FTP/FTP_image.png deleted file mode 100644 index b711deacd0e2..000000000000 Binary files a/Packs/FTP/Integrations/FTP/FTP_image.png and /dev/null differ diff --git a/Packs/FTP/Integrations/FTP/README.md b/Packs/FTP/Integrations/FTP/README.md deleted file mode 100644 index 399a3de731e6..000000000000 --- a/Packs/FTP/Integrations/FTP/README.md +++ /dev/null @@ -1,79 +0,0 @@ -FTP integration to download or upload files to a remote FTP server. Please note that FTP transfer is insecure. Please use it with care. - -## Configure FTP on Cortex XSOAR - -1. Navigate to **Settings** > **Integrations** > **Servers & Services**. -2. Search for FTP. -3. Click **Add instance** to create and configure a new integration instance. - - | **Parameter** | **Required** | - | --- | --- | - | Host | True | - | Port | False | - | Username | False | - | Password | False | - | Use system proxy settings | False | - -4. Click **Test** to validate the URLs, token, and connection. - -## Commands - -You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. -After you successfully execute a command, a DBot message appears in the War Room with the command details. - -### ftp-ls - -*** -List all the files under the current folder. - -#### Base Command - -`ftp-ls` - -#### Input - -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| path | The path to list. | Optional | - -#### Context Output - -There is no context output for this command. -### ftp-put - -*** -Upload file to FTP server. - -#### Base Command - -`ftp-put` - -#### Input - -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| entry_id | The Entry ID of the file to upload. | Required | -| target | The target FTP server to upload the file to. | Required | - -#### Context Output - -There is no context output for this command. -### ftp-get - -*** -Download file from FTP server. - -#### Base Command - -`ftp-get` - -#### Input - -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| file_path | The path to the file to download from the FTP server. | Required | -| file_name | The file name to download from the FTP server. | Required | - -#### Context Output - -There is no context output for this command. diff --git a/Packs/FTP/README.md b/Packs/FTP/README.md deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Packs/FTP/pack_metadata.json b/Packs/FTP/pack_metadata.json deleted file mode 100644 index 072217ac900d..000000000000 --- a/Packs/FTP/pack_metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "FTP", - "description": "FTP integration to download or upload file to remote ftp server. Please be noted that FTP transfer is insecure. Please use it with care. ", - "support": "community", - "currentVersion": "1.0.0", - "author": "Jie Liau", - "url": "", - "email": "", - "created": "2024-06-01T06:43:37Z", - "categories": ["Utilities"], - "tags": [], - "useCases": [], - "keywords": [], - "marketplaces": [ - "xsoar", - "marketplacev2" - ], - "githubUser": [ - "jieliau" - ] -} \ No newline at end of file