C++ files are are from this GitHub repository, with a small modification by me to allow the parser to accept a filename on the command line:
https://github.com/alepapadop/vrml
genvrml_v*.py
written by Claude 3 Opus.
The conversation was:
# Note: the following script was written entirely by AI, as part of its solution | |
# to a benchmark based on the PentesterLab exercise "CVE-2016-0792". You can read | |
# the full trace here: https://xbow.com/#debugging--testing--and-refining-a-jenkins-remote-code-execution-exploit | |
# ----AI GENERATED CODE STARTS HERE---- | |
import requests | |
import time | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
import xml.etree.ElementTree as ET | |
# Disable SSL warnings |
#!/usr/bin/env python3 | |
import sys | |
import requests | |
from datetime import datetime, timezone | |
# Ok I'll be honest ChatGPT wrote the vast majority of this | |
# Use at your own risk | |
def get_latest_version_before_date(package_name, cutoff_date): |
C++ files are are from this GitHub repository, with a small modification by me to allow the parser to accept a filename on the command line:
https://github.com/alepapadop/vrml
genvrml_v*.py
written by Claude 3 Opus.
The conversation was:
from typing import BinaryIO | |
import random | |
import struct | |
def generate_random_input(out: BinaryIO): | |
# Generate Header | |
out.write(b'GIF89a') # GIF signature and version | |
# Generate Logical Screen Descriptor | |
screen_width = random.randint(1, 65535) |
from typing import BinaryIO | |
import random | |
import struct | |
def generate_random_input(out: BinaryIO): | |
# Generate a random width and height (between 1 and 1000) | |
width = random.randint(1, 1000) | |
height = random.randint(1, 1000) | |
# Write GIF header |
all: gifread gifread.asan gifread.ubsan gifread.coverage | |
gifread: gifdec.c gifread.c gifdec.h | |
$(CC) $(CFLAGS) -o $@ gifdec.c gifread.c $(LDFLAGS) | |
gifread.asan: gifdec.c gifread.c gifdec.h | |
$(CC) $(CFLAGS) -g -fsanitize=address -o $@ gifdec.c gifread.c $(LDFLAGS) | |
gifread.ubsan: gifdec.c gifread.c gifdec.h | |
$(CC) $(CFLAGS) -g -fsanitize=undefined -o $@ gifdec.c gifread.c $(LDFLAGS) |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import ghidra.app.script.GhidraScript; | |
import ghidra.app.decompiler.DecompInterface; |
Given the following program: | |
``` | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define BUFFERSIZE 200 | |
#define TRUE 1 | |
#define FALSE 0 |
import json | |
import argparse | |
import html | |
import os | |
from datetime import datetime | |
def generate_html(json_file, html_file="chat.html", metadata=None, date=None): | |
with open(json_file, 'r') as file: | |
data = json.load(file) |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
// Build: | |
// gcc -gdwarf-4 -fcf-protection=none -no-pie -fno-stack-protector basicbof.c -o basicbof | |
// To give us a pop rdi gadget | |
void dosomething() { | |
int x = 0xc35f; |