From 75bafd60f86d9f6392983477ef7b7bc52bef922e Mon Sep 17 00:00:00 2001 From: Weston Belk Date: Wed, 3 Apr 2024 10:41:28 -0700 Subject: [PATCH 1/3] Update bootstrap --- Makefile | 4 ++ _config.yml | 2 +- _includes/breadcrumb-ctf.html | 11 +++++ _includes/header.html | 16 +++++++ _includes/navigation.html | 12 +++-- _includes/scripts.html | 6 +++ _layouts/ctf.html | 62 +++++++++---------------- _layouts/default.html | 57 +++++++++-------------- _layouts/old.html | 45 ++++++++++++++++++ _writeups/2021-damctf/Imp3rs0nAt0r-1.md | 3 -- _writeups/2021-deadface/Scanners.md | 2 +- index.md | 33 +++++++++++-- style.css | 12 ++++- web-projects/index.html | 23 --------- web-projects/index.md | 17 +++++++ 15 files changed, 193 insertions(+), 112 deletions(-) create mode 100644 _includes/breadcrumb-ctf.html create mode 100644 _includes/header.html create mode 100644 _includes/scripts.html create mode 100644 _layouts/old.html delete mode 100644 web-projects/index.html create mode 100644 web-projects/index.md diff --git a/Makefile b/Makefile index cfae609..ae8951d 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,10 @@ update: update-writeups update-writeups: +ifeq ($(shell uname -s), Darwin) + # use a more recent version of sed from nix + alias sed=~/.local/bin/sed +endif find _writeups/* -maxdepth 0 -type d -exec rm -rf {} + cp -r ../sec-writeups/CTFs/* _writeups/ find _writeups/ -type f -exec sed -i 's/\.md)/)/g' {} + diff --git a/_config.yml b/_config.yml index c8336bb..93e0c77 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ defaults: path: "" type: writeups values: - layout: ctf + layout: default markdown: kramdown highlighter: rouge diff --git a/_includes/breadcrumb-ctf.html b/_includes/breadcrumb-ctf.html new file mode 100644 index 0000000..6d252d7 --- /dev/null +++ b/_includes/breadcrumb-ctf.html @@ -0,0 +1,11 @@ + diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..eb09133 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,16 @@ + + + + {{ page.title }} + + + + + + + + + + + + diff --git a/_includes/navigation.html b/_includes/navigation.html index 6cfee87..bd0fe9a 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -1,10 +1,11 @@ - diff --git a/_includes/scripts.html b/_includes/scripts.html new file mode 100644 index 0000000..70b4ae5 --- /dev/null +++ b/_includes/scripts.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/_layouts/ctf.html b/_layouts/ctf.html index a2e57fd..d1f2317 100644 --- a/_layouts/ctf.html +++ b/_layouts/ctf.html @@ -1,48 +1,32 @@ - - - - {{ page.title }} - - - - - - - - - - - +{% include header.html %} {% include navigation.html %} -
- +
+ -
-
-

{{ page.title }}

-

{{ page.points }} point(s)

-
+
+
+

{{ page.title }}

+

{{ page.points }} point(s)

+
-
- - {% assign h1_tag = page.title | prepend: "# " | markdownify %} - {{ content | remove_first: h1_tag }} -
-
+
+ + {% assign h1_tag = page.title | prepend: "# " | markdownify %} + {{ content | remove_first: h1_tag }} +
+
+ {% include footer.html %} +{% include scripts.html %} - - - - - \ No newline at end of file + diff --git a/_layouts/default.html b/_layouts/default.html index 8fa30aa..a94303c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,45 +1,32 @@ - - - - {{ page.title }} - - - - - - - - - +{% include header.html %} {% include navigation.html %} -
+
{% if page.ctf %} - + {% include breadcrumb-ctf.html %} {% endif %} -
-
-

{{ page.hero-title }}

-

{{ page.hero-text }}

-
-
- {{ content }} -
-
+ {% if page.homepage %} + + {% else if page.ctf and page.type == "problem" %} +

{{ page.title }}

+

{{ page.points }}

+ + {% else %} +

{{ page.hero-title }}

+

{{ page.hero-text }}

+ + {% endif %} + + +
+ {{ content }} +
-{% include footer.html %} +{% include footer.html %} +{% include scripts.html %} - - - - - \ No newline at end of file + diff --git a/_layouts/old.html b/_layouts/old.html new file mode 100644 index 0000000..8fa30aa --- /dev/null +++ b/_layouts/old.html @@ -0,0 +1,45 @@ + + + + {{ page.title }} + + + + + + + + + + +{% include navigation.html %} + +
+ {% if page.ctf %} + + {% endif %} +
+
+

{{ page.hero-title }}

+

{{ page.hero-text }}

