Smart 🧠 Fullstack
45 subscribers
168 photos
11 videos
13 files
153 links
About channel: everyday developer hints.

for (💲Coders as 💲Student):
echo("Hello 💲Student->name");
endfor;

Author: @BakirovRoman
Download Telegram
🐒 Prevent Elements Inserting in iframe in Tampermonkey 🖥

if (window.top != window.self) {
return;
}


#tampermonkey #iframe
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from SecAtor
Стартовал Pwn2Own Vancouver 2024, за первый день которого участники продемонстрировали эксплуатацию 0-day в Windows 11, Tesla и Ubuntu Linux, выиграв 732 500$ и автомобиль Tesla Model 3.

Haboob SA реализовал эксплойт Adobe Reader, который сочетал в себе обход ограничений API и ошибку внедрения команд, добившись RCE на macOS и заработав 50 000$.

Synacktiv
выиграла Tesla Model 3 и 200 000$ после взлома электронного блока управления Tesla с помощью Vehicle (VEH) CAN BUS Control менее чем за 30 секунд с использованием целочисленного переполнения.

Исследователи Theori сорвали куш в 130 000$, продемонстрировав RCE в VMware Workstation с использованием цепочки эксплойтов, нацеленной на ошибку неинициализированной переменной, слабость UAF и переполнение буфера на основе кучи.

Спецы из Reverse Tactics заработали 90 000$, воспользовавшись двумя ошибками Oracle VirtualBox и Windows UAF.

DEVCORE
получила награду в размере 30 000$ за повышение привилегий в полностью исправленной системе Windows 11 с помощью эксплойта, нацеленного на две ошибки, включая состояние гонки TOCTAU.

Еще 10 000$ им ушло за демонстрацию уже известного эксплойта локального повышения привилегий (LPE) в Ubuntu Linux.

KAIST Hacking Lab
взломали веб-браузер Google Chrome, используя Use-After-Free (UAF), и получили 60 000$.

ASU SEFCOM
продемонстрировал еще один эксплойт LPE, нацеленный на Ubuntu Linux, с помощью условия гонки, заработав 20 000$.

Коди Галлахер
также выиграл 20 000$ за 0-day в Oracle VirtualBox (OOB), которую также за 20 000$ взломала Dungdm из Viettel Cyber Security, используя цепочку эксплойтов из двух ошибок.

Первый день конкурса завершился тем, что Манфред Пол взломал веб-браузеры Apple Safari, Google Chrome и Microsoft Edge, воспользовавшись тремя 0-day и выиграв 102 500 долларов.

После Pwn2Own у поставщиков будет 90 дней на выпуск исправлений безопасности для всех обнаруженных недостатков, прежде чем Trend Micro Zero Day Initiative раскроет их публично.

Во второй день Pwn2Own участники попытаются реализовать 0-day в Windows 11, VMware Workstation, Oracle VirtualBox, Mozilla Firefox, Ubuntu Desktop, Google Chrome, Docker Desktop и Microsoft Edge.

Будем следить.
Forwarded from SecAtor
Подошел к концу хакерский поединок Pwn2Own Vancouver 2024, по итогам которого исследователи продемонстрировали 29 0-day, заработав в общей сложности 1132500$.

Победу в турнире одержал Манфред Пол с 25 очками Master of Pwn и наградой в 202500$ после взлома браузеров Apple Safari, Google Chrome и Microsoft Edge.

Второе место досталось команде Synacktiv с 20 очками, 200 000 зеленых и призовым авто. 145 000$ и третья строчка достались Seunghyun Lee.

На второй день Манфред Пол также воспользовался 0-day записи за пределами границ (OOB) для RCE, и осуществил выход из песочницы Mozilla Firefox, используя серьезную уязвимость функции.

Эксплойты повышения привилегий в Windows 11 продемонстрировали исследователи HackInside и IBM X-Force.

STAR Labs SG
успешно обкатали свои EoP-эксплойты для VMware Workstation и Ubuntu Linux, а также реализовали выход из Docker.

Команда Palo Alto взломала Chrome и Edge, преодолев защиту V8, а ColdEye препарировали Oracle VirtualBox.

KAIST Hacking Lab
показала рабочий RCE-эксплойт для Chrome и Edge, а коллеги из Theori - EoP в Ubuntu Linux.

Таким образом, общий призовой фонд составил более 1300000$ в виде денежных призов, с учетом автомобиля Tesla Model 3, который укатила в качестве бонуса Team Synacktiv в первый день соревнований.

