Merge pull request #250 from SteveClement/btc

chg: [btc] Removed simple PoC for btc expansion.
pull/251/head
Steve Clement 2018-11-07 22:56:20 +09:00 committed by GitHub
commit a947550b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 52 deletions

View File

@ -18,7 +18,6 @@ For more information: [Extending MISP with Python modules](https://www.circl.lu/
### Expansion modules
* [ASN History](misp_modules/modules/expansion/asn_history.py) - a hover and expansion module to expand an AS number with the ASN description and its history.
* [BTC balance](misp_modules/modules/expansion/btc.py) - An expansion hover module to get a blockchain balance from a BTC address in MISP. Uses the APIs from [https://blockchain.info](blockchain.info) and [https://cryptocompare.com](https://cryptocompare.com)
* [BTC transactions](misp_modules/modules/expansion/btc_steroids.py) - An expansion hover module to get a blockchain balance and the transactions from a BTC address in MISP.
* [CIRCL Passive DNS](misp_modules/modules/expansion/circl_passivedns.py) - a hover and expansion module to expand hostname and IP addresses with passive DNS information.
* [CIRCL Passive SSL](misp_modules/modules/expansion/circl_passivessl.py) - a hover and expansion module to expand IP addresses with the X.509 certificate seen.

View File

@ -1,3 +1,3 @@
from . import _vmray
__all__ = ['vmray_submit', 'asn_history', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns', 'geoip_country', 'wiki', 'iprep', 'threatminer', 'otx', 'threatcrowd', 'vulndb', 'crowdstrike_falcon', 'yara_syntax_validator', 'hashdd', 'onyphe', 'onyphe_full', 'rbl', 'xforceexchange', 'sigma_syntax_validator', 'stix2_pattern_syntax_validator', 'sigma_queries', 'dbl_spamhaus', 'vulners', 'yara_query']
__all__ = ['vmray_submit', 'asn_history', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns', 'geoip_country', 'wiki', 'iprep', 'threatminer', 'otx', 'threatcrowd', 'vulndb', 'crowdstrike_falcon', 'yara_syntax_validator', 'hashdd', 'onyphe', 'onyphe_full', 'rbl', 'xforceexchange', 'sigma_syntax_validator', 'stix2_pattern_syntax_validator', 'sigma_queries', 'dbl_spamhaus', 'vulners', 'yara_query']

View File

@ -1,50 +0,0 @@
import json
import blockchain
misperrors = {'error': 'Error'}
mispattributes = {'input': ['btc'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Steve Clement',
'description': 'Simple BTC expansion service to \
get quick information from MISP attributes',
'module-type': ['expansion', 'hover']}
moduleconfig = []
def handler(q=False):
if q is False:
return False
request = json.loads(q)
if request.get('btc'):
toquery = request['btc']
else:
return False
try:
address = blockchain.blockexplorer.get_address(toquery)
except Exception as e:
misperrors['error'] = e
return misperrors
finalBalance = address.final_balance*(1/100000000)
totalRX = address.total_received*(1/100000000)
totalTX = address.total_sent*(1/100000000)
totalTransactions = address.n_tx
answer = 'Current balance: \
{} - \
{} total received - \
{} total sent - \
{} transactions.\
'.format(finalBalance, totalRX, totalTX, totalTransactions)
r = {'results': [{'types': mispattributes['output'],
'values':[str(answer)]}]}
return r
def introspection():
return mispattributes
def version():
moduleinfo['config'] = moduleconfig
return moduleinfo