Skip to content

Instantly share code, notes, and snippets.

View frikky's full-sized avatar
:shipit:
Shuffling

Frikky frikky

:shipit:
Shuffling
View GitHub Profile
@frikky
frikky / Gist
Created December 6, 2018 16:36
import React from 'react';
const Functionname = () => {
const name = "@frikkylikeme"
const url = "https://medium.com
return (
<div>
<App name={name} url={url} {...props} />
</div>
);
@frikky
frikky / Request - POST
Last active December 6, 2018 18:07
A post request example for blog
import React, {useState} from 'react';
const App = props => {
const name = "@frikkylikeme"
const url = "https://medium.com"
return (
<div>
<Functionname url={url} name={name} {...props} />
</div>
'AlertCreation',
'AlertUpdate',
'CaseArtifactCreation',
'CaseArtifactJobCreation',
'CaseArtifactJobUpdate',
'CaseArtifactJobUpdate',
'CaseArtifactUpdate',
'CaseCreation',
'CaseTaskCreation',
'CaseTaskLogCreation',
@frikky
frikky / AlertCreation.json
Created May 20, 2019 21:48
AlertCreation example for WALKOFF
{
"actions": [
{
"app_name": "thehive",
"app_version": "0.0.3",
"errors": [
"Parameter 'cur_id' not found in workflow but is required in 'thehive' API.",
"Parameter 'field' not found in workflow but is required in 'thehive' API.",
"Parameter 'data' not found in workflow but is required in 'thehive' API."
],
@frikky
frikky / test-alert-create.py
Created May 20, 2019 22:03
TheHive alert creation test script
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import time
from thehive4py.api import TheHiveApi
from thehive4py.models import Alert, AlertArtifact, CustomFieldHelper
api = TheHiveApi('http://127.0.0.1:9000', 'CHANGEME :)')
artifacts = []
@frikky
frikky / buildimage.go
Created June 18, 2019 08:52
Create docker image from Dockerfile
package main
import (
"log"
"io/ioutil"
"io"
"context"
"bytes"
"os"
"archive/tar"
@frikky
frikky / removecontainer.go
Created June 18, 2019 08:57
Stop and remove a docker container with Golang
package main
import (
"log"
"fmt"
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
)
@frikky
frikky / runcontainer.go
Created June 18, 2019 09:20
Run a custom Docker container with port 8080 and environment variables
package main
import (
"log"
"context"
"fmt"
"github.com/docker/docker/client"
natting "github.com/docker/go-connections/nat"
"github.com/docker/docker/api/types/container"
@frikky
frikky / netcraft_screenshot.py
Created July 11, 2019 09:16
Taking a screenshot in Netcraft using your own credentials
import requests
def screenshot(username, password, takedownurl, proxies):
if not isinstance(proxies, list) or len(proxies) == 0:
print("Proxies should be a list of countrynames e.g. [us,en]")
return ""
if len(username) == 0 or len(password) == 0:
print("Username and password has to be defined")
return ""
@frikky
frikky / user.go
Created November 20, 2019 05:35
A Firestore user edit that should roll back your data
package user
import (
"context"
"errors"
"log"
"time"
"cloud.google.com/go/firestore"
)