Skip to content

Instantly share code, notes, and snippets.

View reginaldojunior's full-sized avatar

Reginaldo Junior reginaldojunior

View GitHub Profile
@reginaldojunior
reginaldojunior / syscan-example-1.py
Created February 25, 2024 14:13
syscan-example-1.py
from typing import Collection, List
from random import randint, shuffle
from scapy.layers.inet import IP, TCP
from scapy.sendrecv import sr
SEQ_MAX = 2**32-1 # valor limite de bits no ipv4
LIMIT_PORT = 49151 # valor limite de portas definidos pela organização IANA
SYN_FLAG = "S"
SYN_ACK_FLAG = SYN_FLAG + "A"
DEFAULT_TIMEOUT = 3
@reginaldojunior
reginaldojunior / syscan-example-book.py
Created February 21, 2024 14:25
syscan-example-book.py
from scapy.all import *
import ipaddress
ports = [25,80,53,443,445,8080,8443]
def SynScan(host):
ans, uans = sr(
IP(dst=host)/
TCP(sport=65535,dport=ports,flags="S"),
timeout=2, verbose=0)
@reginaldojunior
reginaldojunior / syscan.py
Created February 21, 2024 14:08
syscan.py
from typing import Collection, List
from random import randint, shuffle
from scapy.layers.inet import IP, TCP
from scapy.sendrecv import sr
SEQ_MAX = 2**32 - 1
EPHEMERAL_RANGE = (2**14 + 2**15, 2**16 - 1) # According to the IANA
SYN_FLAG = "S"
SYN_ACK_FLAG = SYN_FLAG + "A"
@reginaldojunior
reginaldojunior / acoustic-wave.cu
Last active June 26, 2021 15:21
acoustic-wave.cu
%%cu
#include <stdio.h>
#include <stdlib.h>
#include <cuda_runtime.h>
#include <time.h>
#include <sys/time.h>
#include <assert.h>
#define DT 0.0070710676f // delta t
from matrix import Matrix
import math
class RedeNeural():
nodes_input = []
nodes_hidden = []
nodes_output = []
bias_in_to_hidden = []
bias_hidden_to_output = []
weight_in_to_hidden = []
import random
import numpy as np
import math
class Matrix():
rows = 0
cols = 0
data = []
def create_matrix(self, rows, cols):
# Primeiro vamos implementar uma função de ativação
funcao.ativacao <- function(v){
# Função logística
y <- 1 / (1 + exp(-v))
return(y)
}
# Vamos também precisar da derivada da função de ativação
@reginaldojunior
reginaldojunior / spotify-tracks-to-google-music-tracks.py
Created December 17, 2020 23:38 — forked from sulianov/spotify-tracks-to-google-music-tracks.py
Using Selenium+Python sign in to Spotify, grab liked tracks, sign in to Google Music, add Spotify tracks if missing.
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.implicitly_wait(10)
#open spotify
driver.get('https://open.spotify.com/collection/tracks')
@reginaldojunior
reginaldojunior / example.json
Last active March 18, 2024 13:04
example.json
[
{
"_id":{
"$oid":"5a299c91ad921d6f048f7cdd"
},
"indicadorAssinado":false,
"motivoConfInstSup":null,
"codSituacaoFiliacaoAtual":1,
"dataPedido":{
@reginaldojunior
reginaldojunior / comandos.txt
Last active August 12, 2019 21:30
configurando e instalando ruby
# instalar o rbenv
cd ~
rm -rf .rbenv/
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bashrc