Skip to content

Instantly share code, notes, and snippets.

View jeperez's full-sized avatar

José Enrique Pérez Fernández jeperez

View GitHub Profile
@jeperez
jeperez / find-k8snode-interface.sh
Created May 29, 2020 15:25 — forked from r0mdau/find-k8snode-interface.sh
How to get tcpdump for containers inside Kubernetes pods
# find the kube node of the running pod, appear next to hostIP, and note containerID hash
kubectl get pod mypod -o json
# -> save hostIP
# -> save containerID
# connect to the node and find the pods unique network interface index inside it's container
docker exec containerID /bin/bash -c 'cat /sys/class/net/eth0/iflink'
# -> returns index
# locate the interface of the node
@jeperez
jeperez / blaster.c
Created August 18, 2019 19:25 — forked from yorickdewid/blaster.c
Blaster worm source
/*
DECOMPILED SOURCE FOR MS RPC DCOM BLASTER WORM
<http://robertgraham.com/journal/030815-blaster.c>
This file contains source code for the "msblast.exe" worm
that was launched against the Internet on August 10, 2003.
This "source-code" was decompiled using "IDApro", an
"interactive disassembler". IDA is the most popular tool
app/
|- app.module.ts
|- app-routing.module.ts
|- core/
|- auth/
|- auth.module.ts (optional since Angular 6)
|- auth.service.ts
|- index.ts
|- othermoduleofglobalservice/
|- ui/
@jeperez
jeperez / mem-loader.asm
Created October 13, 2018 19:13 — forked from zznop/mem-loader.asm
Fun little loader shellcode that executes an ELF in-memory using an anonymous file descriptor (inspired by https://x-c3ll.github.io/posts/fileless-memfd_create/)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Copyright (C), zznop, zznop0x90@gmail.com
;;;
;;; This software may be modified and distributed under the terms
;;; of the MIT license. See the LICENSE file for details.
;;;
;;; DESCRIPTION
;;;
;;; This PoC shellcode is meant to be compiled as a blob and prepended to a ELF
@jeperez
jeperez / yoon-kim-cnn.py
Created September 25, 2018 15:20
yoon-kim-cnn.py
# coding: utf-8
# ## CNN for Text Classification
# Implementation of *Convolutional Neural Networks for Sentence Classification* (Yoon Kim, 2014).
#
# In his [paper](https://arxiv.org/abs/1408.5882), Yoon Kim proposed several techniques to achieve good text classification accuracy with minimal hyper-parameter tuning.
#
# This notebook consist of 4 main sections:
#
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@jeperez
jeperez / LICENCE SUBLIME TEXT
Created August 31, 2018 16:47
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@jeperez
jeperez / LoginSimulation.scala
Created August 11, 2018 12:28 — forked from sadikovi/LoginSimulation.scala
Another example of Gatling scenario with complex authentication/response processing and number of simple requests that have been used as a test.
package mobilepackage
import io.gatling.core.Predef._
import io.gatling.core.session._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import scala.util.parsing.json._
import general._
class LoginSimulation extends Simulation {

Live Coding a KSQL Application

Introduction

@jeperez
jeperez / AppUser.java
Created May 13, 2018 15:48 — forked from kaustuvmaji/AppUser.java
Spring Boot RestFul Webservice Example
package com.example.demo.security;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author KMaji
*
*/