Skip to content

Commit

Permalink
Rename and polish the JSON API to api.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrus-and committed Sep 14, 2024
1 parent bd36c6c commit 89cf696
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions gtfobins.json → api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"functions": {{ site.data.functions | jsonify -}},
"contexts": {{ site.data.contexts | jsonify -}},
"executables": {
{% for file in site.gtfobins -%}
{%- capture gtfobin -%}{%- include get_gtfobin_name.html path=file.path -%}{%- endcapture -%}
{{ gtfobin | jsonify -}}: {
{% for gtfobin in site.gtfobins -%}
{%- capture name -%}{%- include get_gtfobin_name.html path=gtfobin.path -%}{%- endcapture -%}
{{ name | jsonify -}}: {
{%- assign root_fields = 'comment,functions,alias' | split: ',' -%}
{%- assign comma = false -%}
{%- for field in root_fields -%}
{%- if file[field] -%}
{%- if gtfobin[field] -%}
{%- if comma -%},{%- endif -%}
{%- assign comma = true -%}
{{- field | jsonify -}}: {{- file[field] | jsonify -}}
{{- field | jsonify -}}: {{- gtfobin[field] | jsonify -}}
{%- endif -%}
{%- endfor -%}
}
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you are looking for Windows binaries you should visit [LOLBAS][].
|
[Contributors][contributors]
|
[JSON API]({{ '/gtfobins.json' | relative_url }})
[JSON API]({{ '/api.json' | relative_url }})
{:.centered}

[contributors]: https://github.com/GTFOBins/GTFOBins.github.io/graphs/contributors
Expand Down

0 comments on commit 89cf696

Please sign in to comment.