<commit_before>{% extends "base.html" %}
{% import "macros/generic.html" as macros %}
{% import "macros/filterlist.html" as filterlist %}
{% import "macros/indicators.html" as indicators %}
{% import "macros/malware.html" as malware %}
{% import "macros/actors.html" as actors %}
{% import "macros/ttps.html" as ttps %}
{% import "macros/observables.html" as observables %}

{% block title %}
{{obj.name}}
{% endblock %}

{% block main %}
{% set entity = obj %}
<div class="row">
<!-- start first column -->
  <div class="col-md-9">

    <div class="row">
      <div class="col-md-12">
        <h4 class="panel-title"></h4>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title" id="yeti-node-name" data-id="{{entity.id}}" data-class="entity">
                {{entity.name}} <span class="small">{{entity.type}}</span>
                <a href="{{url_for('frontend.EntitiesView:delete', id=entity.id)}}" class="btn btn-danger btn-xs pull-right object-delete" onclick="return confirm('Are you sure?')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a>
                <a href="{{url_for('frontend.InvestigationsView:graph_node', id=entity.id, klass='entity')}}" class="btn btn-default btn-xs pull-right"><i class="flaticon-network38"></i> New Investigation</a>
                <a href="{{url_for('frontend.EntitiesView:edit', id=entity.id)}}" class="btn btn-default btn-xs pull-right"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a>
            </h3>
          </div>
          <div class="panel-body markdown-text hide">{% if entity.description %}{{entity.description}}{%else%}No description provided{%endif%}</div>
        </div>

      </div>
    </div>

  </div>
<!-- end first column -->

  <div class="col-md-3">

    <div class="panel panel-primary yeti-panel">
      <div class="panel-heading">
        <h3 class="panel-title">Info</h3>
      </div>
      <div class="panel-body">
        <table class="table table-condensed main-table">
          {% for key, value in entity.info().items() %}
          {% if key not in ["context", "value", "last_analyses"] %}
            <tr><th>{{key}}</th><td>{{macros.display_yeti(entity, key)}}</td></tr>
          {% endif %}
          {% endfor %}
        </table>
      </div>
    </div>

    <div class="panel panel-primary yeti-panel">
      <div class="panel-heading">
        <h3 class="panel-title">Files</h3>
      </div>
      <div class="panel-body">
        <table class="table table-condensed">
          {% for f in entity.attached_files %}
          <tr class="node-line">
            <td class='icon-cell'>
              <a href="{{url_for("api.Entity:file_content", sha256=f.sha256)}}">
                <i class="fa fa-download" aria-hidden="true"></i>
              </a>
            </td>

            <td>{{f.filename}}</td>
            <td class='icon-cell'>
              <a onclick="return confirm('Are you sure?')" href="{{url_for("frontend.EntitiesView:detach_file", id=entity.id, fileid=f.id)}}">
                <i class="fa fa-trash-o" aria-hidden="true"></i>
              </a>
            </td>
          </tr>
          {% else %}
          No files for now.
          {% endfor %}
        </table>
        <form clas='form-inline' action="{{ url_for("frontend.EntitiesView:attach_file", id=entity.id) }}" method="post" enctype=multipart/form-data>
          <div class="form-group pull-right">
            <input type="submit" value="Attach">
          </div>
          <div class="form-group">
            <input type="file" name="file">
          </div>
        </form>
      </div>
    </div>

  </div> <!-- end second column -->

</div><!-- end row -->

