Skip to content

Instantly share code, notes, and snippets.

View Ejuc's full-sized avatar
😇

Eduards Blumbergs Ejuc

😇
  • Riga
View GitHub Profile
@Ejuc
Ejuc / rgb_to_kelvin.py
Created January 1, 2022 03:34 — forked from petrklus/rgb_to_kelvin.py
Kelvin to RGB in python
"""
Based on: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
Comments resceived: https://gist.github.com/petrklus/b1f427accdf7438606a6
Original pseudo code:
Set Temperature = Temperature \ 100
Calculate Red:
If Temperature <= 66 Then
@Ejuc
Ejuc / Install MobSF Ubuntu 18.04
Created May 11, 2021 21:41 — forked from reintakura/Install MobSF Ubuntu 18.04
Installing MobSF on Ubuntu 18.04
Update Repo
$ sudo apt get update
Install git
$ sudo apt install git
Install python package
$ sudo apt install python3-pip python3-venv python3-pip python3-dev build-essential libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
Install jdk
@Ejuc
Ejuc / squash.php
Created January 24, 2021 20:50 — forked from woganmay/squash.php
Use PHP to flatten a multidimensional stdClass object (like a json_decode result)
<?php
function squash($array, $prefix = '')
{
$flat = array();
$sep = ".";
if (!is_array($array)) $array = (array)$array;
foreach($array as $key => $value)
@Ejuc
Ejuc / calculate_totp.py
Created November 29, 2020 20:32 — forked from livingstonetech/calculate_totp.py
Reference code to calculate TOTP, given a base32 secret.
#!/usr/bin/env python3
"""
Gist to calculate Time-based One Time Password (TOTP).
This function is designed to be used in two modes:
- Current Mode
No timestamp supplied, and the current timestamp is considered.
This mode gives the totp at the present moment in time.
- Historic Mode
Here an explicit timestamp is supplied. This is to calculate a TOTP
that had occured at a moment in history.
@Ejuc
Ejuc / install-arachni-on-kali.sh
Created September 21, 2020 11:34 — forked from yaci/install-arachni-on-kali.sh
Install Arachni on Kali Linux
#! /bin/bash
######
# TO DOWNLOAD THIS SCRIPT SIMPLY TYPE:
# wget bit.ly/kali-arachni
######
#arachni will be installed in $targetInstallationDirectory/$targetDirectoryName
targetInstallationDirectory="$HOME/soft"
targetDirectoryName=arachni
@Ejuc
Ejuc / install.sh
Created September 21, 2020 11:33 — forked from yaci/install.sh
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common openssh-server
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce htop zsh
sudo docker info
sudo usermod -aG docker ubuntu
@Ejuc
Ejuc / install-w3af.sh
Created September 21, 2020 11:26 — forked from excalibur44/install-w3af.sh
w3af installation script for Kali Linux
#!/bin/bash
apt -y install git python-pip
git clone https://github.com/andresriancho/w3af.git --depth 1
chmod +x w3af/w3af_*
# installation for w3af_console
apt -y install libssl1.0-dev graphviz python-lxml
apt -y build-dep python-lxml
sed -i "s/'pyOpenSSL', '0.15.1'/'pyOpenSSL', '16.2.0'/g" w3af/w3af/core/controllers/dependency_check/requirements.py
pip install pyClamd==0.3.15 PyGithub==1.21.0 GitPython==2.1.3 pybloomfiltermmap==0.3.14 esmre==0.3.1 phply==0.9.1 nltk==3.0.1 chardet==2.1.1 tblib==0.2.0 pdfminer==20140328 futures==2.1.5 ndg-httpsclient==0.3.3 lxml==3.4.4 scapy-real==2.2.0-dev guess-language==0.2 cluster==1.1.1b3 msgpack-python==0.4.4 python-ntlm==1.0.1 halberd==0.2.4 darts.util.lru==0.5 Jinja2==2.7.3 vulndb==0.0.19 markdown==2.6.1 psutil==2.2.1 mitmproxy==0.13 ruamel.ordereddict==0.4.8 Flask==0.10.1 tldextract==1.7.2 pyOpenSSL==16.2.0