
तेज़ और सटीक AI-संचालित फ़ाइल सामग्री प्रकारों का पता लगाना
Magika एक नवीन AI-संचालित फ़ाइल प्रकार पहचान उपकरण है जो सटीक पहचान प्रदान करने के लिए डीप लर्निंग के हालिया प्रगति पर निर्भर करता है। अंदर की बात करें तो, Magika एक कस्टम, अत्यधिक अनुकूलित मॉडल का उपयोग करता है जिसका वजन केवल कुछ MB के आसपास होता है, और यह एकल CPU पर भी मिलीसेकंड के भीतर सटीक फ़ाइल पहचान को सक्षम करता है। Magika को ~100M नमूनों के डेटासेट पर 200+ सामग्री प्रकारों (बाइनरी और टेक्स्टुअल दोनों फ़ाइल प्रारूपों को कवर करते हुए) में प्रशिक्षित और मूल्यांकन किया गया है, और यह हमारे परीक्षण सेट पर औसत ~99% सटीकता प्राप्त करता है।
यहाँ Magika कमांड लाइन आउटपुट का एक उदाहरण दिया गया है:
Magika का उपयोग बड़े पैमाने पर Google उपयोगकर्ताओं की सुरक्षा में सुधार करने में मदद करने के लिए किया जाता है, Gmail, Drive, और Safe Browsing फ़ाइलों को उचित सुरक्षा और सामग्री नीति स्कैनर तक रूट करके, साप्ताहिक आधार पर सैकड़ों अरबों नमूनों को संसाधित करता है। Magika को VirusTotal (उदाहरण) और abuse.ch (उदाहरण) के साथ भी एकीकृत किया गया है।
अधिक संदर्भ के लिए आप Google के OSS ब्लॉग पर हमारी प्रारंभिक घोषणा पोस्ट पढ़ सकते हैं, आप Magika की वेबसाइट देख सकते हैं, और आप हमारे शोध पत्र में अधिक पढ़ सकते हैं, जो IEEE/ACM International Conference on Software Engineering (ICSE) 2025 में प्रकाशित हुआ है।
आप कुछ भी इंस्टॉल किए बिना हमारे वेब डेमो का उपयोग करके Magika आज़मा सकते हैं, जो आपके ब्राउज़र में स्थानीय रूप से चलता है!
-r का भी उपयोग कर सकते हैं।high-confidence, medium-confidence, और best-guess।Magika Rust में लिखा गया CLI प्रदान करता है, और इसे कई तरीकों से स्थापित किया जा सकता है।
magika python पैकेज के माध्यम से:
pipx install magika
brew के माध्यम से (macOS / Linux)
brew install magika
इंस्टॉलर स्क्रिप्ट के माध्यम से:
curl -LsSf https://securityresearch.google/magika/install.sh | sh
या:
powershell -ExecutionPolicy Bypass -c "irm https://securityresearch.google/magika/install.ps1 | iex"
magika-cli Rust पैकेज के माध्यम से:
cargo install --locked magika-cli
pip install magika
npm install magika
यहाँ आपको आरंभ करने के लिए कुछ त्वरित उदाहरण मिलेंगे।
Magika के आंतरिक कार्यों के बारे में जानने के लिए, Magika की वेबसाइट का Core Concepts अनुभाग देखें।
% cd tests_data/basic && magika -r * | head
asm/code.asm: Assembly (code)
batch/simple.bat: DOS batch file (code)
c/code.c: C source (code)
css/code.css: CSS source (code)
csv/magika_test.csv: CSV document (code)
dockerfile/Dockerfile: Dockerfile (code)
docx/doc.docx: Microsoft Word 2007+ document (document)
docx/magika_test.docx: Microsoft Word 2007+ document (document)
eml/sample.eml: RFC 822 mail (text)
empty/empty_file: Empty file (inode)
% magika ./tests_data/basic/python/code.py --json
[
{
"path": "./tests_data/basic/python/code.py",
"result": {
"status": "ok",
"value": {
"dl": {
"description": "Python source",
"extensions": [
"py",
"pyi"
],
"group": "code",
"is_text": true,
"label": "python",
"mime_type": "text/x-python"
},
"output": {
"description": "Python source",
"extensions": [
"py",
"pyi"
],
"group": "code",
"is_text": true,
"label": "python",
"mime_type": "text/x-python"
},
"score": 0.996999979019165
}
}
}
]
% cat tests_data/basic/ini/doc.ini | magika -
-: INI configuration file (text)
% magika --help
Determines file content types using AI
Usage: magika [OPTIONS] [PATH]...
Arguments:
[PATH]...
List of paths to the files to analyze.
Use a dash (-) to read from standard input (can only be used once).
Options:
-r, --recursive
Identifies files within directories instead of identifying the directory itself
--no-dereference
Identifies symbolic links as is instead of identifying their content by following them
--colors
Prints with colors regardless of terminal support
--no-colors
Prints without colors regardless of terminal support
-s, --output-score
Prints the prediction score in addition to the content type