Skip to content

Instantly share code, notes, and snippets.

View ryanbekabe's full-sized avatar
💭
Cuckoo Sandbox for identify Malware, JupyterLab for Machine Learning

ryanbekabe

💭
Cuckoo Sandbox for identify Malware, JupyterLab for Machine Learning
View GitHub Profile
@ryanbekabe
ryanbekabe / mongo-struc.js
Created June 22, 2019 10:11 — forked from hkasera/mongo-struc.js
A script for mongo shell to get the collection structure.
var conn = new Mongo();
db = conn.getDB(<DB_NAME>);
var cursor = db.<COLLECTION>.find();
var items = [];
items = cursor.toArray();
var dbstruc = {};
for (var i = 0; i < items.length; ++i) {
var target = items[i];
getKP(target,dbstruc);
}
@ryanbekabe
ryanbekabe / cuckoo-analysis.json
Last active June 28, 2019 03:11
Sample Report Cuckoo Sandbox with MongoDB
{
"_id": "5d02dd4559bfaf1280fee9c9",
"info": {
"added": "2019-06-14T06:30:44.142Z",
"started": "2019-06-14T06:30:45.788Z",
"duration": 157,
"analysis_path": "/home/cuckoo/.cuckoo/storage/analyses/1180",
"ended": "2019-06-14T06:33:23.091Z",
"owner": null,
"score": 11,
@ryanbekabe
ryanbekabe / client.py
Created July 3, 2019 03:27 — forked from yoavram/client.py
Example of uploading binary files programmatically in python, including both client and server code. Client implemented with the requests library and the server is implemented with the flask library.
import requests
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file
url = "http://localhost:5000/"
fin = open('simple_table.pdf', 'rb')
files = {'file': fin}
try:
r = requests.post(url, files=files)
print r.text
@ryanbekabe
ryanbekabe / mic_client.py
Created August 10, 2019 17:30 — forked from fopina/mic_client.py
microphone streaming with pyAudio
#!/usr/bin/env python
import pyaudio
import socket
import sys
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 4096
@ryanbekabe
ryanbekabe / sources.list
Created August 15, 2019 06:22 — forked from h0bbel/sources.list
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@ryanbekabe
ryanbekabe / rsa_p36.py
Created August 16, 2019 00:28 — forked from dendisuhubdy/rsa_p36.py
RSA Implementation Running on Python 3.6
"""
Implementation of RSA cryptography
using samples of large numbers
"""
import random
import sys
import math
from random import randrange
@ryanbekabe
ryanbekabe / rsa.py
Created August 16, 2019 00:28
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@ryanbekabe
ryanbekabe / dna.py
Created August 16, 2019 01:01 — forked from odanga94/dna.py
CodeAcademy Python project: DNA Analysis
sample = ['GTA','GGG','CAC']
def read_dna(dna_file):
dna_data = ""
with open(dna_file, "r") as f:
for line in f:
dna_data += line
return dna_data
def dna_codons(dna):
@ryanbekabe
ryanbekabe / tea.py
Created August 22, 2019 09:46 — forked from twheys/tea.py
Python implementation of the Tiny Encryption Algorithm (TEA)
# coding: utf-8
"""
Implementation of the Tiny Encryption Algorithm (TEA) for Python
https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
Example Usage:
import tea
# The key must be 16 characters
@ryanbekabe
ryanbekabe / pysay.py
Created August 24, 2019 12:23
Python Text to Speech
import pyttsx3
import engineio
engineio = pyttsx3.init()
voices = engineio.getProperty('voices')
engineio.setProperty('rate', 130) # Aquí puedes seleccionar la velocidad de la voz
engineio.setProperty('voice',voices[0].id)
def speak(text):
engineio.say(text)