Skip to content

Instantly share code, notes, and snippets.

View hahwul's full-sized avatar
🔥
I love coffee ☕️

HAHWUL hahwul

🔥
I love coffee ☕️
View GitHub Profile
@hahwul
hahwul / for_test.sh
Created April 25, 2025 15:23
for_test
#!/bin/bash
dalfox server > /dev/null 2>&1 &
DALFOX_PID=$!
sleep 2
curl --request POST \
--url http://localhost:6664/scan \
--header 'Content-Type: application/json' \
@hahwul
hahwul / check_ssl_expire.sh
Created January 16, 2025 02:13
Check the SSL expiration
echo "www.hahwul.com" | xargs -I % openssl s_client -connect %:443 -servername % 2>/dev/null | openssl x509 -noout -dates
@hahwul
hahwul / bonny.sh
Last active December 21, 2024 14:40
Bonny
# RVM
\curl -sSL https://get.rvm.io | bash
# Ruby
rvm install ruby-3.3.6
rvm use ruby-3.3.6
# Rails
gem install rails
#!/bin/bash
URL="https://pocs.hahwul.com/xss.js" # Target
NEW_FILE="new_body.txt"
OLD_FILE="old_body.txt"
wget -qO- "$URL" > "$NEW_FILE"
if [ -f "$OLD_FILE" ]; then
if ! diff -q "$OLD_FILE" "$NEW_FILE" > /dev/null; then
@hahwul
hahwul / !!Postviewer.md
Created June 24, 2024 00:33 — forked from terjanq/!!Postviewer.md
Game Arcade & Postviewer v3 writeups by @terjanq

Postviewer v3 writeup by @terjanq

As it always have been with my challenges for Google CTF, they are based on real bugs I found internally. This year is a bit different though. This time the bugs were crafted by no other than me myself. One bug didn't manage to reach the production and the other is still present in prod making it effectively a 0day!

Both of my challenges (Postviewer v3 & Game Arcade) for this year are related to a sandboxing I've been working since the first postviewer challenge. You can read a little bit about it in

@hahwul
hahwul / index.html.erb
Created February 29, 2024 07:48
rails-charts(echarts) auto-resizing
<%= area_chart Rails.cache.read("data1") %>
<%= area_chart Rails.cache.read("data2") %>
<%= area_chart Rails.cache.read("data3") %>
<script>
let eChartTriggerList = document.querySelectorAll('[id^="rails_charts_"]')
window.addEventListener('resize', function() {
let eChartList = [...eChartTriggerList].map(eChartTriggerEl => echarts.init(eChartTriggerEl).resize())
});
</script>
@hahwul
hahwul / create-heading-links.js
Created February 24, 2024 12:52
Create Heading Links
@hahwul
hahwul / code-line.sh
Created February 15, 2024 10:18
code line
git ls-files | xargs cat | wc -l
@hahwul
hahwul / solid_queue_tips.rb
Last active February 16, 2024 04:36
solid_queue tips
# Get all workers
SolidQueue::Process.all
# Get Pause and Ready Job
SolidQueue::Pause.all.pluck(:queue_name)
SolidQueue::ReadyExecution.where("queue_name LIKE ?", "dc_development_%").distinct(:queue_name).pluck(:queue_name)
# Get Failed Job
SolidQueue::FailedExecution.all
SolidQueue::FailedExecution.count