diff --git a/bin/helper/reprocess_bitcoin.py b/bin/helper/reprocess_bitcoin.py new file mode 100755 index 00000000..5e609f1f --- /dev/null +++ b/bin/helper/reprocess_bitcoin.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# -*-coding:UTF-8 -* + +import os +import sys +import gzip +import base64 +import uuid +import datetime +import base64 +import redis +import json +import time + +sys.path.append(os.environ['AIL_BIN']) +from Helper import Process + +def substract_date(date_from, date_to): + date_from = datetime.date(int(date_from[0:4]), int(date_from[4:6]), int(date_from[6:8])) + date_to = datetime.date(int(date_to[0:4]), int(date_to[4:6]), int(date_to[6:8])) + delta = date_to - date_from # timedelta + l_date = [] + for i in range(delta.days + 1): + date = date_from + datetime.timedelta(i) + l_date.append( date.strftime('%Y%m%d') ) + return l_date + +config_section = 'Global' +p = Process(config_section) + +r_tags = redis.StrictRedis( + host=p.config.get("ARDB_Tags", "host"), + port=p.config.getint("ARDB_Tags", "port"), + db=p.config.getint("ARDB_Tags", "db"), + decode_responses=True) + +tag = 'infoleak:automatic-detection="bitcoin-address"' + +# get tag first/last seen +first_seen = r_tags.hget('tag_metadata:{}'.format(tag), 'first_seen') +last_seen = r_tags.hget('tag_metadata:{}'.format(tag), 'last_seen') + +l_dates = substract_date(first_seen, last_seen) + +# get all tagged items +for date in l_dates: + daily_tagged_items = r_tags.smembers('{}:{}'.format(tag, date)) + + for item in daily_tagged_items: + p.populate_set_out(item) diff --git a/var/www/modules/hashDecoded/templates/PgpDecoded.html b/var/www/modules/hashDecoded/templates/PgpDecoded.html deleted file mode 100644 index 88da78e0..00000000 --- a/var/www/modules/hashDecoded/templates/PgpDecoded.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - - Decoded - AIL - - - - - - - - - - - - - - - - - - - - - - - {% include 'nav_bar.html' %} - -
-
- - {% include 'decoded/menu_sidebar.html' %} - -
- -
-
-
-
-
- -
- -
-
-
Select a date range :
-
-
-
- -
-
-
- -
-
Type ID :
- -
- - -
- - -
-
- -
-
-
-
-
-
- - {% if l_pgpdump|length != 0 %} - {% if date_from|string == date_to|string %} -

{{ date_from }} Dumped Keys:

- {% else %} -

{{ date_from }} to {{ date_to }} Dumped Keys:

- {% endif %} - - - - - - - - - - - - - {% for pgp_dump in l_pgpdump %} - - - - - - - - - {% endfor %} - -
type idkey idfirst seenlast seennb pasteSparkline
  {{ l_pgpdump[pgp_dump]['type_id'] }}{{ pgp_dump }}{{ l_pgpdump[pgp_dump]['first_seen'] }}{{ l_pgpdump[pgp_dump]['last_seen'] }}{{ l_pgpdump[pgp_dump]['nb_seen'] }}
- {% else %} - {% if show_decoded_files %} - {% if date_from|string == date_to|string %} -

{{ date_from }}, No Dumped Keys

- {% else %} -

{{ date_from }} to {{ date_to }}, No Dumped Keys

- {% endif %} - {% endif %} - {% endif %} -
- -
-
- - - - - - - - - - - - - - - - - - diff --git a/var/www/modules/hashDecoded/templates/showPgpDump.html b/var/www/modules/hashDecoded/templates/showPgpDump.html deleted file mode 100644 index 8f7b05aa..00000000 --- a/var/www/modules/hashDecoded/templates/showPgpDump.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - AIL - framework - - - - - - - - - - - - - - - - - {% include 'nav_bar.html' %} - -
-
- - {% include 'decoded/menu_sidebar.html' %} - -
- -
-
-

{{ key_id }} :

-
    -
  • -
    -
    - - - - - - - - - - - - - - - - - -
    typeFirst_seenLast_seenNb seen
      {{ type_id }}{{ key_id_metadata['first_seen'] }}{{ key_id_metadata['last_seen'] }}{{ key_id_metadata['nb_seen'] }}
    -
    -
    -
    -
    -
    -
  • -
-
-
- -
-
- -
-
- Graph -
-
-
-
-
-
-
- -
- -
-
- Graph -
-
- - - -
    -
  • -
  • -

    Double click on a node to open Hash/Paste

    - - Current Hash
    - - Hashes
    - - Pastes -

    -
  • -
  • - Hash Types: -
  • -
  • - Key
    - Name
    - Mail
    -
  • -
-
-
-
-
- -
-
- Graph -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - diff --git a/var/www/templates/decoded/menu_sidebar.html b/var/www/templates/decoded/menu_sidebar.html index 7a5a981c..61c17a08 100644 --- a/var/www/templates/decoded/menu_sidebar.html +++ b/var/www/templates/decoded/menu_sidebar.html @@ -22,11 +22,22 @@ +
+ Cryptocurrency +
+