Skip to content

Instantly share code, notes, and snippets.

View andersonbosa's full-sized avatar
🥑

Anderson Bosa andersonbosa

🥑
View GitHub Profile
@guisalmeida
guisalmeida / MyJSDoc.md
Last active July 14, 2021 03:21
My JS documentation

My JS Documentation

Alguns métodos nativos da linguagem que podem ser usados de acordo com o tipo do dado.

Este conteúdo foi baseado quase que integralmente no Curso Javascript Masterclass Online do Rodrigo Branas - AgileCode.
Faça inscrição por este link e ganhe 15% de desconto no valor integral do curso.


TIPOS DE DADOS

typeof

Retorna o tipo de dado.

@kadnan
kadnan / listing_seq.py
Created December 11, 2016 08:21
Scraping OLX Listing
import requests
from bs4 import BeautifulSoup
from time import sleep
def get_listing(url):
headers = {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36'}
html = None
links = None
@ekiara
ekiara / TMUX_COPY_PASTE_BUFFER
Created March 29, 2014 05:00
Copy and Paste Buffers in TMUX
#### http://awhan.wordpress.com/2010/06/20/copy-paste-in-tmux/
#### emacs style copy in tmux
1) enter copy mode using Control+b [
2) navigate to beginning of text, you want to select and hit Control+Space
3) move around using arrow keys to select region
4) when you reach end of region simply hit Alt+w to copy the region
5) now Control+b ] will paste the selection
#### vim/vi style copy in tmux
@vills
vills / url_encode.rb
Created May 20, 2012 14:28 — forked from jamesan/url_encode.rb
Percent encoding for URI conforming to RFC 3986. Ref: http://tools.ietf.org/html/rfc3986#page-12
require 'liquid'
require 'uri'
# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncoding
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
end
@BenFranzi
BenFranzi / birthday-attack.py
Created August 15, 2016 03:39
Example of a birthday attack (w/ PyCrypto)
from Crypto.Hash import MD5 #Requires Python3.5 and PyCrypto
from time import time
import random
print(' Simple Collision Test\n', "=-="*5)
m1 = input("To be hashed: ")
m2 = input("To preceed: ")
m1 = m1 + "%d"
m2 = m2 + "%d"
m1 = m1.encode("ascii")
@abalter
abalter / getoptsdemo.sh
Created August 24, 2017 17:38
Template for bash getopts argument parsing for various types of arguments.
#!/bin/bash
### preallocate variables
required=
optional_hasarg=
got_opt_arg=false
optional_noarg=false
has_default="DEFAULT"
@s0j0hn
s0j0hn / mandros3.py
Created April 16, 2020 16:07 — forked from xassiz/mandros.py
Reverse MSSQL shell
import sys
import requests
import threading
import base64
from html.parser import HTMLParser
from http.server import BaseHTTPRequestHandler, HTTPServer
'''
Description: Reverse MSSQL shell through xp_cmdshell + certutil for exfiltration
Author: @xassiz
@dideler
dideler / pyargs.md
Last active January 23, 2023 16:39
Parsing Command-Line Argument in Python

Command-line arguments in Python show up in sys.argv as a list of strings (so you'll need to import the sys module).

For example, if you want to print all passed command-line arguments:

import sys
print(sys.argv)  # Note the first argument is always the script filename.

Command-line options are sometimes passed by position (e.g. myprogram foo bar) and sometimes by using a "-name value" pair (e.g. myprogram -a foo -b bar).

@andersonbosa
andersonbosa / should we.md
Created March 16, 2023 14:12
Feel free to contribute! Thank you!

[should we]

should we send a notification?

image

@xassiz
xassiz / mandros.py
Created March 16, 2018 07:53
Reverse MSSQL shell
import sys
import requests
import threading
import HTMLParser
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
'''
Description: Reverse MSSQL shell through xp_cmdshell + certutil for exfiltration
Author: @xassiz
'''