DEREFERENCE_POINTER_THERE Telegram 9919
Технологический Болт Генона
Достижение выполнения кода при контроле над текстом комментария в Python-скрипте https://www.opennet.ru/opennews/art.shtml?num=63669 Участники могли отправить сетевой запрос к Python-скрипту, который создавал новый Python-скрипт cо случайными именем, добавлял…
#prog #itsec #python

В конце мне не нравится, что автор поёт дифирамбы ИИ. Ну и ещё у него есть функция ascii_safe, которая написана просто ужасно:

def ascii_safe(x: int) -> bool:
"""True if all four bytes have high bit clear."""
return all(((x >> (8 * i)) & 0x80) == 0 for i in range(4))

Это явно можно написать одновременно эффективнее и проще для восприятия:

def ascii_safe(x: int) -> bool
return x & 0x80808080 == 0
💯13🤡5



tgoop.com/dereference_pointer_there/9919
Create:
Last Update:

#prog #itsec #python

В конце мне не нравится, что автор поёт дифирамбы ИИ. Ну и ещё у него есть функция ascii_safe, которая написана просто ужасно:

def ascii_safe(x: int) -> bool:
"""True if all four bytes have high bit clear."""
return all(((x >> (8 * i)) & 0x80) == 0 for i in range(4))

Это явно можно написать одновременно эффективнее и проще для восприятия:

def ascii_safe(x: int) -> bool
return x & 0x80808080 == 0

BY Блог*




Share with your friend now:
tgoop.com/dereference_pointer_there/9919

View MORE
Open in Telegram


Telegram News

Date: |

The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture. More>> Activate up to 20 bots A Hong Kong protester with a petrol bomb. File photo: Dylan Hollingsworth/HKFP. Avoid compound hashtags that consist of several words. If you have a hashtag like #marketingnewsinusa, split it into smaller hashtags: “#marketing, #news, #usa.
from us


Telegram Блог*
FROM American