The Be Sure Blog

Code Snippets | Problem Solving | Tips & Tricks

The Be Sure Blog banner

Welcome to the Be Sure Blog! This is a coding playground to test the latest features of Next.js and Node.js in a self hosted fashion. At the same time this blog gathers useful information about coding related topics.

Post Search

Latest Posts

Unified: Exploit Log4j, modify a MongoDB entry and get the flags

Log4j exploitation, HTTP request modification & privilige escalation

Hack The Box

Vaccine: Pwn the machine (zip2john, hashcat, sqlmap)

Crack the .zip archive, use sql injection and escalate your priviliges to get the flags

Hack The Box

Oopsie: Modify the login cookie, escalate priviliges and get the flag!

Upload a PHP reverse shell, get user and then root priviliges to pwn the machine

Hack The Box

Three: Get a reverse shell via AWS S3

Use Nmap, Gobuster, Ncat, PHP and the AWS CLI to capture the flag

Hack The Box

Categories

.NET

Bash

Blazor

C#

CORS

Cyber Security

GitHub

Hack The Box

JavaScript

Linode

MacOS

Next.js

Nginx

Node.js

npm

NuGet

Nuxt

PHP

PM2

Postman

React

TypeScript

Ubuntu

Vue.js

Windows

All Posts

Archetype: From user to admin

Make good use of nmap, smbclient, mssqlclient, xp_cmdshell, winPEAS & psexec

Hack The Box

How to increase the Swap Memory size in Ubuntu

When 512mb are not enough, why not change it to 2gb?

Ubuntu

How i finally fixed "sh: 1: next: not found"

My release pipeline failed constantly and it took me three hours to figure out the issue

Next.js

Responder: Crack the password hash and login as admin

Use Nmap, modify the hosts file and exploit LFI to grab the hash and crack it

Hack The Box

Crocodile: Capture the flag! (FTP, Gobuster)

Get credentials via the open FTP port and use Gobuster to find the login file

Hack The Box

Appointment: Use SQL-Injection to pwn the machine

How to extract the flag by logging in without a password

Hack The Box

Sequel: Access a MariaDB instance with default credentials

Scan for the open ports, log into the database and get the flag!

Hack The Box

Meow: How to pwn the machine (Nmap, Telnet)

Use nmap and telnet to get the flag

Hack The Box

Fawn: Pwn the machine (FTP)

Find the open FTP port and extract the flag!

Hack The Box

Dancing: Pwn the machine (SMB)

How to retrieve the flag with SMB (Server-Message-Block)

Hack The Box

Redeemer: Pwn the machine and capture the flag (Redis)

How to get the flag from the Redis database

Hack The Box

Delete files and folders from GitHub history

How I deleted a folder from the GitHub history of a repository

GitHub

Scroll to the page top after rendering a React component

Fix the annoying SPA issue and scroll to the top!

React

Add Telerik credentials with PowerShell

If the UI way does not work, using PowerShell may be the solution

NuGet

CI/CD: How I finally fixed "err: npm WARN EBADENGINE"

Running the same .sh script may deliver two different results, not anymore!

GitHub

Manually remove iOS backups from a mac computer

How to locate and remove iOS backups from a mac

MacOS

How to clear the cache of a Next.js application

How to create a fresh build without any cached data

Next.js

Find and change NuGet Packages of a .NET application

As a JS developer in a .NET world: How to manage NuGet Packages

.NET

Set up a global state service in Blazor (Wasm)

Learn how to create a self coded Redux like functionality

Blazor

Keeping package.json dependencies up to date

How to use npm-check-updates (ncu) to upgrade package.json dependencies

npm

Fixing .gitignore is ignoring a .gitignore rule

Ignoring a folder does not work? This may be a solution!

GitHub

Read url parameters in Node.js/Express

Params can be used to include variables within the url. Learn how to read them in the backend

Node.js

Your API works via Postman, but how to fetch from JavaScript?

Discover this amazing quick way to switch from Postman to JavaScript

Postman

Fixing the issue of rotated images after resizing with sharp

When resizing images with sharp, some pictures may be rotated afterwards

Node.js

How to instanciate a file object in TypeScript

Use the React useState hook to hold a file data object and properly instanciate it

TypeScript

An easy and elegant way to change a boolean useState value

How to toggle a useState boolean value easily

React

Find out the HTML input change event type in VS Code

An easy way to find out the correct input change event type for TypeScript

TypeScript

