Skip to content

Instantly share code, notes, and snippets.

View manzke's full-sized avatar

Daniel Manzke manzke

View GitHub Profile
@manzke
manzke / imageAnalyzer.js
Created May 26, 2025 19:58
Ai-based enricher - take an image and let the LLMs tell you generate some metadata
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
const { OpenAI } = require('openai');
const { Anthropic } = require('@anthropic-ai/sdk');
const { GoogleGenAI } = require('@google/genai');
// const { GoogleGenAI } = require('@google/genai'); // Comment out as we'll use @google/generative-ai
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
@manzke
manzke / openSearchAnalyzer.js
Created May 26, 2025 19:55
Ai-based OpenSearch Enricher
const fs = require('fs');
const path = require('path');
const { OpenAI } = require('openai');
const { Anthropic } = require('@anthropic-ai/sdk');
const { GoogleGenAI } = require('@google/genai');
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const dotenv = require('dotenv');
const { Client } = require('@opensearch-project/opensearch');
@manzke
manzke / generate_harbor_report.sh
Created April 10, 2025 15:56
Extract the information about images in your harbor, so you can identify images, which haven't been used and get rid of them
#!/bin/bash
# Harbor Configuration
HARBOR_URL="https://myharbor.com"
HARBOR_USER="my_robot_user"
HARBOR_PASS="my_robot_users_password"
OUTPUT_CSV="harbor_images.csv"
SORTED_CSV="sorted_harbor_images.csv"
LOG_FILE="harbor_debug.log"
@manzke
manzke / analyze_pdf.py
Last active October 18, 2024 10:51
Python script using PyPDF2 to analyse a suspicious PDF for Actions, Links, ...
# pip install --upgrade PyPDF2
# python analyze_pdf.py <pdf_file>
import sys
import PyPDF2
from PyPDF2.generic import IndirectObject, DictionaryObject, ArrayObject, NameObject
import struct
def analyze_pdf(file_path):
findings = []
@manzke
manzke / README
Created April 20, 2023 20:43
How to use ChatGPT to exploit another tools which uses ChatGPT. All code has been written by ChatGPT
https://medium.com/@danielmanzke/how-i-used-chatgpt-to-exploit-another-tool-which-uses-chatgpt-b0885a89b210
@manzke
manzke / convert-images-to-video.sh
Created February 26, 2022 14:58
Converting stylegan2 fakes generated during evaluation to video
# script to create movie from multiple png files
# taken in choronoligcal order
# start at 0
count=0
# take all files named shot - something ordered by date
for f in `ls fakes*.jpg`
do
# get the index in 0000 format
printf -v counts "%06d" $count
@manzke
manzke / projected_gan.ipynb
Created February 11, 2022 23:56
projected_gan.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manzke
manzke / README.md
Created January 3, 2022 20:55
Using MODNet for Background Removal