Skip to content

Instantly share code, notes, and snippets.

View efbgirotto's full-sized avatar

Fernando Girotto efbgirotto

View GitHub Profile
@efbgirotto
efbgirotto / simple-hash.js
Created August 1, 2024 13:38 — forked from jlevy/simple-hash.js
Fast and simple insecure string hash for JavaScript
// These hashes are for algorithmic use cases, such as bucketing in hashtables, where security isn't
// needed and 32 or 64 bits is enough (that is, rare collisions are acceptable). These are way simpler
// than sha1 (and all its deps) or similar, and with a short, clean (base 36 alphanumeric) result.
// A simple, *insecure* 32-bit hash that's short, fast, and has no dependencies.
// Output is always 7 characters.
// Loosely based on the Java version; see
// https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript
const simpleHash = str => {
let hash = 0;

Write-up - CTF Zup 2022 - Alexandre Fidélis Vieira Bitencourt

se FOR fácil eu MATO - v2

Este desafio era sobre a utilização de um buffer overflow para sobrepor o valor de uma variável inteira. O código fonte da página era o seguinte:

image

Caso o atacante conseguisse sobrepor o valor da variável inteira que era iniciado com zero a flag seria revelada.

@efbgirotto
efbgirotto / rebasing.md
Created October 23, 2018 23:48
Rebasing

The following steps might help anyone who are new to git rebase and wanted to do it without hassle

Step 1: Assuming that there are no commits and changes to be made on YourBranch at this point. We are visiting YourBranch.

git checkout YourBranch git pull --rebase

What happened? Pulls all changes made by other developers working on your branch and rebases your changes on top of it.

Step 2: Resolve any conflicts that presents.

@efbgirotto
efbgirotto / docker-rm-images.md
Created October 11, 2018 18:19 — forked from tonym128/docker-rm-images.md
Remove all (untagged) images and containers from Docker
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")

# System Prune
# WARNING! This will remove:
@efbgirotto
efbgirotto / gitflow-breakdown.md
Created March 27, 2018 14:59 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@efbgirotto
efbgirotto / postman-deb.sh
Created December 7, 2017 15:47 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
versionMaj="1"
versionMin="0"
versionRev="1"
version="$versionMaj.$versionMin-$versionRev"
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)