Что-то вы гоните насчет "привычного вида формата 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
🪂Don’t miss this, If you’re holding Ethereum
✅Final Phases of the Berachain Airdrop
🟠Berachain project has been in testnet for a year and is fundamentally a Layer 1 blockchain based on the EVM (similar to Polygon).
💰 raised $140 million from Tier 1 VCs to date.
🗓 Token to launch in Q1 2025, possibly in April 2025.
➡️🔝How to start:
🟢Step 1: Visit the following link:
🔗https://app.stakestone.io/u/vault/detail/bera
🟢Step 2: Connect your wallet and
💥 use this code for a 10% bonus:
69A92
🟢Step 3: If you have extra ETH, take advantage of this opportunity by adding liquidity on the StakeStone platform to maximize your chances of earning two airdrops:
- Berachain Airdrop
- StakeStone Airdrop
🟢Step 4: Deposit ETH, STONE, or WETH to receive beraSTONE tokens.
🔜 ETH withdrawals will be enabled soon, but when you deposit, you’ll receive equivalent beraSTONE tokens, which you can sell anytime on Uniswap to get your ETH back.
⬆️ Holding beraSTONE earns you project-related points for Dolomite_io and KodiakFi.
🪂Official rewards announced so far:
- $STO token rewards
- Berachain rewards via Boyco (a large portion of Bera tokens are allocated to Boyco, which means Berachain airdrop potential).
- Rewards from two projects: KodiakFi and Dolomite_io.
- Additional rewards to be announced.
#Berachain
🤝 Partnership: BearCage X Pirate Frenzy
Thrilled to announce our new partner, BeraCage, the first
Berachain Super Wallet on Telegram! They let users explore the #Berachain Testnet and discover the entire ecosystem right on Telegram.
Users can especially accumulate $BECA tokens by playing the Bear Hunting game, referring friends to BearCage, and much more. The more actions you complete, the greater your chances of earning $BECA and the Berachain token airdrop! 🪂
🐻 Join BearCage's Telegram Mini App now: https://t.me/bearcagebot/bearcage?startapp=nQcep_IflnIi
👉 For more details:https://x.com/PirateClash_HQ/status/1842162175894569068
- - -
Website | Twitter | TG Channel | TG Community | Discord
• Pirate Frenzy (Play-To-Airdrop Mini App on Telegram)
• Pirate Clash (Extension directly playable on Twitter)
Check Your $BERA On TokenPocket! 🐻⛓
Berachain Airdrop Checker is now live on TokenPocket’s Airdrop Zone, allowing you to verify your eligibility with just one click! 🎁🚀
📱https://tokenpocket.pro/en/download/app
💻https://tokenpocket.pro/en/dappstore?category_id=99998&category=Trend
#BERA#Berachain
🐻⛓ Q5! Berachain is now live on TokenPocket.
Berachain is a high-performance EVM-compatible blockchain built on Proof-of-Liquidity consensus.
💙How to create/import a Bera wallet on #TokenPocket?
Guide👉https://help.tokenpocket.pro/en/wallet-operation/how-to-create-a-wallet/berachain
🎈Discover the #BERA Ecosystem with Your TokenPocket! #Berachain
📱https://tokenpocket.pro
💻https://extension.tokenpocket.pro
🐻⛓We now support users to add #Berachain Testnet “Artio” To their TokenPocket Wallet!
The Berachain is an EVM-equivalent L1 built on the Cosmos SDK and powered by Proof of Liquidity.
From now on, you can easily create&import&sync your wallet on berachain on TokenPocket Wallet!
👉https://tokenpocket.pro
#berachain_testnet
Berachain's Infrared Raises $14 Million
Berachain's liquid staking protocol, Infrared, successfully raised $14 million in a Series A token round. The funding aims to support its DeFi initiatives. Read more here: The Block
#DeFi#Berachain#Infrared#Crypto#Investments#Funding#VC
🚨 BREAKING: $117M in assets stolen from @Balancer in the last 2 hours after a major hack!!!
🔹 Assets stolen are across multiple chains: #Ethereum, #Base, #Optimism, #Sonic, #Polygon, #Berachain – mainly in Liquid Staking Tokens (LSTs) of $ETH.
Top 5 stolen assets:
• 7,838 $WETH (~$29.1M)
• 6,841 $OSETH (~$26.8M)
• 4,459 $WSTETH (~$20.1M)
• 2,405 $SFRXETH (~$10M)
• 2,038 $RSETH (~$8.67M)
🔹 The hacker is acting quickly: Converting LSTs into $ETH in real-time!
🔹 Big move: Whale account 0x009, dormant for 3 YEARS, just resurfaced after the exploit and withdrew $7.38M worth of assets from #Balancer!
⚠️ ALERT: If you’re still on #Balancer, secure your funds NOW before it’s too late! 🔐
Follow @spotonchain for more updates about the hack!
https://x.com/spotonchain/status/1985289043383300351
Utah Legislation on Bitcoin Investment Passes
🚀 The Utah House has passed legislation allowing state investment in Bitcoin, moving it to the Senate for further evaluation.
🔗 Read more about the implications of this bill here.
💸 Stablecoin donation company Coala Pay successfully closed a $3.5 million funding round.
🏦 Fed’s Christopher Waller supports stablecoins as vital for USD's reserve currency status.
✨ SEC is reviewing a Solana-ETF application from Grayscale.
📈 Developers of Berachain have launched their mainnet and conducted an airdrop.
🔒 Japan urges Apple and Google to block five crypto exchanges.
#Bitcoin#Stablecoin#CoalaPay#Fed#Stablecoins#SEC#Solana#Grayscale#Berachain#Japan#Crypto#Investment#Legislation#VC#News#USA#Fintech#CryptoExchange#DeFi#Funding#Innovation
Berachain Launches BERA Tokenomics Today
🐻 Berachain introduced BERA tokenomics with a total supply of 500 million tokens.
🐻 Distribution: 48% allocated to the community, including 15.8% for airdrop, 13.1% for future initiatives, and 20% for ecosystem development.
🐻 Eligible for airdrop: early testnet participants, NFT holders, liquidity providers, and Binance HODLers.
🐻 Mainnet launch coincides with the Token Generation Event (TGE) on February 6. More details can be found in ForkLog's article.
#Berachain#Tokenomics#Crypto#Airdrop#NFT#Blockchain#Mainnet#TGE#Community#LiquidityProviders#ETH#Bitcoin#ETF#Finance#Investment#DigitalEconomy#DAO#Kraken#Thailand#DEX