Участники по ходу мероприятия успешно реализовали EoP и RCE на полностью пропатченных Windows 11, Ubuntu Desktop, VMware Workstation, Oracle VirtualBox, Apple Safari, Google Chrome и Microsoft Edge и Tesla Model 3.

Теперь мяч на стороне поставщиков, которым предстоит уложиться в 90 дней перед тем, как исследователи раскроют технические подробности и задействованные эксплойты.
💬 WhatsApp web link / deeplink
Web
https://web.whatsapp.com/send/?phone=77777777777&text=Hello&type=phone_number

App deeplink
whatsapp://send?phone=77777777777&text=Hello


💬 Telegram
Common
https://t.me/bakirovroman

Web
https://web.telegram.org/a/#390941013

App deeplink
tg://resolve?domain=bakirovroman


#tg #telegram #whatsapp #deeplink #link #web
Please open Telegram to view this post
VIEW IN TELEGRAM
🗺 Map 2gis widget constructor 4 your site 🗺🗺

https://firmsonmap.api.2gis.ru/firmsconstructor

#gis #2gis #constructor #map #maps #widget
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 HTML hyphen without wrap 🥳

‑

Example:
up‑to‑date


#html #hyphen #wrap
Please open Telegram to view this post
VIEW IN TELEGRAM
🖥 Mail & tel deep links 📞🖥

Phone:
<a href="tel:+78005555535">Call Me</a>

a[href^="tel:"] {
font-size: 16px;
line-height: 32px;
text-decoration: none;
color: #000000;
}
a[href^="tel:"]:before {
content: "\260e";
margin-right: 0.5em;
}


eMail:
<a href="mailto:mail@examle.com&body=Hi?subject=Subj">Write Me</a>


#deeplink #mail #mailto #deep #link #html #css #tel #phone
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥2
🖥 How to fix WARN[0000] /var/www/project/docker-compose.yml: `version` is obsolete 🐧

Remove version: "*" from docker-compose.yml

#docker #fix #warn #version #compose
Please open Telegram to view this post
VIEW IN TELEGRAM
😱2
🔥3
🐒 Tampermonkey Add Fast Copy Button 🖥

// ==UserScript==
// @name Click to Copy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Click an element to copy its content to clipboard
// @match https://example.com/* // Replace with the URL of the webpage
// @grant GM_setClipboard
// ==/UserScript==

(function() {
'use strict';

// Add a click event listener to the element you want to copy
document.querySelector('your_element_selector').addEventListener('click', function() {
const contentToCopy = document.querySelector('your_element_selector').innerText; // Replace with the selector for the element
GM_setClipboard(contentToCopy);
alert('Content copied to clipboard: ' + contentToCopy);
});
})();

#tampermonkey #tamper #monkey #copy #js #javascript #frontend #clipboard
Please open Telegram to view this post
VIEW IN TELEGRAM
📱 Jira & Tampermonkey | Add Fast Copy Buttons 🐒

Replace your-company to your company domain.

Get Code

#jira #js #javascript #tamper #monkey #tampermonkey #frontend
Please open Telegram to view this post
VIEW IN TELEGRAM
// ==UserScript==
// @name Jira Fast Task Copy Button
// @namespace http://tampermonkey.net/
// @version 2024-05-03
// @description try to take over the world!
// @author You
// @match https://jira.your-company.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=jira.com
// @grant GM_setClipboard
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
const customStyles = `
.jira-fast-copy-btn {
background-color: #0052CC;
color: white;
padding: 4px 7px 4px 7px !important;
border-radius: 9px;
position: unset !important;
margin-left: 6px !important;
cursor: pointer;
}
.jira-fast-copy-btn_copied {
background-color: green !important;
}
.jira-fast-copy-btn_copied:hover {
background-color: green !important;
}
.jira-fast-copy-btn:hover {
background-color: #0052CCAB;
}
`;
GM_addStyle(customStyles);
let addButton = function (buttonsContainer, text, copy) {
let copyButton = document.createElement('li');
copyButton.className = "jira-fast-copy-btn";
copyButton.innerText = text;
buttonsContainer.appendChild(copyButton);
copyButton.addEventListener("click", function (e) {
copy
? GM_setClipboard(copy)
: alert(text + " not found 4 copy!");
copyButton.classList.add("jira-fast-copy-btn_copied");
setTimeout(function () {
copyButton.classList.remove("jira-fast-copy-btn_copied")
}, 500);
})
}
let alreadyExists = false;
const handleNewNode = (mutationsList, observer) => {
mutationsList.forEach(mutation => {
mutation.addedNodes.forEach(node => {
let buttonsContainer = document.querySelector("header#stalker .aui-nav.aui-nav-breadcrumbs");
if (!buttonsContainer || alreadyExists) {
return;
}
alreadyExists = true;
let id = document.getElementsByClassName("issue-link")[0];
if (id) {
id = id.innerText;
}
let name = document.getElementById("summary-val");
if (name) {
name = name.innerText;
}
addButton(
buttonsContainer,
"Copy Key",
id
);
addButton(
buttonsContainer,
"Copy Summary",
name
);
addButton(
buttonsContainer,
"Copy Key & Summary",
`[${id}] ${name}`
);
let link = document.location.protocol + "//" + document.location.hostname + "/browse/" + id;
addButton(
buttonsContainer,
"Copy Link",
link
);
addButton(
buttonsContainer,
"Copy Key & Summary & Link",
`[${id}] ${name}\n${link}`
);
observer.disconnect();
});
});
};
const config = { childList: true, subtree: true };
const observer = new MutationObserver(handleNewNode);
observer.observe(document.body, config);
})();
📱 Remove All Videos From Youtube Watch Later Playlist 🖥

