Skip to content

Instantly share code, notes, and snippets.

@bitstuffing
bitstuffing / meta.py
Last active September 16, 2022 21:44
Gist for Sergio ;) answering to a question in his interview
'''
Gist for Sergio ;) answering to a question in his interview
You are given a string s and an array of strings words.
You should add a closed pair of bold tag <b> and </b> to wrap the substrings in s that exist in words.
If two such substrings overlap, you should wrap them together with only one pair of closed bold-tag.
If two substrings wrapped by bold tags are consecutive, you should combine them.
Example 1:
@bitstuffing
bitstuffing / login.py
Created May 17, 2022 11:48
AdmirerToo HTB SSRF Python Script to check and get remote execution
#!/usr/bin/python3
'''
This script was done to test and check all the things for AdmirerToo hard HachTheBox machine.
It will create an HTTP redirect server for Adminer remote machine to exploit login method,
using elastic driver to exploit SSRF, more information at:
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery
Information about CVE-2021-21311 explotation at:
https://github.com/advisories/GHSA-x5r2-hj5c-8jx6