- 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
0
// https://github.com/santiontanon/stransball2/blob/dff413c6ed236b4be23e0152557a26d7d902976c/sources/state_changepack.cpp#L67
bool state_changepack_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
{
if (SUBSTATE==0) {
if (image!=0) SDL_FreeSurface(image);
image=IMG_Load("graphics/tittle.pcx");
{
levelpacks.Delete();
#ifdef _WIN32
/* Find files: */
WIN32_FIND_DATA finfo;
HANDLE h;
h=FindFirstFile("maps/*.lp",&finfo);
if (h!=INVALID_HANDLE_VALUE) {
char *tmp;
tmp=new char[strlen(finfo.cFileName)+1];
strcpy(tmp,finfo.cFileName);
levelpacks.Add(tmp);
while(FindNextFile(h,&finfo)==TRUE) {
char *tmp;
tmp=new char[strlen(finfo.cFileName)+1];
strcpy(tmp,finfo.cFileName);
levelpacks.Add(tmp);
} /* while */
} /* if */
#else
DIR *dp;
struct dirent *ep;
dp = opendir ("maps");
if (dp != NULL)
{
while (ep = readdir (dp))
{
char *tmp;
if (strlen(ep->d_name)>4 &&
ep->d_name[strlen(ep->d_name)-3]=='.' &&
ep->d_name[strlen(ep->d_name)-2]=='l' &&
ep->d_name[strlen(ep->d_name)-1]=='p') {
tmp=new char[strlen(ep->d_name)+1];
strcpy(tmp,ep->d_name);
levelpacks.Add(tmp);
} /* if */
}
(void) closedir (dp);
}
#endif
Super Transball 2 (супер трансшары 2)
0
<?php
public function submit()
{
$requestUri = 'http://127.0.0.1:8000/test/hs/Services/GetShedule';
$response = $this->doPostCall($requestUri . '?' . $this->prepareParams(), null);
$temp_str = json_encode(mb_convert_encoding($response, 'UTF-8'));
$temp_str = str_replace('\ufeff', '', $temp_str);
$temp_str = str_replace('\r', '', $temp_str);
$temp_str = str_replace('\n', '', $temp_str);
$temp_str = str_replace('\"', '"', $temp_str);
$temp_str = mb_strcut($temp_str, 1, -1);
$temp_arr = json_decode($temp_str, true);
$post_main_data = [];
$post_sub_data = [];
foreach($temp_arr as $main_unit_key => $main_unit_value) {
foreach($main_unit_value as $main_unit_feature_key => $main_unit_feature_value) {
foreach ($main_unit_feature_value as $sub_unit_key => $sub_unit_value) {
foreach($sub_unit_value as $sub_unit_feature_key => $sub_unit_feature_value) {
unset($sub_unit_value['Расписание']);
$post_sub_data[$main_unit_key][$main_unit_feature_key][$sub_unit_key] = $sub_unit_value;
}
}
}
}
$raw_data = $temp_arr;
$filter = array('Посты');
$raw_data_length = count($raw_data);
for ($row = 0; $row < $raw_data_length; $row++) {
$post_main_data[] = array_diff_key($raw_data[$row], array_flip($filter));
}
foreach($post_main_data as $pmd_key => $pmd_value) {
$post_main_data[$pmd_key][key($post_sub_data[$pmd_key])] = array_values(array_values($post_sub_data[$pmd_key])[0]);
}
header_remove();
header("Content-Type: application/json");
http_response_code(200);
exit();
}
?>
+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
Из-за вашей политоты Борманд ушёл.
0
Пиздец-оффтоп #46
#16: https://govnokod.ru/27328 https://govnokod.xyz/_27328
#17: https://govnokod.ru/27346 https://govnokod.xyz/_27346
#18: https://govnokod.ru/27374 https://govnokod.xyz/_27374
#19: https://govnokod.ru/27468 https://govnokod.xyz/_27468
#20: https://govnokod.ru/27469 https://govnokod.xyz/_27469
#21: https://govnokod.ru/27479 https://govnokod.xyz/_27479
#22: https://govnokod.ru/27485 https://govnokod.xyz/_27485
#23: https://govnokod.ru/27493 https://govnokod.xyz/_27493
#24: https://govnokod.ru/27501 https://govnokod.xyz/_27501
#25: https://govnokod.ru/27521 https://govnokod.xyz/_27521
#26: https://govnokod.ru/27545 https://govnokod.xyz/_27545
#27: https://govnokod.ru/27572 https://govnokod.xyz/_27572
#28: https://govnokod.ru/27580 https://govnokod.xyz/_27580
#29: https://govnokod.ru/27738 https://govnokod.xyz/_27738
#30: https://govnokod.ru/27751 https://govnokod.xyz/_27751
#31: https://govnokod.ru/27754 https://govnokod.xyz/_27754
#32: https://govnokod.ru/27786 https://govnokod.xyz/_27786
#33: https://govnokod.ru/27801 https://govnokod.xyz/_27801
#34: https://govnokod.ru/27817 https://govnokod.xyz/_27817
#35: https://govnokod.ru/27822 https://govnokod.xyz/_27822
#36: https://govnokod.ru/27826 https://govnokod.xyz/_27826
#37: https://govnokod.ru/27827 https://govnokod.xyz/_27827
#38: https://govnokod.ru/27833 https://govnokod.xyz/_27833
#39: https://govnokod.ru/27862 https://govnokod.xyz/_27862
#40: https://govnokod.ru/27869 https://govnokod.xyz/_27869
#41: https://govnokod.ru/27933 https://govnokod.xyz/_27933
#42: https://govnokod.ru/27997 https://govnokod.xyz/_27997
#43: https://govnokod.ru/28042 https://govnokod.xyz/_28042
#44: https://govnokod.ru/28080 https://govnokod.xyz/_28080
#45: https://govnokod.ru/28086 https://govnokod.xyz/_28086
0
def _generate_greeting(self) -> str:
date = datetime.datetime.fromtimestamp(time.time(), pytz.timezone(config.TIMEZONE))
if 6 <= date.hour < 11:
return 'Доброе утро!'
elif 11 <= date.hour < 18:
return 'Добрый день.'
elif 18 <= date.hour < 23:
return 'Добрый вечер.'
else:
return 'Доброй ночи.'
0
Политота #12
#1: https://govnokod.ru/15804 https://govnokod.xyz/_15804
#2: https://govnokod.ru/19910 https://govnokod.xyz/_19910
#3: https://govnokod.ru/23643 https://govnokod.xyz/_23643
#4: (vanished) https://govnokod.xyz/_24822
#5: https://govnokod.ru/24868 https://govnokod.xyz/_24868
#6: (vanished) https://govnokod.xyz/_26648
#7: https://govnokod.ru/26673 https://govnokod.xyz/_26673
#8: https://govnokod.ru/27052 https://govnokod.xyz/_27052
#9: https://govnokod.ru/27852 https://govnokod.xyz/_27852
#10: https://govnokod.ru/28060 https://govnokod.xyz/_28060
#11: https://govnokod.ru/28091 https://govnokod.xyz/_28091
+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');
Там ещё дальше веселье продолжается, но гк не дает запостить больше