Shuciran Pentesting Notes

Evaluating AI Models Using pytest-evals

pytest-evals Powerful testing framework designed specifically for AI model evaluation. We’ll implement a mock LLM system to enable testing without requiring external API keys. As AI models become i...

Building a Retrieval Augmented Generation System

Text Classification A Retrieval Augmented Generation system usually works on top of an LLM, with additional documents, so it can answer user queries based on the content present inside the document...

Creating a Webscraper using Pyscrap

Simple Scrapper import requests import sys from bs4 import BeautifulSoup def scrape(url, max_chars): response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') ...

Using Ollama with API

Understanding the Ollama API Ollama provides a simple REST API accessible at http://localhost:11434/api. The main endpoints include: /api/generate - Generate text from a prompt /api/chat - H...

Using Ollama Modelfiles

Understanding Modelfiles A basic Modelfile structure: FROM <base-model> # Base model to customize PARAMETER <key> <value> # Model parameters SYST...

Using Ollama for Running AI Models

How Ollama Works Ollama works in the following way: You install Ollama on your local machine You pull model weights for specific LLMs (like Llama 2, Mistral, or Gemma) Ollama sets up a loc...

Windows Registry

Windows Registry Many programming languages support the concept of local and global variables, where local variables are limited in scope and global variables are usable anywhere in the code. An o...

Win32 APIs

WIN32 APIs The Windows operating system, and its various applications are written in a variety of programming languages ranging from assembly to C# but many of those make use of the Windows-provid...

VBA Office Macro

How to create a Macro First, we’ll open Microsoft Word on the Windows 11 victim machine and create a new document. We’ll navigate to the View tab and select Macros to access the Macro menu. We ...

HTML Smuggling

Using a combination of HTML5 and JavaScript to sneak malicious files past content filters is not a new offensive technique. This mechanism has been incorporated into popular offensive frameworks su...