Skip to content

Instantly share code, notes, and snippets.

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 ''
@renini
renini / decompressPic.py
Created January 17, 2021 14:51 — forked from Instagraeme/decompressPic.py
Python Script to retrieve JPEG images from Hikvision PIC file format
#!/usr/bin/env python3
"""
Copyright (c) 2017 Graeme Smith
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do