Skip to content

Instantly share code, notes, and snippets.

View traut's full-sized avatar

Sergey Polzunov traut

View GitHub Profile
{
"type": "bundle",
"id": "bundle--6a8d1a72-e854-43a7-a11b-b096cc486374",
"objects": [
{
"id": "location--02098275-3ee6-4a3d-8bb5-2caf87b4aca0",
"spec_version": "2.1",
"type": "location",
"country": "US",
"administrative_area": "US-DC",
@traut
traut / eisvogel.latex
Created August 13, 2024 10:35
Eisvogel template adjusted to solve \pandocbounded macro error
%%
% Copyright (c) 2017 - 2023, Pascal Wagler;
% Copyright (c) 2014 - 2023, John MacFarlane
%
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
%
local gpgGroup = vim.api.nvim_create_augroup('customGpg', { clear = true })
-- autocmds execute in the order in which they were defined.
-- https://neovim.io/doc/user/autocmd.html#autocmd-define
vim.api.nvim_create_autocmd({ 'BufReadPre', 'FileReadPre' }, {
pattern = '*.gpg',
group = gpgGroup,
callback = function ()
-- Make sure nothing is written to shada file while editing an encrypted file.
@traut
traut / hypothesis-STIX2.json
Created February 29, 2024 14:50 — forked from CaitlinHuey/hypothesis-STIX2.json
Representing a structured Hypothesis (STIX2) - co-authored by Sergey Polzunov
{
"objects": [
{
"labels": [
"source--eiq-fusion"
],
"name": "EclecticIQ Fusion Center",
"external_references": [
{
"source_name": "external-url",
@traut
traut / execution.log
Last active June 10, 2022 20:09
tmpprj to test ghost agents
$ date && LEIN_JVM_OPTS= LEIN_FAST_TRAMPOLINE=1 lein trampoline run -m tmpproj && date
Fri Jun 10 21:57:11 CEST 2022
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: io.aviso.exception, being replaced by: #'io.aviso.exception/update-keys
Hello
Fri Jun 10 21:58:12 CEST 2022
$
{
"type": "bundle",
"id": "bundle--a6fb81b8-46c7-40de-85be-bee510f08d1b",
"objects": [
{
"type": "campaign",
"spec_version": "2.1",
"id": "campaign--12a111f0-b824-4baf-a224-83b80237a094",
"lang": "en",
"created": "2017-02-08T21:31:22.007Z",
{
"type": "bundle",
"id": "bundle--a6fb81b8-46c7-40de-85be-bee510f08d1b",
"objects": [
{
"type": "campaign",
"spec_version": "2.1",
"id": "campaign--12a111f0-b824-4baf-a224-83b80237a094",
"lang": "en",
"created": "2017-02-08T21:31:22.007Z",
@traut
traut / static-http-receiver.py
Created May 20, 2020 07:49
Static HTTP server in Python that saves all POST requests as files in the current directory
import os
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_POST(self):
filename = os.path.basename(self.path)
file_length = int(self.headers['Content-Length'])
with open(filename, 'wb') as output_file:
{
"id": "bundle--f39d5a20-939b-44d8-ab7b-42edff352317",
"objects": [
{
"type": "identity",
"id": "identity--18d1436d-9d9d-4c05-8d88-bc4a39ff6bce",
"created": "2019-01-01T01:00:00.123Z",
"modified": "2019-01-01T01:00:00.123Z",
"name": "EclecticIQ",
"identity_class": "organization",
# This code is an example of how STIX1.2 ids to STIX2 ids conversion
# would work with UUID5 allowed in identifiers by STIX2 spec
#
# by sergey@eclecticiq.com
import uuid
stix12_to_stix2_obj_type_mappings = {
'indicator': ['indicator'],