+
+ +
+ {{ content }} +
+
+
+{% include footer.html %} + + + + + + + + \ No newline at end of file diff --git a/_writeups/2021-damctf/Imp3rs0nAt0r-1.md b/_writeups/2021-damctf/Imp3rs0nAt0r-1.md index 28e61d7..28d19fe 100644 --- a/_writeups/2021-damctf/Imp3rs0nAt0r-1.md +++ b/_writeups/2021-damctf/Imp3rs0nAt0r-1.md @@ -89,6 +89,3 @@ One of the attachments in the message history contains their master plan and the ``` -## Continued On - - diff --git a/_writeups/2021-deadface/Scanners.md b/_writeups/2021-deadface/Scanners.md index 7e00117..ae37444 100644 --- a/_writeups/2021-deadface/Scanners.md +++ b/_writeups/2021-deadface/Scanners.md @@ -204,6 +204,6 @@ func findReplies(pcapFile string, flow gopacket.Flow) { ``` Discovered ports: 21,135,139,445,3389 ``` -## Continued On +That means the flag is `flag{21,135,139,445,3389}` diff --git a/index.md b/index.md index a4aa266..0949712 100644 --- a/index.md +++ b/index.md @@ -1,9 +1,34 @@ --- layout: default title: westonbelk.com +homepage: True hero-title: Weston Belk --- -* [LinkedIn](https://www.linkedin.com/in/weston-belk-68a868162) -* [Github](https://github.com/westonbelk) -* [Presentations](/presentations/) -* [Writeups](/writeups/) \ No newline at end of file + +
+
+
+

hi my name is weston.

+
+

+

+ I'm a developer, security engineer, and competitive Pokémon tcg player. This site is where I post technical writeups from CTFs, share presentations I've given, and talk about some of my projects. +

+

+

+
+ +## Featured Writeups + +* UTCTF 2024 writeup for [Home on the Range](/writeups/2024-utctf/Home%20on%20the%20Range.html) +* Sunshine CTF 2023 writeup for [Knowledge Repository](/writeups/2023-sunshine/Knowledge%20Repository.html) +* Deadface 2021 writeup for [Scanners](/writeups/2021-deadface/Scanners.html) +* DamCTF 2021 writeup for [Imp3rs0nAt0r-1](/writeups/2021-damctf/Imp3rs0nAt0r-1.html) + +## Socials + +* Connect with me on [LinkedIn](https://www.linkedin.com/in/weston-belk/) +* Check out my projects on [Github](https://github.com/westonbelk) + + + diff --git a/style.css b/style.css index dad08cb..16aa405 100644 --- a/style.css +++ b/style.css @@ -15,11 +15,20 @@ pre { tab-size: 4; } +/* Homepage styles */ +.homepage-flex { + gap: 10px; +} +.homepage-flex-item { + max-width: 696px; +} + /* Nav bar styles */ .border-top { border-top: 1px solid #e5e5e5; } .border-bottom { border-bottom: 1px solid #e5e5e5; } .box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); } -.beige { background-color: #f8f8f8;} +.navbar { padding-top: 16px; padding-bottom: 16px; } +a.nav-link { padding-left: 12px; padding-right: 12px; } /* Sticky footer styles -------------------------------------------------- */ @@ -33,6 +42,7 @@ body { } main { + padding-top: 20px; padding-bottom: 46px; } diff --git a/web-projects/index.html b/web-projects/index.html deleted file mode 100644 index f963112..0000000 --- a/web-projects/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: default -title: westonbelk.com - Web Projects -hero-title: Web Projects -hero-text: A collection of side projects that include web technologies or documentation. ---- - -

This Website

-

-

    -
  • Static site generated using Jekyll.
  • -
-

- -

tcg.house

- -

- A Pokemon card database and collection tracker. Frontend built in Angular. Backend API written in Golang with - MongoDB as the database. -

- - - \ No newline at end of file diff --git a/web-projects/index.md b/web-projects/index.md new file mode 100644 index 0000000..0ed1dfa --- /dev/null +++ b/web-projects/index.md @@ -0,0 +1,17 @@ +--- +layout: default +title: westonbelk.com - Web Projects +hero-title: Web Projects +hero-text: A collection of web-related side projects. +--- + +## This Website + +* You're looking at a static site generated using [Jekyll](https://jekyllrb.com/) with a bit of Bootstrap for styling. + +## tcg.house + +* A Pokemon card database and collection tracker that I built to keep my collection organized. The frontend is built in Angular, the backend API is written in Golang, and MongoDB is the database. + + + From 0050d577c50a52bd6033160a73ec8c1886bb3e17 Mon Sep 17 00:00:00 2001 From: Weston Belk Date: Wed, 3 Apr 2024 11:39:08 -0700 Subject: [PATCH 2/3] update new layout --- _config.yml | 2 +- _layouts/ctf.html | 36 +++---------- _layouts/default.html | 2 +- _layouts/old.html | 45 ---------------- _writeups/2021-damctf/Imp3rs0nAt0r-1.md | 1 - _writeups/2021-deadface/Scanners.md | 2 - style.css | 9 ++++ syntax-highlighter.css | 69 +++++++++++++++++++++++++ web-projects/index.md | 2 +- 9 files changed, 87 insertions(+), 81 deletions(-) delete mode 100644 _layouts/old.html create mode 100644 syntax-highlighter.css diff --git a/_config.yml b/_config.yml index 93e0c77..c8336bb 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ defaults: path: "" type: writeups values: - layout: default + layout: ctf markdown: kramdown highlighter: rouge diff --git a/_layouts/ctf.html b/_layouts/ctf.html index d1f2317..b882f64 100644 --- a/_layouts/ctf.html +++ b/_layouts/ctf.html @@ -1,32 +1,8 @@ -{% include header.html %} - -{% include navigation.html %} +--- +layout: default +--- -
- + +{% assign h1_tag = page.title | prepend: "# " | markdownify %} +{{ content | remove_first: h1_tag }} -
-
-

{{ page.title }}

-

{{ page.points }} point(s)

-
- -
- - {% assign h1_tag = page.title | prepend: "# " | markdownify %} - {{ content | remove_first: h1_tag }} -
-
-
- -{% include footer.html %} -{% include scripts.html %} - - - diff --git a/_layouts/default.html b/_layouts/default.html index a94303c..3ff0669 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -9,7 +9,7 @@ {% if page.homepage %} - {% else if page.ctf and page.type == "problem" %} + {% elsif page.ctf != "" and page.type == "problem" %}

{{ page.title }}

{{ page.points }}

diff --git a/_layouts/old.html b/_layouts/old.html deleted file mode 100644 index 8fa30aa..0000000 --- a/_layouts/old.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - {{ page.title }} - - - - - - - - - - -{% include navigation.html %} - -
- {% if page.ctf %} - - {% endif %} -
-
-

{{ page.hero-title }}

-

{{ page.hero-text }}

-
- -
- {{ content }} -
-
-
-{% include footer.html %} - - - - - - - - \ No newline at end of file diff --git a/_writeups/2021-damctf/Imp3rs0nAt0r-1.md b/_writeups/2021-damctf/Imp3rs0nAt0r-1.md index 28d19fe..4440f5e 100644 --- a/_writeups/2021-damctf/Imp3rs0nAt0r-1.md +++ b/_writeups/2021-damctf/Imp3rs0nAt0r-1.md @@ -88,4 +88,3 @@ One of the attachments in the message history contains their master plan and the ========================================= ``` - diff --git a/_writeups/2021-deadface/Scanners.md b/_writeups/2021-deadface/Scanners.md index ae37444..48e26b1 100644 --- a/_writeups/2021-deadface/Scanners.md +++ b/_writeups/2021-deadface/Scanners.md @@ -205,5 +205,3 @@ func findReplies(pcapFile string, flow gopacket.Flow) { Discovered ports: 21,135,139,445,3389 ``` -That means the flag is `flag{21,135,139,445,3389}` - diff --git a/style.css b/style.css index 16aa405..13d7b20 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,5 @@ +@import "syntax-highlighter.css"; + img { max-width: 100%; } @@ -15,6 +17,13 @@ pre { tab-size: 4; } +/* Codeblock styles */ +pre.highlight { + border: 1px solid #e5e5e5; + border-radius: 8px; + padding: 5px 5px; +} + /* Homepage styles */ .homepage-flex { gap: 10px; diff --git a/syntax-highlighter.css b/syntax-highlighter.css new file mode 100644 index 0000000..bfd3803 --- /dev/null +++ b/syntax-highlighter.css @@ -0,0 +1,69 @@ +.highlight .hll { background-color: #ffffcc } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ diff --git a/web-projects/index.md b/web-projects/index.md index 0ed1dfa..f7bd1d3 100644 --- a/web-projects/index.md +++ b/web-projects/index.md @@ -1,6 +1,6 @@ --- layout: default -title: westonbelk.com - Web Projects +title: Web Projects hero-title: Web Projects hero-text: A collection of web-related side projects. --- From 1d36254719f5398f8ae002610e7365380024d70d Mon Sep 17 00:00:00 2001 From: Weston Belk Date: Wed, 3 Apr 2024 11:52:47 -0700 Subject: [PATCH 3/3] update submodules --- presentations | 2 +- vendor/reveal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/presentations b/presentations index 2f21474..6333ae7 160000 --- a/presentations +++ b/presentations @@ -1 +1 @@ -Subproject commit 2f2147411747c91b28a06a79cb410faa04cb0113 +Subproject commit 6333ae7e2401c78246f19928087c89149eaf2612 diff --git a/vendor/reveal.js b/vendor/reveal.js index a2e69a4..6410c75 160000 --- a/vendor/reveal.js +++ b/vendor/reveal.js @@ -1 +1 @@ -Subproject commit a2e69a4b42f9e968406f62073d1c4bf0ea2d3361 +Subproject commit 6410c756ea91ded3fa5f6b40a872523e7b8fe723