-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from neetinkandhare/Nitin_code
Implemented as per mark's review comments
- Loading branch information
Showing
15 changed files
with
142 additions
and
143 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
99 changes: 0 additions & 99 deletions
99
fn_query_tar_network/fn_query_tar_network/util/customize.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include README.md | ||
include fn_query_tor_network/util/* | ||
include fn_query_tor_network/LICENSE | ||
include fn_query_tor_network/doc/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
fn_query_tor_network/fn_query_tor_network/util/customize.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved. | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Generate the Resilient customizations required for fn_query_tor_network""" | ||
|
||
from __future__ import print_function | ||
from resilient_circuits.util import * | ||
|
||
def codegen_reload_data(): | ||
"""Parameters to codegen used to generate the fn_query_tor_network package""" | ||
reload_params = {"package": u"fn_query_tor_network", | ||
"incident_fields": [], | ||
"action_fields": [], | ||
"function_params": [u"tor_search_data"], | ||
"datatables": [], | ||
"message_destinations": [u"fn_tor"], | ||
"functions": [u"fn_tor"], | ||
"phases": [], | ||
"automatic_tasks": [], | ||
"scripts": [], | ||
"workflows": [], | ||
"actions": [] | ||
} | ||
return reload_params | ||
|
||
|
||
def customization_data(client=None): | ||
"""Produce any customization definitions (types, fields, message destinations, etc) | ||
that should be installed by `resilient-circuits customize` | ||
""" | ||
|
||
# This import data contains: | ||
# Function inputs: | ||
# tor_search_data | ||
# Message Destinations: | ||
# fn_tor | ||
# Functions: | ||
# fn_tor | ||
|
||
|
||
yield ImportDefinition(u""" | ||
eyJ0YXNrX29yZGVyIjogW10sICJ3b3JrZmxvd3MiOiBbXSwgImFjdGlvbnMiOiBbXSwgImxheW91 | ||
dHMiOiBbXSwgImV4cG9ydF9mb3JtYXRfdmVyc2lvbiI6IDIsICJpZCI6IDI1LCAiaW5kdXN0cmll | ||
cyI6IG51bGwsICJwaGFzZXMiOiBbXSwgImFjdGlvbl9vcmRlciI6IFtdLCAiZ2VvcyI6IG51bGws | ||
ICJzZXJ2ZXJfdmVyc2lvbiI6IHsibWFqb3IiOiAzMCwgInZlcnNpb24iOiAiMzAuNC4yMzciLCAi | ||
YnVpbGRfbnVtYmVyIjogMjM3LCAibWlub3IiOiA0fSwgInRpbWVmcmFtZXMiOiBudWxsLCAid29y | ||
a3NwYWNlcyI6IFtdLCAiYXV0b21hdGljX3Rhc2tzIjogW10sICJmdW5jdGlvbnMiOiBbeyJkaXNw | ||
bGF5X25hbWUiOiAiVE9SIiwgImRlc2NyaXB0aW9uIjogeyJjb250ZW50IjogIlRoaXMgVE9SIGZ1 | ||
bmN0aW9uIHNlYXJjaGVzIGZvciB0aGUgZ2l2ZW4gSVAgQWRkcmVzcyBvciBob3N0IG5hbWVzIGlu | ||
IFRPUiBleGl0IG5vZGUgTmV0d29yayBieSB1c2luZyBSRVNUZnVsIEFQS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hvc2VuIjogZmFsc2UsICJpbnB1dF90eXBlIjogInRleHQiLCAidG9vbHRpcCI6ICIiLCAi | ||
aW50ZXJuYWwiOiBmYWxzZSwgInJpY2hfdGV4dCI6IGZhbHNlLCAidGVtcGxhdGVzIjogW10sICJl | ||
eHBvcnRfa2V5IjogIl9fZnVuY3Rpb24vdG9yX3NlYXJjaF9kYXRhIiwgImhpZGVfbm90aWZpY2F0 | ||
aW9uIjogZmFsc2UsICJwbGFjZWhvbGRlciI6ICIiLCAibmFtZSI6ICJ0b3Jfc2VhcmNoX2RhdGEi | ||
LCAiZGVmYXVsdF9jaG9zZW5fYnlfc2VydmVyIjogZmFsc2UsICJ2YWx1ZXMiOiBbXX1dLCAib3Zl | ||
cnJpZGVzIjogW10sICJleHBvcnRfZGF0ZSI6IDE1NDUzMTg4NjEzNjZ9 | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,17 @@ | |
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='fn_query_tar_network', | ||
name='fn_query_tor_network', | ||
version='1.0.0', | ||
license='MIT', | ||
author='Resilient Labs', | ||
author_email='[email protected]', | ||
url='https://github.com/ibmresilient/resilient-community-apps', | ||
description="Resilient Circuits Components for 'fn_query_tar_network'", | ||
long_description="""The Query TOR Network API is RESTful web service allowing query tar network customer | ||
search for IP Addresses or host names in tor relay exit node database.and results | ||
will be updated on the Dashboard. | ||
""", | ||
search for IP Addresses or host names in tor relay exit node database.and results | ||
will be updated on the Incidents Notes Dashboard. | ||
""", | ||
install_requires=[ | ||
'resilient_circuits>=30.0.0' | ||
], | ||
|
@@ -27,10 +27,10 @@ | |
], | ||
entry_points={ | ||
"resilient.circuits.components": [ | ||
"QueryTorNetworkFunctionComponent = fn_query_tar_network.components.query_tor_network:FunctionComponent" | ||
"FnTorFunctionComponent = fn_query_tor_network.components.fn_tor:FunctionComponent" | ||
], | ||
"resilient.circuits.configsection": ["gen_config = fn_query_tar_network.util.config:config_section_data"], | ||
"resilient.circuits.customize": ["customize = fn_query_tar_network.util.customize:customization_data"], | ||
"resilient.circuits.selftest": ["selftest = fn_query_tar_network.util.selftest:selftest_function"] | ||
"resilient.circuits.configsection": ["gen_config = fn_query_tor_network.util.config:config_section_data"], | ||
"resilient.circuits.customize": ["customize = fn_query_tor_network.util.customize:customization_data"], | ||
"resilient.circuits.selftest": ["selftest = fn_query_tor_network.util.selftest:selftest_function"] | ||
} | ||
) |
Oops, something went wrong.