mirror of https://github.com/MISP/misp-modules
Merge branch 'master' of github.com:MISP/misp-modules into new_module
commit
d87a67c6f3
|
@ -505,14 +505,14 @@ sudo git checkout MyModBranch
|
||||||
|
|
||||||
Remove the contents of the build directory and re-install misp-modules.
|
Remove the contents of the build directory and re-install misp-modules.
|
||||||
|
|
||||||
~~~python
|
~~~bash
|
||||||
sudo rm -fr build/*
|
sudo rm -fr build/*
|
||||||
sudo pip3 install --upgrade .
|
sudo pip3 install --upgrade .
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
SSH in with a different terminal and run `misp-modules` with debugging enabled.
|
SSH in with a different terminal and run `misp-modules` with debugging enabled.
|
||||||
|
|
||||||
~~~python
|
~~~bash
|
||||||
sudo killall misp-modules
|
sudo killall misp-modules
|
||||||
misp-modules -d
|
misp-modules -d
|
||||||
~~~
|
~~~
|
||||||
|
|
|
@ -91,6 +91,7 @@ def mprint(input):
|
||||||
def handler(q=False):
|
def handler(q=False):
|
||||||
global result_text
|
global result_text
|
||||||
global conversion_rates
|
global conversion_rates
|
||||||
|
result_text = ""
|
||||||
# start_time = time.time()
|
# start_time = time.time()
|
||||||
# now = time.time()
|
# now = time.time()
|
||||||
if q is False:
|
if q is False:
|
||||||
|
@ -105,7 +106,6 @@ def handler(q=False):
|
||||||
btc = request['btc']
|
btc = request['btc']
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
mprint("\nAddress:\t" + btc)
|
mprint("\nAddress:\t" + btc)
|
||||||
try:
|
try:
|
||||||
req = requests.get(blockchain_all.format(btc, "&limit=50"))
|
req = requests.get(blockchain_all.format(btc, "&limit=50"))
|
||||||
|
@ -113,8 +113,18 @@ def handler(q=False):
|
||||||
except Exception:
|
except Exception:
|
||||||
# print(e)
|
# print(e)
|
||||||
print(req.text)
|
print(req.text)
|
||||||
result_text = ""
|
result_text = "Not a valid BTC address"
|
||||||
sys.exit(1)
|
r = {
|
||||||
|
'results': [
|
||||||
|
{
|
||||||
|
'types': ['text'],
|
||||||
|
'values':[
|
||||||
|
str(result_text)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
|
||||||
n_tx = jreq['n_tx']
|
n_tx = jreq['n_tx']
|
||||||
balance = float(jreq['final_balance'] / 100000000)
|
balance = float(jreq['final_balance'] / 100000000)
|
||||||
|
|
Loading…
Reference in New Issue