For english interface

For Russian interface:
setInterval(function () {
video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

video.querySelector('#primary button[aria-label="Меню действий"]').click();

var things = document.evaluate(
'//span[contains(text(),"Удалить из плейлиста")]',
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null
);

for (var i = 0; i < things.snapshotLength; i++) {
things.snapshotItem(i).click();
}
}, 500);


#google #youtube #watch #later #js #javascript #frontend #script
Please open Telegram to view this post
VIEW IN TELEGRAM
🖱 Alias 4 Execute Command Stack and Return to Working Directory 🎛

alias command-stack='current_dir=$(pwd); cd /var/www/any-dir/; cmd-one; cmd-two; cd "${current_dir}"'


Example:
alias proxy='current_dir=$(pwd); cd /var/www/docker-ports-proxy/; make; cd "${current_dir}"'



#linux #bash #alias #cd #shell #sh #proxy #script
Please open Telegram to view this post
VIEW IN TELEGRAM
🖱 Get Top 30 Biggest Files 🎛

find / -type f -exec du -h {} + 2>/dev/null | sort -hr | head -n 30


#bigges #ssd #hdd #size #mem #memory #find #du #df #sort #head #shell #ssh #top #file #files #filesystem
Please open Telegram to view this post
VIEW IN TELEGRAM
PHP Script 4 Convert JSON String to PHP Array as Code 🖥

<?php

/**
* Converts a JSON string to PHP array code using the new square bracket syntax with proper indentation
*
* @param string $jsonString JSON string to convert
* @return string PHP code representing the array
*/
function jsonToPhpArrayCodeNewSyntax($jsonString) {
// Decode the JSON string to a PHP array
$array = json_decode($jsonString, true);

// Check for decoding errors
if (json_last_error() !== JSON_ERROR_NONE) {
return 'Error decoding JSON: ' . json_last_error_msg();
}

// Convert the array to PHP code with square bracket syntax
return '$data = ' . arrayToPhpCode($array) . ';';
}

/**
* Recursively converts an array to PHP code using square bracket syntax with proper indentation
*
* @param mixed $array The array to convert
* @param int $indentLevel Current level of indentation
* @return string PHP code representing the array
*/
function arrayToPhpCode($array, $indentLevel = 0) {
if (!is_array($array)) {
return var_export($array, true);
}

$code = "[\n";
$indentation = str_repeat(' ', $indentLevel + 1);
foreach ($array as $key => $value) {
$code .= $indentation;
$code .= is_int($key) ? '' : var_export($key, true) . ' => ';
$code .= arrayToPhpCode($value, $indentLevel + 1) . ",\n";
}
$code .= str_repeat(' ', $indentLevel) . "]";

return $code;
}

$jsonString = <<<JSON
{
"name": "Roman",
"age": 27,
"city": "Omsk",
"address": {
"street": "Lenina",
"number": 26
}
}
JSON;

echo jsonToPhpArrayCodeNewSyntax($jsonString) . PHP_EOL;


Input:
{
"name": "Roman",
"age": 27,
"city": "Omsk",
"address": {
"street": "Lenina",
"number": 26
}
}


Output:
$data = [
'name' => 'Roman',
'age' => 27,
'city' => 'Omsk',
'address' => [
'street' => 'Lenina',
'number' => 26,
],
];


#php #js #json #javascript #converter #gpt
Please open Telegram to view this post
VIEW IN TELEGRAM