Skip to content

Instantly share code, notes, and snippets.

# !pip install nest_asyncio langchain_openai browser-use
# !playwright install
# Thomas Roccia
import json
import asyncio
import nest_asyncio
from langchain_openai import ChatOpenAI
from browser_use import Agent, SystemPrompt
# Thomas Roccia - Docling demo
import json
from pathlib import Path
from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions, TesseractOcrOptions
from docling.datamodel.base_models import InputFormat
from docling.document_converter import DocumentConverter, PdfFormatOption, WordFormatOption, SimplePipeline
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True # Enable OCR
# Pronpt Gen Lite
# Author: Thomas Roccia | @fr0gger_
import argparse
from openai import OpenAI
import anthropic
from ollama import Client
import requests
import os
# Thomas Roccia - @fr0gger_
# Structured IOCs
from pydantic import BaseModel
from openai import OpenAI
import requests
from bs4 import BeautifulSoup
import json
client = OpenAI()
# Model Chaining CTI
# Author: Thomas Roccia @fr0gger_
# pip install aisuite requests beautifulsoup4 argparse
# for ollama you need a local server and the model specified
import aisuite as ai
import requests
from bs4 import BeautifulSoup
import argparse
import os
@fr0gger
fr0gger / AppAnyRun.py
Last active January 9, 2025 23:07
Simple script to upload a sample to Any.Run and retrieve the report
import requests
import time
import sys
import os
from tqdm import tqdm
# Specify your API KEY after API-Key
API_KEY = "API-Key "
BASE_URL = "https://api.any.run/v1"
HEADERS = {"Authorization": API_KEY}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
* {
margin: 0;
#!/usr/bin/env python3
'''
A simplified FLOSS implementation that only supports stackstrings.
requirements:
- yara-python
- unicorn
author: Willi Ballenthin
email: [email protected]
@fr0gger
fr0gger / msthreatinfo.py
Last active October 29, 2024 19:48
Threat Info Lookup: Retrieve Microsoft Defender signature details from the Threat Encyclopedia
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Thomas Roccia, @fr0gger_
"""Threat Encyclopedia Lookup, retrieve Defender Signature information.
This script will retrieve the information related to the specified signature.
Usage:
python threatinfo.py [options]
Requirements:
https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/ukraine-wiper-malware-russia
https://www.sentinelone.com/labs/hermetic-wiper-ukraine-under-attack/
https://twitter.com/juanandres_gs/status/1496581710368358400?s=20&t=ceSYl9EWREXS0ELncl4grA
https://twitter.com/0xAmit/status/1496641159371837444?s=20&t=BGgh4TA4xPH1SbmShMkULw
https://twitter.com/JusticeRage/status/1496894253376720901?s=20&t=j42L_Y0O-Q2-oTI3YEcSZw
https://securityintelligence.com/posts/new-destructive-malware-cyber-attacks-ukraine/
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/a82e9105-2405-4e37-b2c3-28c773902d85
https://docs.microsoft.com/en-us/windows/win32/devnotes/attribute-list-entry
https://twitter.com/Lexsek_/status/1496806942630633475?s=20&t=BGgh4TA4xPH1SbmShMkULw
https://www.cisa.gov/uscert/ncas/alerts/aa22-057a