Skip to content

Instantly share code, notes, and snippets.

View yevgenypats's full-sized avatar
🎯
Focusing

Yevgeny Pats yevgenypats

🎯
Focusing
View GitHub Profile
CREATE OR REPLACE FUNCTION get_total_row_count_for_aws_tables()
RETURNS BIGINT AS $$
DECLARE
-- Variable for dynamically constructed SQL to select counts
dynamic_sql TEXT := 'SELECT SUM(row_count) FROM (';
-- Variable for the final part of the SQL statement
final_sql TEXT := ') AS counts(row_count);';
-- Variable to hold each individual count query
count_query TEXT;
-- Variable to accumulate the full SQL query
@yevgenypats
yevgenypats / main.go
Last active March 3, 2023 10:21
apache_arrow_extensions.go
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@yevgenypats
yevgenypats / pci_dss_blog.hcl
Created December 3, 2021 04:30
pci_dss_blog
// policy.hcl
policy "pci-dss-v3.2.1" {
description = "PCI DSS V3.2.1"
configuration {
provider "aws" {
version = ">= v0.5.0"
}
}
.......
SELECT * FROM aws_iam_users;
@yevgenypats
yevgenypats / xor_10_fuzzitdev_cla
Created May 4, 2020 19:43
XOR 10 LTD / fuzzit.dev, inc CLA
### XOR 10 LTD Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by XOR 10 LTD or its affiliates (“XOR 10”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to XOR 10 LTD in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact oss@fuzzit.dev.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to XOR 10 a non-exclusive, perpetual,
@yevgenypats
yevgenypats / pyhonfuzz_cla
Created May 4, 2020 19:36
pythonfuzz CLA
<section class="text-center">
<h2 id="tmp-title">Fiduciary License Agreement 2.0</h2>
<span id="tmp-subtitle-based">based on the</span>
<h2 id="tmp-subtitle"><span id="tmp-contributor-type">Individual</span> Contributor <span id="tmp-contributor-exclusivity-1">exclusive</span> License Agreement</h2>
<h2 id="tmp-subtitle-patent">(including the <span id="tmp-patent-option">Traditional Patent License</span> OPTION)</h2>
</section>
<p>Thank you for your interest in contributing to <span id="tmp-beneficiary-name">XOR 10 LTD</span>'s <span id="tmp-project-name">pythonfuzz</span> ("We" or "Us").</p>
<p>The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at <span id="tmp-submission-instructions">____________________</span>.</p>
@yevgenypats
yevgenypats / autodesk DoS backtrace
Created October 25, 2019 06:41
Autodesk DoS backtrace
# This is patched.
Core was generated by `./ImportScene allcrashes/id:000036,sig:06,src:000000+000042,op:splice,rep:16'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:245
245 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory.
(gdb) backtrace
#0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:245
#1 0x0000000000833de9 in fbxsdk::FbxString::AssignCopy(unsigned long, char const*) ()
#2 0x00000000008340e1 in fbxsdk::FbxString::FbxString(char const*, unsigned long) ()
@yevgenypats
yevgenypats / fuzzing_autodesk_fbx.sh
Last active March 21, 2021 02:17
fuzzing autodesk fbx
docker run -it ubuntu:16.04 /bin/bash
apt update && apt install -y git build-essential libtool libtool-bin wget python automake bison libglib2.0-dev cmake libxml2-dev
git clone https://github.com/mirrorer/afl.git
cd afl
make && make install
cd qemu_mode
./build_qemu_support.sh
cp ../afl-qemu-trace /bin/.
cd ../..
@yevgenypats
yevgenypats / cargo-fuzz-tutorial.sh
Last active October 8, 2019 12:35
cargo-fuzz tutorial
# cargo-fuzz is available in rust nightly
docker run -it rustlang/rust:nightly-stretch /bin/bash
cargo install cargo-fuzz
# Download the example repo, build and run the fuzzer
git clone https://github.com/fuzzitdev/example-rust
cd example-rust
cargo fuzz run fuzz_parse_complex
## The output should be like this:
@yevgenypats
yevgenypats / fuzz_parse_complex.rs
Created October 8, 2019 12:17
parse complex fuzz function
#![no_main]
#[macro_use] extern crate libfuzzer_sys;
extern crate example_rust;
fuzz_target!(|data: &[u8]| {
let _ = example_rust::parse_complex(&data);
});