- 1
Ёбаный openconnect
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
Ёбаный openconnect
openconnect -- это свободная реализация протоколоа CISCO AnyConnect VPN.
В первом комменте опишу проблему.
+1
math.Min(float64, float64) float64
math.Max(float64, float64) float64
В goвне нету math.Min для integer. Даже в анскильном "Си" это есть.
https://www.pixelstech.net/article/1559993656-Why-no-max-min-function-for-integer-in-GoLang
+1
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;
@ControllerAdvice
@Order(10000)
public class BinderControllerAdvice {
@InitBinder
public void setAllowedFields(WebDataBinder dataBinder) {
String[] denylist = new String[]{"class.", "Class.", ".class.", ".Class."};
dataBinder.setDisallowedFields(denylist);
}
}
Критическая 0-day уязвимость в Spring Framework, применяемом во многих Java-проектах
Работа эксплоита сводится к отправке запроса с параметрами "class.module.classLoader.resources.cont ext.parent.pipeline.first.*", обработка которых при использовании "WebappClassLoaderBase" приводит к обращению к классу AccessLogValve. Указанный класс позволяет настроить логгер для создания произвольного jsp-файла в корневом окружении Apache Tomcat и записи в этот файл указанного атакующим кода. Созданный файл становится доступным для прямых запросов и может использоваться в качестве web shell. Для атаки на уязвимое приложение в окружении Apache Tomcat достаточно отправить запрос с определёнными параметрами при помощи утилиты curl.
curl -v -d "class.module.classLoader.resources.context.parent.pipeline
.first.pattern=код_для_вставки_в_файл
&class.module.classLoader.resources.context.parent.pipeline.first.suffix=.jsp
&class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps/ROOT
&class.module.classLoader.resources.context.parent.pipeline.first.prefix=tomcatwar
&class.module.classLoader.resources.context.parent.pipeline.first.fileDateFormat="
http://localhost:8080/springmvc5-helloworld-exmaple-0.0.1-SNAPSHOT/rapid7
+1
Из-за вашей политоты Борманд ушёл.
+1
<?php defined('SYSPATH') or die('No direct script access.');
/*
* Базовый класс главной страницы
*/
class Controller_Index extends Controller {
public function before() {
parent::before();
I18n::lang('ru');
$settings = Kohana::config('settings');
Cookie::$salt = 'asd12d2';
Session::$default = 'cookie';
$this->session = Session::instance();
}
public function action_index() {
//Путь до файла первоночального xml (xsl)
$path_xml='tpl/xml.xsl';
//Путь конечного xsl
$path_xsl='tpl/index.xsl';
$url = $this->request->param('stuff');
//print_r($_SERVER);
/*if($_SERVER ['REQUEST_URI']=='/'){
$this->request->redirect($_SERVER ['HTTP_X_FORWARDED_PROTO'].'://'.$_SERVER['HTTP_HOST'],'301');
}*/
if(empty($url)){
$url='/';
}
$htmlfile='cache-html/'.md5($url);
$allurl=$_SERVER ['REQUEST_URI'];
if($allurl=='/20-40-kvm') $this->request->redirect('/sadovye-domiki','301');
if($allurl=='/40-80-kvm') $this->request->redirect('/sadovye-domiki','301');
if($allurl=='/80-i-bolee-kvm') $this->request->redirect('/sadovye-domiki','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/sadovye-domiki','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=1&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=81-400') $this->request->redirect('/80-i-bolee-kvm','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=1&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=40-80') $this->request->redirect('/40-80-kvm','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/stroitelstvo-dachnyh-domov','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=2&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/kottedzhi','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=3&technology%5B%5D=0&technology%5B%5D=2&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/bani','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=3&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/bani-iz-profilirovannogo-brusa','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=3&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/karkasnye-bani','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=3&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/bani-iz-ocilindrovannogo-brevna','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=316018-3000000&area=0-400') $this->request->redirect('/brus','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/kottedzhi-profilirovannyj-brus','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=329056-3000000&area=0-400') $this->request->redirect('/dachnye-doma-karkasnaya-tehnologiya','301');
if($allurl=='/nashi-proecty?searcher=48291§ion=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=1&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/individualnye-proekty','301');
Там ещё дальше веселье продолжается, но гк не дает запостить больше
+1
function rand:LongInt;
{$IFOPT J-} {$J+} {$DEFINE NoJ} {$ENDIF}
const next:LongInt=1;
{$IFDEF NoJ} {$J-} {$UNDEF NoJ} {$ENDIF}
begin
next:=next*1103515245+12345;
Result:=(next div 65536) mod 32768;
end;
Краткая инструкция как сделать static unsigned long int на Delphi.
+1
Петух иньо забыл продлить домен
+1
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysql = new mysqli($host, $db_user, $db_pass, $db_name);
mysqli_set_charset($mysql, "utf8");
$region = mysqli_query($mysql, "SELECT * FROM `rubric_subsection`");
while ($rows_rubriki = mysqli_fetch_array($region))
{
// $razdel = mysqli_query($mysql, "SELECT * FROM `city_region` LIMIT 1");
//while ($raz = mysqli_fetch_array($razdel)) {
$rubriki = mysqli_query($mysql, "SELECT `region`, `subsection`, COUNT(region) as count FROM `big_baza` where `region` = 'Республика Бурятия' AND `subsection` = '".$rows_rubriki['name']."'");
$data = mysqli_fetch_assoc($rubriki);
echo ''.$rows_rubriki['name'].' / '.$data['count'].'<br>';
//mysqli_query($mysql, "INSERT INTO `calculator_region`(`id`, `region_id`, `subsection_id`, `count`) VALUES ('','".$raz['id']."','".$rows_rubriki['id']."','".$data['count']."')");
// }
}
+1
https://habr.com/ru/post/655085/
эксель быстрее шарпов, шах и мат дотнетчики...
+1
#pragma aux __cdecl "_*" \
parm caller [ ] \
value struct float struct routine [eax] \
modify [eax ecx edx]