Skip to content

Instantly share code, notes, and snippets.

@renini
renini / create_erspan_type_i_frame_pcap.py
Created March 11, 2025 20:47
Create ERSPAN Type I Frame in PCAP to review bug in viewer
from scapy.all import *
from scapy.contrib.erspan import ERSPAN_I # Import ERSPAN Type I from Scapy
import time # To use the current time or custom timestamp
# Outer Ethernet and IP header (ERSPAN transport)
outer_eth = Ether(src="00:11:22:33:44:55", dst="66:77:88:99:AA:BB")
outer_ip = IP(src="192.168.1.100", dst="192.168.2.200", ttl=64)
# GRE header with ERSPAN (protocol 0x88BE)
gre_header = GRE(proto=0x88BE)
import json
# Sample JSON data
json_data = [
{
"summary": "this is the summary 1",
"title": "this is the title 1",
"year": "2024",
"video": "1.mp4",
"subtitle": "1.vtt"
@renini
renini / upload_mp4_files_to_s3_test2.py
Created January 26, 2024 14:12
upload_mp4_files_to_s3_test2
import os
import json
import boto3
import mysql.connector
from tqdm import tqdm
def upload_mp4_files_to_s3(bucket_name: str, local_directory: str, access_key_id: str, secret_access_key: str, db_host: str, db_user: str, db_password: str, db_database: str):
session = boto3.Session(
aws_access_key_id=access_key_id,
aws_secret_access_key=secret_access_key
@renini
renini / upload_mp4_files_to_s3_test.py
Created January 26, 2024 14:04
upload_mp4_files_to_s3_test
import os
import boto3
from tqdm import tqdm
def upload_mp4_files_to_s3(bucket_name: str, local_directory: str, access_key_id: str, secret_access_key: str):
session = boto3.Session(
aws_access_key_id=access_key,
aws_secret_access_key=secret_key
)
$counter = 0
$decodedctr = 0
Push-Location C:\ioncube_priv8_decoder_v1\php\IC6_5.2
foreach ($file in Get-Content zend-encrypted-files.txt) {
$targetfile = $file.Replace('C:\source\', 'C:\source-decoded\')
$targetdir = [System.IO.Path]::GetDirectoryName($targetfile)
Write-Host Decoding $file to $targetdir
@renini
renini / verify_otp_in_message.py
Created December 12, 2023 13:45
verify_otp_in_message.py
import hmac
import hashlib
import time
import base64
import struct
import sys
import re
# The totp shared secret
shared_secret = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
@renini
renini / getvmwaresessions.py
Last active December 6, 2023 16:47
Download VMware Explore Session Videos and Slides
import sys
import os
import json
import requests
import re
from tqdm import tqdm
url = 'https://www.vmware.com/bin/vmware/videolibrary/get/response' # videolibrary url
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
# https://twitter.com/brsn76945860/status/1171233054951501824
pip install mmh3
-----------------------------
# python 2
import mmh3
import requests
response = requests.get('https://cybersecurity.wtf/favicon.ico')
favicon = response.content.encode('base64')
@renini
renini / BurpDock
Created March 1, 2021 19:36 — forked from r00tdaemon/BurpDock
How to setup Burp Suite inside a docker container. (https://ujjwal96.github.io/blog/2019/06/02/burpdock)
How to setup Burp Suite inside a docker container.
@renini
renini / CVE-2021-21972_vcsa.md
Created February 25, 2021 13:14
PoC for CVE-2021-21972 VMware VCSA

CVE-2021-21972

CVE-2021-21972

Tested against VMware VCSA 6.7

create ssh keypair

ssh-keygen -t rsa -f vcsa.key -N ''