Add Tailwind CSS to your Next.js app

A few commands and some possible error fixing and you are good to go!

Next.js

Next.js 13 Tailwind CSS hot-reload issue fix

With the currently experimental app directory, hot-reload does not work properly

Next.js

Verify domain ownership via the DNS record

Learn how to add the TXT Record to your Linode DNS configuration

Linode

Add a robots.txt to your Next.js website

How to add your robots.txt file

Next.js

Suppress Next.js img tag warnings

If you don't want to use their Image elements, this is how to disable the warnings

Next.js

Pm2: Make your Nuxt 3 live app run on a port other than 3000

A five hour research solution for switching the live port to 3002

Nuxt

How to add HTML head data to a Nuxt 3 app

Learn how to set the important SEO data

Nuxt

My Nuxt 3 fix for npm ERR! Invalid comparator: latest

After starting to code with Nuxt, I ran into this issue and found the fix

Nuxt

Use environmental variables in Nuxt 3

Learn about .env, runtimeConfig and the setup() method

Nuxt

Add smooth scrolling to a Vue 3 website

Adding smooth scrolling usually makes up for a much better UX, and it is easy to implement

Vue.js

Install and use the router in Vue 3

Learn how to implement page routing in Vue 3

Vue.js

How to send emails from a Vue 3 client app

Learn how to use Emailjs to send emails from your client app

Vue.js

Getting started with global state management in Vue.js

How to use the Vue.js global store called Vuex

Vue.js

Building a custom image slider in Vue.js

From a Vue.js newbie: How to build a custom image slider

Vue.js

How to get the last part of the url as a string

A little code snippet to get whatever comes behind the last slash of the url

Blazor

How I finally fixed the CORS issues of my Node.js app

CORS errors can be a true nightmare for developers. It took me one month to fix this one

CORS

Four reasons why I dislike Blazor as a React developer

After six months of working with Blazor, this is what i dislike about it

Blazor

Next.js 13 - how to set dynamic HTML head titles

How to take a slug string and turn it into a HTML title tag

Next.js

Let Windows store your clipboard history

An amazing unknown feature: Your stored clipboard collection

Windows

Git Merge VS Rebase, pros and cons for each

Learn more about git merge and git rebase and their differences

GitHub

User permissons for folders and files in Ubuntu

Learn how to see which user has which rights and how to change them

Ubuntu

Drive-by attack hacking

Drive-by attacks or Drive-by downloads are a common way to distribute malware

Cyber Security

How to set up a Node.js server on Linode

A guide for installing Nginx, Node.js, add SSL and more

Linode

How to sort an array by string value

One way to sort an array alphabetically by a string value

JavaScript

How to set a TypeScript type to an useState hook

Learn how to add a TypeScript type to React useState hooks

TypeScript

How to pass variables down to child components

Work with props in React/Next.js with TypeScript

React

Use Regex to target text in between HTML tags

How to use Regex to render a font bold, if it's wrapped in <b> tags

C#

Man in the Middle attacks

How attackers intercept and relay data with bad intentions

Cyber Security

Password Attack Hacking

Learn about the different types of password hacking

Cyber Security

Useful Nginx commands for Linux

A collection of useful Nginx commands

Nginx

Useful PM2 commands for Linux

PM2 is a well working process manager for the Node.js runtime

PM2

Use Bash to automate repeating tasks

Bash scripts are useful to run multiple commands

Bash

Conditionally add a HTML attribute in React

How to add a HTML attribute like "selected" to a HTML element

React

Change the port of a Next.js app

How to manually set the port from 3000 to any other number

Next.js

How to delete an user in the Ubuntu terminal

Learn how to display all local users and how to delete them

Ubuntu

Add a subdomain to Nginx and Linode

Add a new subdomain to Linode, Nginx and extend a SSL certificate

Nginx

Get started with GitHub Actions

Learn about CI/CD with GitHub

GitHub

Setting a HTML attribute in PHP

How to add a HTML attribute via PHP

PHP

Date creation and conversion in PHP

How to create and convert dates in PHP

PHP

Distributed Denial of Service Attacks

What are DDoS attacks and which types are existent

Cyber Security

CORS Middleware in Express

Some infos about CORS in Express for Node.js

Node.js

Do a static export of a Next.js website

Doing a static export in Next.js is easy and working great on basic web hosting services

Next.js

Convert a date to dd.mm.yyyy (German date layout)

An easy one line method to convert your date into the german standard

JavaScript