1
0
Fork 0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-05-06 07:36:03 +02:00

Indent and simplify HTML snippets

This commit is contained in:
Andrea Cardaci 2018-05-29 21:52:10 +02:00
parent feae2cd8d7
commit e2433843b5
5 changed files with 37 additions and 41 deletions

View File

@ -1,25 +1,25 @@
<input id="bin-search" type="text" placeholder="Search among {{ site.gtfobins | size }} binaries by name (e.g., 'ftp') or by function (e.g., '/shell')"/>
<div id="bin-table-wrapper">
<table id="bin-table">
<thead>
<tr>
<th>Binary</th>
<th>Functions</th>
</tr>
</thead>
<tbody>
{% for file in site.gtfobins %}
<tr>
<td><a href="{{ file.url }}" class="bin-name">{% include get_bin_name path=file.path %}</a></td>
<td>{% include function_list.html bin=file %}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr><td id="search-message" colspan="2">No binary matches...</td></tr>
</tfoot>
</table>
<table id="bin-table">
<thead>
<tr>
<th>Binary</th>
<th>Functions</th>
</tr>
</thead>
<tbody>
{% for file in site.gtfobins %}
<tr>
<td><a href="{{ file.url }}" class="bin-name">{% include get_bin_name path=file.path %}</a></td>
<td>{% include function_list.html bin=file %}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr><td id="search-message" colspan="2">No binary matches...</td></tr>
</tfoot>
</table>
</div>
<script>

View File

@ -1,6 +1,6 @@
<ul class="function-list">
{% for function in include.bin.functions %}
{% assign type = function[0] %}
<li><a href="{{ include.bin.url }}#{{ type }}">{{ site.data.functions[type].label }}</a></li>
{% endfor %}
{% for function in include.bin.functions %}
{% assign type = function[0] %}
<li><a href="{{ include.bin.url }}#{{ type }}">{{ site.data.functions[type].label }}</a></li>
{% endfor %}
</ul>

View File

@ -1,7 +1,7 @@
<dl>
{% for function_pair in site.data.functions %}
{% assign function = function_pair[1] %}
<dt class="function-name">{{ function.label }}</dt>
<dd>{{ function.description | markdownify }}</dd>
{% endfor %}
{% for function_pair in site.data.functions %}
{% assign function = function_pair[1] %}
<dt class="function-name">{{ function.label }}</dt>
<dd>{{ function.description | markdownify }}</dd>
{% endfor %}
</dl>

View File

@ -16,17 +16,14 @@ layout: common
{% assign examples = function[1] %}
<h2 id="{{ function_name }}" class="function-name">
{{- site.data.functions[function_name].label -}}
{{- site.data.functions[function_name].label -}}
</h2>
{{ site.data.functions[function_name].description | markdownify }}
<div class="examples">
{% for example in examples %}
<div class="example">
{{ example.description | markdownify }}
{% for example in examples %}
{% capture code %}
{%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %}
@ -37,13 +34,12 @@ sudo chmod +s ./{{ bin_name }}
{{ example.code }}
{% endcapture %}
<pre><code>
{{- code | strip -}}
</code></pre>
</div>
{% endfor %}
<div class="example">
{{ example.description | markdownify }}
<pre><code>{{- code | strip -}}</code></pre>
</div>
{% endfor %}
</div>

File diff suppressed because one or more lines are too long