<div class="row">
  <div class="col-md-12">

    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active"><a href="#indicators" aria-controls="indicators" role="tab" data-toggle="tab">Indicators</a></li>
      <li role="presentation"><a href="#ttp" aria-controls="ttp" role="tab" data-toggle="tab">TTP</a></li>
      <li role="presentation"><a href="#malware" aria-controls="malware" role="tab" data-toggle="tab">Malware</a></li>
      <li role="presentation"><a href="#actors" aria-controls="actors" role="tab" data-toggle="tab">Actors</a></li>
      <li role="presentation"><a href="#campaigns" aria-controls="campaigns" role="tab" data-toggle="tab">Campaigns</a></li>
      <li role="presentation"><a href="#exploits" aria-controls="exploits" role="tab" data-toggle="tab">Exploits</a></li>
      <li role="presentation"><a href="#exploitkits" aria-controls="exploitkits" role="tab" data-toggle="tab">ExploitKits</a></li>
      <li role="presentation"><a href="#observables" aria-controls="observables" role="tab" data-toggle="tab">Observables</a></li>
    </ul>

    <div class="tab-content">

        <div role="tabpanel" class="tab-pane active" id="indicators"> <!-- indicators tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="indicator"), "indicator-pivot") }}
              <a href="{{ url_for('frontend.IndicatorsView:new_subclass', subclass="regex", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs pull-left"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Regex</a>
              {{ macros.table_controls("indicators") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="ttp"> <!-- TTP tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="ttp"), "ttp-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="ttp", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new TTP</a>
              {{ macros.table_controls("ttp") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="malware"> <!-- malware tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="malware"), "malware-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="malware", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Malware</a>
              {{ macros.table_controls("malware") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="actors"> <!-- actors tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="actor"), "actor-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="actor", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Actor</a>
              {{ macros.table_controls("actors") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="campaigns"> <!-- campaigns tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="campaign"), "campaign-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="campaign", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Campaign</a>
              {{ macros.table_controls("campaigns") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="exploits"> <!-- exploits tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="exploit"), "exploit-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="exploit", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Exploit</a>
              {{ macros.table_controls("exploits") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="exploitkits"> <!-- exploitkits tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="exploitkit"), "exploitkit-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="exploitkit", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new ExploitKit</a>
              {{ macros.table_controls("exploitkits") }}
            </div>
          </div>
        </div>


        <div role="tabpanel" class="tab-pane" id="observables"> <!-- Observables tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="observable"), "observable-pivot", default_key="value") }}
              {{ macros.table_controls("observables") }}
            </div>
          </div>
        </div>

    </div>
  </div>
</div>

<script type="text/javascript">
  for (let type of ["indicators", "ttp", "malware", "actors", "campaigns", "exploits", "exploitkits", "observables"]) {
    var s = new GenericSelector("#"+type, ".node-line", "#"+type+"-multiple-actions");
    s.bindCallback(".btn-unlink", unlink);
    s.bindCallback(".btn-edit", edit);
  }
</script>

{% endblock %}

{% block custom_head %}
<script type="text/javascript" src="{{ url_for('frontend.static', filename='yeti/js/crud.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ url_for('frontend.static', filename='yeti/js/selection.js') }}" charset="utf-8"></script>
{%endblock%}
<commit_msg>do not display description on the side for entities<commit_after>{% extends "base.html" %}
{% import "macros/generic.html" as macros %}
{% import "macros/filterlist.html" as filterlist %}
{% import "macros/indicators.html" as indicators %}
{% import "macros/malware.html" as malware %}
{% import "macros/actors.html" as actors %}
{% import "macros/ttps.html" as ttps %}
{% import "macros/observables.html" as observables %}

{% block title %}
{{obj.name}}
{% endblock %}

{% block main %}
{% set entity = obj %}
<div class="row">
<!-- start first column -->
  <div class="col-md-9">

    <div class="row">
      <div class="col-md-12">
        <h4 class="panel-title"></h4>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title" id="yeti-node-name" data-id="{{entity.id}}" data-class="entity">
                {{entity.name}} <span class="small">{{entity.type}}</span>
                <a href="{{url_for('frontend.EntitiesView:delete', id=entity.id)}}" class="btn btn-danger btn-xs pull-right object-delete" onclick="return confirm('Are you sure?')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a>
                <a href="{{url_for('frontend.InvestigationsView:graph_node', id=entity.id, klass='entity')}}" class="btn btn-default btn-xs pull-right"><i class="flaticon-network38"></i> New Investigation</a>
                <a href="{{url_for('frontend.EntitiesView:edit', id=entity.id)}}" class="btn btn-default btn-xs pull-right"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a>
            </h3>
          </div>
          <div class="panel-body markdown-text hide">{% if entity.description %}{{entity.description}}{%else%}No description provided{%endif%}</div>
        </div>

      </div>
    </div>

  </div>
<!-- end first column -->

  <div class="col-md-3">

    <div class="panel panel-primary yeti-panel">
      <div class="panel-heading">
        <h3 class="panel-title">Info</h3>
      </div>
      <div class="panel-body">
        <table class="table table-condensed main-table">
          {% for key, value in entity.info().items() %}
          {% if key not in ["context", "value", "last_analyses", "description"] %}
            <tr><th>{{key}}</th><td>{{macros.display_yeti(entity, key)}}</td></tr>
          {% endif %}
          {% endfor %}
        </table>
      </div>
    </div>

    <div class="panel panel-primary yeti-panel">
      <div class="panel-heading">
        <h3 class="panel-title">Files</h3>
      </div>
      <div class="panel-body">
        <table class="table table-condensed">
          {% for f in entity.attached_files %}
          <tr class="node-line">
            <td class='icon-cell'>
              <a href="{{url_for("api.Entity:file_content", sha256=f.sha256)}}">
                <i class="fa fa-download" aria-hidden="true"></i>
              </a>
            </td>

            <td>{{f.filename}}</td>
            <td class='icon-cell'>
              <a onclick="return confirm('Are you sure?')" href="{{url_for("frontend.EntitiesView:detach_file", id=entity.id, fileid=f.id)}}">
                <i class="fa fa-trash-o" aria-hidden="true"></i>
              </a>
            </td>
          </tr>
          {% else %}
          No files for now.
          {% endfor %}
        </table>
        <form clas='form-inline' action="{{ url_for("frontend.EntitiesView:attach_file", id=entity.id) }}" method="post" enctype=multipart/form-data>
          <div class="form-group pull-right">
            <input type="submit" value="Attach">
          </div>
          <div class="form-group">
            <input type="file" name="file">
          </div>
        </form>
      </div>
    </div>

  </div> <!-- end second column -->

</div><!-- end row -->

<div class="row">
  <div class="col-md-12">

    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active"><a href="#indicators" aria-controls="indicators" role="tab" data-toggle="tab">Indicators</a></li>
      <li role="presentation"><a href="#ttp" aria-controls="ttp" role="tab" data-toggle="tab">TTP</a></li>
      <li role="presentation"><a href="#malware" aria-controls="malware" role="tab" data-toggle="tab">Malware</a></li>
      <li role="presentation"><a href="#actors" aria-controls="actors" role="tab" data-toggle="tab">Actors</a></li>
      <li role="presentation"><a href="#campaigns" aria-controls="campaigns" role="tab" data-toggle="tab">Campaigns</a></li>
      <li role="presentation"><a href="#exploits" aria-controls="exploits" role="tab" data-toggle="tab">Exploits</a></li>
      <li role="presentation"><a href="#exploitkits" aria-controls="exploitkits" role="tab" data-toggle="tab">ExploitKits</a></li>
      <li role="presentation"><a href="#observables" aria-controls="observables" role="tab" data-toggle="tab">Observables</a></li>
    </ul>

    <div class="tab-content">

        <div role="tabpanel" class="tab-pane active" id="indicators"> <!-- indicators tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="indicator"), "indicator-pivot") }}
              <a href="{{ url_for('frontend.IndicatorsView:new_subclass', subclass="regex", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs pull-left"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Regex</a>
              {{ macros.table_controls("indicators") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="ttp"> <!-- TTP tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="ttp"), "ttp-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="ttp", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new TTP</a>
              {{ macros.table_controls("ttp") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="malware"> <!-- malware tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="malware"), "malware-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="malware", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Malware</a>
              {{ macros.table_controls("malware") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="actors"> <!-- actors tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="actor"), "actor-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="actor", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Actor</a>
              {{ macros.table_controls("actors") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="campaigns"> <!-- campaigns tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="campaign"), "campaign-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="campaign", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Campaign</a>
              {{ macros.table_controls("campaigns") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="exploits"> <!-- exploits tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="exploit"), "exploit-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="exploit", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new Exploit</a>
              {{ macros.table_controls("exploits") }}
            </div>
          </div>
        </div>

        <div role="tabpanel" class="tab-pane" id="exploitkits"> <!-- exploitkits tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="exploitkit"), "exploitkit-pivot") }}
              <a href="{{ url_for('frontend.EntitiesView:new_subclass', subclass="exploitkit", bind=obj.id, type=obj.type.lower()) }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Bind new ExploitKit</a>
              {{ macros.table_controls("exploitkits") }}
            </div>
          </div>
        </div>


        <div role="tabpanel" class="tab-pane" id="observables"> <!-- Observables tab -->
          <div class="row">
            <div class="col-md-12">
              {{ filterlist.inline_filter(url_for("api.Neighbors:tuples", klass="entity", node_id=entity.id, type_filter="observable"), "observable-pivot", default_key="value") }}
              {{ macros.table_controls("observables") }}
            </div>
          </div>
        </div>

    </div>
  </div>
</div>

<script type="text/javascript">
  for (let type of ["indicators", "ttp", "malware", "actors", "campaigns", "exploits", "exploitkits", "observables"]) {
    var s = new GenericSelector("#"+type, ".node-line", "#"+type+"-multiple-actions");
    s.bindCallback(".btn-unlink", unlink);
    s.bindCallback(".btn-edit", edit);
  }
</script>

{% endblock %}

{% block custom_head %}
<script type="text/javascript" src="{{ url_for('frontend.static', filename='yeti/js/crud.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ url_for('frontend.static', filename='yeti/js/selection.js') }}" charset="utf-8"></script>
{%endblock%}

{'fraction_non_alphanumeric': 0.20016935597685467, 'fraction_numerical': 0.0037634661523262927, 'mean_word_length': 2.9808988764044946, 'pattern_counts': {'":': 0, '<': 439, '<?xml version=': 0, '>': 439, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3425573', 'n_tokens_mistral': 6986, 'n_tokens_neox': 6653, 'n_words': 1225}