Skip to content

Instantly share code, notes, and snippets.

View Jeket's full-sized avatar

Jeket Jeket

View GitHub Profile
@Jeket
Jeket / daemon.cpp
Last active October 13, 2020 23:24 — forked from faberyx/c++ daemon
C++ daemon
#include <stdio.h>
#include <signal.h>
#include <syslog.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
@Jeket
Jeket / example.php
Created November 9, 2019 10:27 — forked from yakupyavas/example.php
Example
<?php
require_once 'complex.php';
#Examples
$complex = new Complex(); //instance
$complex->set_comp_num(3,4); //define number(Default 0,0)
echo"Number: ".$complex->comp_numb."<br>";
echo"Real: ".$complex->real."<br>";
echo"Imaginer: ".$complex->imaginer."<br>";
echo "Modulus: ".$complex->modulus()."<br>";
echo "Polar Form: ".$complex->polar_form()."<br>";
@Jeket
Jeket / complex.php
Created November 9, 2019 10:26 — forked from yakupyavas/complex.php
PHP Complex Number Class
<?php
#Coded By Yakup Yavaş
#Complex Number PHP Class
class Complex {
public $real;
public $imaginer;
public $comp_numb;
public $degree;
function __construct() //constructor method
{
@Jeket
Jeket / README.md
Created August 9, 2019 09:51 — forked from hofmannsven/README.md
Notes on working with JetBrains PhpStorm IDE on macOS.
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
@Jeket
Jeket / iterator.php
Created June 27, 2019 16:51 — forked from ckhampus/iterator.php
PHP Parent Array Iterator
<?php
$data = array(
array(
'id' => 1,
'children' => array(
array(
'id' => 12,
'children' => array(

Hello,

Here's a quick and dirty way to slip a backdoor into a PHP project by abusing Namespaces.

POC:

root@ssh:~/underhanded# php index.php SUCCESS

@Jeket
Jeket / EntityBase.php
Created June 24, 2019 14:12
symfony doctrine updatedAt createdAt updated_at created_at fields timestamp
<?php
namespace AppBundle\Mapping;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* Class EntityBase
*
@Jeket
Jeket / ssh_tunneling.md
Last active October 13, 2020 23:12
SSH tunelling

SSH tunelling

Syntax

ssh -L {LOCAL_PORT}:{HOST}:{REMOTE_PORT} {REMOTE_HOST}

Example

ssh -L 3001:localhost:3001 username@host
@Jeket
Jeket / .zshrc
Last active January 6, 2019 07:11
OSX zsh config
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/Jeket/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes