{"id":5161,"date":"2021-12-04T12:40:52","date_gmt":"2021-12-04T04:40:52","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=5161"},"modified":"2021-12-04T12:40:52","modified_gmt":"2021-12-04T04:40:52","slug":"tips%e5%a6%82%e4%bd%95%e7%9f%a5%e9%81%93%e7%94%b5%e8%84%91%e4%b8%8a%e7%9a%84%e5%93%aa%e4%b8%aa%e6%96%87%e4%bb%b6%e6%98%af%e4%bb%8e%e5%93%aa%e6%9d%a5%e7%9a%84","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/5161.html","title":{"rendered":"[tips]\u5982\u4f55\u77e5\u9053\u7535\u8111\u4e0a\u7684\u54ea\u4e2a\u6587\u4ef6\u662f\u4ece\u54ea\u6765\u7684"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u524d\u6bb5\u65f6\u95f4\u5728\u505aDLP\u9700\u6c42\u6574\u7406\u7684\u65f6\u5019\u60f3\u5230\u7684\u4e00\u4e2a\u95ee\u9898\uff0c\u5728\u6b64\u8bb0\u5f55\u4e00\u4e0b\uff0c\u65b9\u4fbf\u4ee5\u540e\u53c2\u8003\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<p>\u56e0\u4e3a\u6211\u7684\u529e\u516c\u73af\u5883\u4eceWindows\u5207\u6362\u5230macOS\u5f88\u4e45\u4e86\uff0c\u624b\u8fb9\u4e0a\u4e5f\u6ca1\u6709\u5408\u9002\u7684Windows\u7cfb\u7edf\u73af\u5883\u505a\u5bf9\u6bd4\u6d4b\u8bd5\uff0c\u6240\u4ee5\u5728macOS\u4e0a\u5bf9\u591a\u4e2a\u6587\u4ef6\u8fdb\u884c\u62bd\u6837\u6d4b\u8bd5\u9a8c\u8bc1\u6210\u529f\u4e4b\u540e\uff0c\u4ee5\u4e3a\u662fOffice\u7c7b\u6587\u4ef6\u9ed8\u8ba4\u90fd\u6709\u7684meta\u5c5e\u6027\uff0c\u4f46\u7ecf\u8fc7\u6df1\u5165\u4e00\u70b9\u7684\u641c\u7d22\u7814\u7a76\u4e4b\u540e\u624d\u53d1\u73b0\u8fd9\u662fmacOS\u4e0a\u72ec\u6709\u7684\uff08\u4e0d\u5c40\u9650\u4e8eOffice\u7c7b\u6587\u4ef6\uff09\uff0c\u53ef\u4ee5\u5bf9\u5206\u6790\u548c\u6eaf\u6e90\u63d0\u4f9b\u5f88\u5927\u7684\u5e2e\u52a9\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90-1024x375.png\" alt=\"\" class=\"wp-image-5162\" srcset=\"https:\/\/ixyzero.com\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90-1024x375.png 1024w, https:\/\/ixyzero.com\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90-300x110.png 300w, https:\/\/ixyzero.com\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90-768x281.png 768w, https:\/\/ixyzero.com\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90-1536x562.png 1536w, https:\/\/ixyzero.com\/wp-content\/uploads\/2021\/12\/\u66f4\u591a\u4fe1\u606f-\u6765\u6e90.png 1858w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u6765\u6e90\uff08Where from\uff09<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>kMDItemWhereFroms<\/p>\n\n\n\n<p><strong>Describes where the file was obtained from.<\/strong><\/p>\n\n\n\n<p>For example, a downloaded file may refer to the URL, files received by email may indicate the sender\u2019s email address, message subject, etc.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>\u67e5\u770b\u65b9\u6cd5\u4e00\uff08GUI\u64cd\u4f5c\uff09\uff1a<br><\/strong>\u9009\u4e2d\u6587\u4ef6\uff0c\u7136\u540e\u201c\u9f20\u6807\u53f3\u952e\u201d-\u201c\u663e\u793a\u7b80\u4ecb\u201d\uff0c\u5728\u201c\u66f4\u591a\u4fe1\u606f\u201d\u4e0b\u6709\u201c\u6765\u6e90\u201d\u5b57\u6bb5\u7528\u4e8e\u8868\u793a\u8be5\u6587\u4ef6\u662f\u4ece\u54ea\u91cc\u83b7\u53d6\u7684\u3002<\/p>\n\n\n\n<p><strong>\u67e5\u770b\u65b9\u6cd5\u4e8c\uff08\u547d\u4ee4\u884c\u64cd\u4f5c\uff09\uff1a<\/strong><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">xattr\u547d\u4ee4<\/h1>\n\n\n\n<p><code>xattr path_to_file.docx<br>xattr -p com.apple.quarantine path_to_file.docx<br>xattr -p com.apple.metadata:kMDItemWhereFroms path_to_file.docx<\/code><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">mdls\u547d\u4ee4<\/h1>\n\n\n\n<p><code>mdls -name kMDItemWhereFroms path_to_file.docx<br>mdls path_to_file.docx<\/code><\/p>\n\n\n\n<p>\u67e5\u770b\u65b9\u6cd5\u4e09\uff08\u4ee3\u7801\u64cd\u4f5c\uff0c\u4ee5Python\u4e3e\u4f8b\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ pip install xattr\n\n>>> import xattr\n>>> xattr.listxattr('\/path\/to\/download_from_internet.docx')\n(u'com.apple.metadata:kMDItemWhereFroms', u'com.apple.quarantine')\n>>>\n>>> xattr.getxattr('\/path\/to\/download_from_internet.docx','com.apple.metadata:kMDItemWhereFroms')<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<p>How can Mac OS X save details about the URL from which a file has been downloaded?<br><a href=\"https:\/\/superuser.com\/questions\/214934\/how-can-mac-os-x-save-details-about-the-url-from-which-a-file-has-been-downloade\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/superuser.com\/questions\/214934\/how-can-mac-os-x-save-details-about-the-url-from-which-a-file-has-been-downloade<\/a><\/p>\n\n\n\n<p>kMDItemWhereFroms<br><a href=\"https:\/\/developer.apple.com\/documentation\/coreservices\/kmditemwherefroms\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.apple.com\/documentation\/coreservices\/kmditemwherefroms<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Extended_file_attributes#OS_X\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/en.wikipedia.org\/wiki\/Extended_file_attributes#OS_X<\/a><\/p>\n\n\n\n<p>Editing or deleting file metadata in OS X<br><a href=\"https:\/\/tinyapps.org\/blog\/201011300700_os_x_edit_metadata.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/tinyapps.org\/blog\/201011300700_os_x_edit_metadata.html<\/a><\/p>\n\n\n\n<p>Where is the &#8216;Where from&#8217; meta data stored when downloaded via Chrome?<br><a href=\"https:\/\/apple.stackexchange.com\/questions\/110239\/where-is-the-where-from-meta-data-stored-when-downloaded-via-chrome\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/apple.stackexchange.com\/questions\/110239\/where-is-the-where-from-meta-data-stored-when-downloaded-via-chrome<\/a><\/p>\n\n\n\n<p>Read kMDItemWhereFroms attribute with file integrity module<br><a href=\"https:\/\/github.com\/elastic\/beats\/issues\/5336\">https:\/\/github.com\/elastic\/beats\/issues\/5336<\/a><\/p>\n\n\n\n<p>Zone Identifier == kMDItemWhereFroms?<br><a href=\"https:\/\/thinkdfir.com\/2018\/06\/17\/zone-identifier-kmditemwherefroms\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/thinkdfir.com\/2018\/06\/17\/zone-identifier-kmditemwherefroms\/<\/a><\/p>\n\n\n\n<p>File Metadata Attributes Reference<br><a href=\"https:\/\/developer.apple.com\/library\/archive\/documentation\/CoreServices\/Reference\/MetadataAttributesRef\/Reference\/CommonAttrs.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.apple.com\/library\/archive\/documentation\/CoreServices\/Reference\/MetadataAttributesRef\/Reference\/CommonAttrs.html<\/a><\/p>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u524d\u6bb5\u65f6\u95f4\u5728\u505aDLP\u9700\u6c42\u6574\u7406\u7684\u65f6\u5019\u60f3\u5230\u7684\u4e00\u4e2a\u95ee\u9898\uff0c\u5728\u6b64\u8bb0\u5f55\u4e00\u4e0b\uff0c\u65b9\u4fbf\u4ee5\u540e\u53c2\u8003\u3002 \u6b63\u6587\uff1a  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,560,25],"tags":[1768,559,1767,1769,19,1766],"class_list":["post-5161","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-mac","category-security","tag-kmditemwherefroms","tag-mac","tag-mdls","tag-metadata","tag-tips","tag-xattr"],"views":6107,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=5161"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5161\/revisions"}],"predecessor-version":[{"id":5163,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5161\/revisions\/5163"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=5161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=5161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=5161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}