macOS File Extension & URL scheme app handlers

Support HackTricks

Hifadhidata ya Huduma za Uzinduzi

Hii ni hifadhidata ya programu zote zilizosakinishwa kwenye macOS ambayo inaweza kuulizwa ili kupata habari kuhusu kila programu iliyosakinishwa kama vile mifumo ya URL inayounga mkono na aina za MIME.

Inawezekana kudondosha hifadhidata hii na:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump

Au kutumia zana lsdtrip.

/usr/libexec/lsd ndio ubongo wa database. Inatoa huduma kadhaa za XPC kama .lsd.installation, .lsd.open, .lsd.openurl, na zingine. Lakini pia inahitaji baadhi ya entitlements kwa maombi ili kuweza kutumia XPC functionalities zilizofunuliwa, kama .launchservices.changedefaulthandler au .launchservices.changeurlschemehandler kubadilisha programu za default kwa mime types au url schemes na zingine.

/System/Library/CoreServices/launchservicesd inadai huduma com.apple.coreservices.launchservicesd na inaweza kuulizwa kupata habari kuhusu maombi yanayoendeshwa. Inaweza kuulizwa kwa zana ya mfumo /usr/bin/lsappinfo au na lsdtrip.

Programu za Kukabiliana na Upanuzi wa Faili & URL scheme

Mstari ufuatao unaweza kuwa na manufaa kwa kupata programu ambazo zinaweza kufungua faili kulingana na upanuzi:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -E "path:|bindings:|name:"

Au tumia kitu kama SwiftDefaultApps:

./swda getSchemes #Get all the available schemes
./swda getApps #Get all the apps declared
./swda getUTIs #Get all the UTIs
./swda getHandler --URL ftp #Get ftp handler

Unaweza pia kuangalia nyongeza zinazoungwa mkono na programu kwa kufanya:

cd /Applications/Safari.app/Contents
grep -A3 CFBundleTypeExtensions Info.plist  | grep string
<string>css</string>
<string>pdf</string>
<string>webarchive</string>
<string>webbookmark</string>
<string>webhistory</string>
<string>webloc</string>
<string>download</string>
<string>safariextz</string>
<string>gif</string>
<string>html</string>
<string>htm</string>
<string>js</string>
<string>jpg</string>
<string>jpeg</string>
<string>jp2</string>
<string>txt</string>
<string>text</string>
<string>png</string>
<string>tiff</string>
<string>tif</string>
<string>url</string>
<string>ico</string>
<string>xhtml</string>
<string>xht</string>
<string>xml</string>
<string>xbl</string>
<string>svg</string>
Support HackTricks

Last updated