Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳
Действительно, что означают цифры которые мы получили в прошлом посте?
Это кодировка, заключающая в себе режимы доступа к файлу.
Подробней можно почитать в статье про chmod.
Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение.
Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция
>>> stat.filemode(0o755)
'?rwxr-xr-x'
Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров.
А что за знак вопроса в начале?
Давайте передадим в эту функцию необрезанное значение от os.stat
>>> stat.filemode(os.stat(path).st_mode)
'drwxr-xr-x'
Это данные, которые мы безжалостно обрезали в прошлый раз😼
Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l).
Вот простая схема данной кодировки
[1][3][3][3]
│ │ │ │
│ │ │ └──> Others Permissions
│ │ └─────> Group Permissions
│ └────────> Owner Permissions
└───────────> File Type
(разверните экран если вы с телефона)
Если вы попробуете получить пермишены для симлинка то получите пермишены для файла
>>> path = '.venv/bin/python3'
>>> stat.filemode(os.stat(path).st_mode)
'-rwxr-xr-x'
Чтобы получить свойства именно симлинка, нужно это явно указать
>>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode)
'lrwxrwxrwx'
#tricks#basic
#nft#RugPull#архив
Frosties. История обмана…
В 2022 году случилась первая самая громкая афера Rug pulls NFT — это проект Frosties, на котором инвесторы потеряли 1,3 миллиона долларов😮.
Идея была основана на продаже коллекции мультяшных персонажей, похожих на шарики мороженого 🍨. Создатели проекта заманивали инвесторов бесплатными раздачами, обещали ранний доступ и привилегии в игре. Вокруг Frosties разгорелся огромный ажиотаж, поскольку игра в метавселенной и механизм ставок были обещаны как часть будущей дорожной карты.
🔴Распознать аферу было сложно. У проекта был профессиональный сайт, сообщество насчитывало 40 тыс. активных пользователей.
Каждая NFT Frosties стоила в среднем 0,04 ETH и когда были проданы 8 888 «мороженных» NFT, вкладчики обнаружили, что все соцсети, каналы в Discord, сайт и команда — исчезли 😐.
Инвесторы так и не вернули деньги 😔.
@MirraChannel😎
Hackers Target Crypto Figure for Scam
Hackers compromised World Liberty co-founder Zach Vitkoff's X account to promote a fake Trump meme token. Victims were lured by claims of imminent announcements from President Trump. Despite warnings from Vitkoff, the established token BARRON (market cap over $10B) continues to rise, indicating a scam. Another similar project executed a rug pull, draining liquidity. More details here: ForkLog
#Hacking#Crypto#Trump#MemeToken#Scam#BARRON#Liquidity#RugPull#WorldLiberty
Errol Musk's Token Plans to Raise Millions
Errol Musk aims to raise $150-$200 million through the "Musk It" memecoin, leveraging his family name. Proceeds will support the newly established Musk Institute. Recently, the crypto space has faced various rug pulls linked to projects of the same name. 🪙💰Read more here
#Musk#Memecoin#Crypto#ETFs#USDC#Ethereum#DeFi#Blockchain#Investment#Finance#ElonMusk#Bitcoin#WhaleAlert#RugPull#MuskInstitute#CryptoMarket#DigitalAssets#TokenSale#Cryptocurrency#MarketTrends#VC
Argentina's Opposition Eyes Impeachment Over LIBRA
Argentina's opposition is considering impeachment for President Milei after conflicting support for the LIBRA token. This follows a controversial launch that saw rapid investment and then a significant drop in value, leading to accusations of mismanagement and deception. The situation raises questions about political influence in cryptocurrency projects.
Read more: Reuters
#Argentina#LIBRA#Crypto#Impeachment#Milei#Investment#MarketManipulation#EconomicCrisis#Blockchain#DeFi#RugPull#Politics#Cryptocurrency#TokenLaunch#InsiderTrading#Securities#AI#VC
Argentina Investigates LIBRA Token Misconduct
Argentina's President Javier Milei calls for an investigation into LIBRA token's rug pull, requesting the Anti-Corruption Office's involvement to assess potential misconduct by government members. Findings will be forwarded to the court. Opposition considers impeachment due to the incident. Links: Statement, Watch, Details.
#LIBRA#Crypto#Argentina#investigation#rugpull#president#JavierMilei#impeachment#KIPProtocol#AntiCorruption#fundflow#temporalanalysis#MELANIA#ENRON#Solana#ETF#Bitcoin#adoption#blockchain#corruption#misconduct