Skip to content

Instantly share code, notes, and snippets.

View AgelxNash's full-sized avatar
Open to suggestions

Евгений Борисов AgelxNash

Open to suggestions
View GitHub Profile
@AgelxNash
AgelxNash / QueuePHPThumb.class.php
Last active December 30, 2015 08:59
PHPThumb под MODX Evolution с поддержкой очереди сжатия картинок
<?php
class QueuePHPThumb{
/** @var \DocumentParser|null */
protected $_modx = null;
/** @var PhpThumb */
protected $phpThumb = null;
protected $options = array();
protected $image = null;
protected $noFile = null;
protected $queue = false;
@AgelxNash
AgelxNash / plugin.LoadElement.php
Last active February 8, 2022 03:39
[MODX Evolution] Плагин загрузки элементов (чанков и сниппетов) из файлов
<?php
/**
* LoadElement
*
* Загрузка элементов из файлов
*
* @version 2.0.0
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
* @category plugin
* @author Agel Nash <modx@agel-nash.ru>
@AgelxNash
AgelxNash / gist-embed.js
Created June 20, 2014 21:42
<pre class="gist" data-id="7377194"></pre>
$('pre.gist').each(function(){
var placeholder = $(this);
var filename = placeholder.data('file');
$.ajax({
url: 'https://api.github.com/gists/'+$(this).data('id'),
type: 'GET',
dataType: 'jsonp'
}).success( function(gistdata) {
if(filename != null && typeof gistdata.data.files[filename] !== "undefined"){
var content = gistdata.data.files[filename].content;
@AgelxNash
AgelxNash / Analitics.function.php
Created December 22, 2014 01:14
Функция для анализа коллекций Laravel
/**
* @param Collection $data
* @param string $key Ключ для записи с числовым значением
* @return Collection
*/
function Analitics(Collection $data, $key){
$out = new Collection;
$sum = $data->sum(function($item) use ($key){
return $item[$key];
});
<?php
$str = 'fD3_';
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9'), ['_']);
$total = 0;
$brut = '';
$len = strlen($str);
/**
* @see: https://www.programmingalgorithms.com/algorithm/brute-force?lang=PHP
*/

Keybase proof

I hereby claim:

  • I am AgelxNash on github.
  • I am agel_nash (https://keybase.io/agel_nash) on keybase.
  • I have a public key whose fingerprint is ECBB 7D98 3B14 718D A9EF 3F53 BEE0 4861 12F0 296F

To claim this, I am signing this object:

@AgelxNash
AgelxNash / anRules.rule
Created October 1, 2017 07:56
HashCat
i6
i7
i4
i5
i8
i3
s_
[ i5
$+ R6 R6
i9
@AgelxNash
AgelxNash / .htaccess
Created October 1, 2017 14:09
Блокировка неугодных User Agent
#Script kiddie blocker start
RewriteEngine On
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_USER_AGENT} ^w3af.sourceforge.net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dirbuster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nikto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sqlmap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} fimap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nessus [NC,OR]
@AgelxNash
AgelxNash / navicat_tunnel.php
Created October 27, 2017 05:59 — forked from peterjaap/navicat_tunnel.php
Navicat tunnel file (the nearly unfindable ntunnel_mysql.php)
<?php //version my104
header("Content-Type: application/octet-stream");
error_reporting(0);
set_time_limit(0);
set_magic_quotes_runtime(0);
function phpversion_int()
{
list($maVer, $miVer, $edVer) = split("[/.-]", phpversion());
@AgelxNash
AgelxNash / xml-attacks.md
Created February 10, 2018 22:36 — forked from mgeeky/xml-attacks.md
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.