Linux 软件免费装
Banner图

Init Content Protector – Anti-Copy, Anti-Scrape, Encrypt-All

开发者 brokensmile.2103
更新时间 2026年11月25日 22:49
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPLv2 or later
版权网址: 版权信息

标签

content protection copy protection encryption anti-copy anti-scraping

下载

1.4 1.5 1.0 1.2 1.3 1.3.1 1.11 1.8 1.1 1.6 1.7 1.9 1.10

详情介绍:

Init Content Protector is a powerful yet lightweight plugin that safeguards your post content from unauthorized copying, scraping tools, and inspection via browser developer tools. This plugin is part of the Init Plugin Suite — a collection of minimalist, fast, and developer-focused tools for WordPress. GitHub repository: https://github.com/brokensmile2103/init-content-protector Features:

安装:

  1. Upload the plugin files to the /wp-content/plugins/init-content-protector directory, or install via the WordPress plugin screen.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to Settings → Init Content Protector and configure your preferred options.

屏幕截图:

  • **Advanced Browser Protection (Experimental)** – Advanced DevTools blocking, anti-screenshot protection (Init AntiSnap), noise injection and its rate, and sensitive keywords to obscure.
  • **Global Exceptions** – User roles excluded from every protection layer, and important notes on using the plugin.

常见问题:

Will this affect SEO?

If you enable full content encryption, search engines that do not run JavaScript will not be able to see the content, and even those that do (such as Google) may not index it reliably. Only use this option if SEO visibility is not required, and test your pages (for example with the URL Inspection tool in Google Search Console) before deploying.

Does this plugin support custom post types?

Yes. You can choose which post types are protected in the settings page.

Can I protect only some posts instead of every post of a post type?

Yes. Since 1.10, set Protection Scope to Only posts where protection is turned on. Nothing is protected until you switch a post on: tick Protect this post in the Content Protection box of the post editor (classic and block editor), or select several posts on the post list and use the Turn content protection on bulk action. A lock column on the post list shows which posts are protected. Only the post types chosen under Apply Protection to Post Types get the box. In this mode every layer follows the switch: encryption, noise and keyword cloaking apply to switched-on posts only, and JavaScript Content Protection, Advanced DevTools Blocking and Anti-Screenshot Protection only load on those posts instead of on every page of the site. The switches are kept when you change the scope back, so you can move between both modes freely. Developers can decide per post with the init_plugin_suite_content_protector_is_protected_post filter.

Can I use my own encryption key?

Yes. You can set a custom key per site for added security.

What's the difference between "Inline" and "Enhanced" key delivery?

Inline embeds the decryption key directly in page HTML — simple and works everywhere, but readable via view-source. Enhanced fetches the key from a REST API endpoint after page load instead, keeping it out of cached/static HTML and working cleanly with full-page cache plugins. Neither mode makes content truly secret from a visitor running the page's own JavaScript — both are meant to raise the bar for casual scrapers, not stop a determined human.

Is the "Enhanced" REST API endpoint rate-limited?

No, intentionally. Rate-limiting by visitor IP would mean storing one database row per unique IP with no automatic cleanup — on a busy or bot-scanned site that bloats the database worse than the scraping it aims to prevent. If you need rate limiting, apply it at your server, CDN, or WAF layer.

Does this work with AMP?

The plugin automatically detects AMP endpoints and skips all protection there (JS injection, encryption, noise), since AMP doesn't allow the custom scripts these features rely on.

Can I control how much noise is injected?

Yes, via the "Noise Injection Rate" setting (1–50% per word, default 7%). Noise is only ever inserted into plain text — never inside HTML tags or inside elements like <script>, <style>, <select>, or <svg> — so it can't corrupt markup.

How does noise injection work since 1.10?

Up to 1.9 every site used the same fixed list of noise class names, so a scraper could remove the noise once with that public list. Since 1.10:

  • Each protected post gets its own generated class names, which look like ordinary theme classes and change every day. They are derived from your site's secret keys, so they cannot be predicted.
  • The rules that hide them are printed inline in the page itself, written in mixed selector forms and shuffled together with harmless rules.
  • Some real words are wrapped in visible look-alike elements with the same kind of class names, and noise elements carry those classes too. Removing every element with an unknown class removes real text as well; the only way to tell noise from text is to evaluate the page's CSS.
Readers see exactly the same text as before. Developers can change how long class names stay the same with the init_plugin_suite_content_protector_noise_rotation filter (seconds, default one day, 0 = new names on every request; a fixed period keeps page caches and CSS optimizers stable).

Why does the post excerpt or meta description show the real text?

WordPress builds automatic excerpts by running the post content through the same filter that applies protection, and SEO plugins use that excerpt (or run the content inside <head>) for the meta description and social cards. Up to 1.9 those got the "Please enable JavaScript" notice in Encrypt mode, or the hidden noise words and missing keywords. Since 1.10 protection is only applied to the article body itself. To protect those calls too, return false from the init_plugin_suite_content_protector_skip_secondary_content filter.

What's the difference between "Enable JavaScript Content Protection" and the new "Advanced DevTools Blocking" / "Anti-Screenshot Protection" options?

"Enable JavaScript Content Protection" is the plugin's original, lightweight protection: it blocks common keyboard shortcuts, right-click, text selection, and printing. "Advanced DevTools Blocking" adds a dedicated third-party detection library (disable-devtool) that recognizes DevTools being opened through several different methods beyond keyboard shortcuts, and reacts by closing or redirecting the tab. "Anti-Screenshot Protection" (Init AntiSnap) is a separate heuristic that watches for scroll-jump and layout-shift patterns typical of automated screenshot/scraping tools and briefly blurs the page instead. All three are independent — enable any combination that fits your site.

Will Advanced DevTools Blocking or Anti-Screenshot Protection ever affect real visitors?

They're designed not to, but both are heuristic and best-effort like every other protection layer in this plugin. Advanced DevTools Blocking only reacts when it detects an open DevTools panel; Anti-Screenshot Protection only reacts to repeated, evenly spaced scroll steps made without any real input from the visitor, or DevTools-style viewport changes, and its blur effect clears itself automatically after a few seconds or as soon as the tab regains focus. Neither is enabled by default.

What does Headless Browser Detection do, and when should I use it?

It's aimed at automated scraping tools built on Puppeteer, Playwright, or Selenium — the kind that run a real browser engine and read the DOM after your page renders, which the plugin's other protections (encryption, noise, keyword cloaking) can't stop on their own once the page is decrypted for them too. When enabled, it scores several client-side automation signals together (no single signal decides on its own) and, if the session looks automated, simply never triggers decryption — the content stays on its loading skeleton instead of appearing in the DOM. It only takes effect when Content Protection Mode is set to Encrypt, and it's off by default. Like every automation signal, well-configured "stealth" tooling can evade individual checks — this raises the cost of scraping, it doesn't guarantee blocking it.

Does it also protect the WordPress REST API and the feeds?

Yes, since 1.11. The same goes for the listings (home page, archives, search results) when your theme prints the full content there; they are protected like a single post. Theme excerpts and SEO descriptions are left as they are on purpose (a short teaser, used by search engines and social cards; the init_plugin_suite_content_protector_skip_secondary_content filter changes that). Not covered: AMP pages (AMP does not allow the scripts this plugin needs, so the protection is switched off there), and endpoints that other plugins register themselves. With Encrypt Content or Lazy Load on, every REST endpoint that renders post content (/wp-json/wp/v2/posts, pages, custom post types, revisions and autosaves) returns a short message instead of content.rendered, and instead of an automatic excerpt (a manual excerpt is left as is). Users who can edit the post and the excluded roles still get the real content, and password-protected posts are not changed. Apps, headless front ends and plugins that read the article through the REST API will get the message; use the init_plugin_suite_content_protector_rest_hide_content filter to let a request through, and init_plugin_suite_content_protector_rest_content_message to change the text. The RSS/Atom feeds follow the same rule, and their excerpt (description) is replaced as well, a manual excerpt included.

What is Lazy Load mode, and how is it different from Encrypt?

Lazy Load (new in 1.11) is the lighter way to keep your article out of the page. The HTML is sent with a loading skeleton only. After the page has loaded, a script verifies the browser and fetches the article through the REST API, then puts it in place. Nothing is encrypted, so there is no decryption key and no Web Crypto or CryptoJS involved, and the page itself is the same for every visitor, so it caches well. It stops anything that only reads the HTML, such as wget, curl or a basic scraper, and crawlers that do not run JavaScript. If the check fails (a network error, for example) the visitor sees a message with a Retry button instead of an endless skeleton. Keyword cloaking and noise injection still apply: their CSS is delivered together with the content, so it always matches. Like Encrypt mode it hides the content from search engines that do not run JavaScript; see the SEO question above, and test with Search Console. Scripts inside the article are not executed (as in Encrypt mode). Plugins that need the real text can listen for the init-content-decrypted event, which Lazy Load fires too (event.detail.mode is lazy).

What does "verified" mean in Lazy Load mode?

Before the article is sent, the request must pass these checks: it comes from a page of your site (the page's REST nonce, or the browser's Sec-Fetch-Site: same-origin header, which is also what makes pages served from a full-page cache work after the nonce has expired, or a search engine crawler confirmed by reverse DNS); the Headless Browser Detection option, if enabled, did not flag the session; and the browser holds a short-lived token that was issued at least a second earlier. The token is signed with your site's secret keys, bound to one post and valid for 5 minutes, so nothing is stored in your database. This is a deterrent, not a captcha: a script written specifically against your site can still do the same steps. Like the rest of the plugin it raises the cost of scraping and cannot stop a determined visitor. The route is not rate-limited by the plugin, for the same reason as the Enhanced key route.

Can I reuse the verification module in my own code?

Yes. In the browser, window.InitContentVerify offers request( path, options ) (a same-site REST call that sends the nonce and retries once without it when the nonce has expired in a cached page), getToken( postId ), gate() (the Headless Browser Detection result), showNotice( element, kind, onRetry ) (the message with the Retry button), render( element, html, css ) and more. Enhanced key delivery and Lazy Load both use it. In PHP, init_plugin_suite_content_protector_verify_issue_token( $scope, $subject ) and init_plugin_suite_content_protector_verify_check_token( $token, $scope, $subject ) issue and check the signed tokens, and init_plugin_suite_content_protector_verify_request( $request, $settings ) runs the same-site check on a REST request. Developers can change the minimum wait and the lifetime of a token with the init_plugin_suite_content_protector_verify_min_age (default 1 second) and init_plugin_suite_content_protector_verify_ttl (default 300 seconds) filters.

Does Encrypt mode still need CryptoJS?

Not on HTTPS sites. Since 1.7 decryption uses the browser's built-in Web Crypto API, which is much faster and adds no extra download. The bundled CryptoJS file (about 60 KB) is only loaded on sites not served over HTTPS (where browsers disable Web Crypto), or on demand in the rare browser without Web Crypto support. Developers can force it either way with the init_plugin_suite_content_protector_load_cryptojs filter.

Does Headless Browser Detection block Googlebot?

It did before 1.9: Googlebot renders pages with a headless Chromium, so it can score as automation and was then only shown the loading skeleton. Since 1.9 the option Allow Verified Search Engine Crawlers (on by default) lets real search engine crawlers through. A session that looks like automation first asks your server whether the request comes from a verified crawler. The server only answers yes after a reverse DNS lookup of the request IP lands on the operator's domain (for example googlebot.com or search.msn.com) and a forward lookup of that name returns the same IP, the method Google and Bing document. The User-Agent alone is never trusted, so scrapers pretending to be Googlebot are still blocked. Supported: Google, Bing, Apple, Yandex and Baidu. Things to check if a crawler is still blocked:

  • The plugin must see the real visitor IP, not the address of your CDN or proxy. Under Visitor IP Detection the default, Automatic, reads CF-Connecting-IP only when the connection really comes from Cloudflare's published IP ranges, and X-Forwarded-For / X-Real-IP only when it comes from a proxy or load balancer on a private network, so a visitor cannot forge it. The line IP address the plugin sees for you shows what is detected and should be your own public IP. If it shows a CDN or proxy address instead, pick the matching option (Cloudflare, or a proxy header such as X-Forwarded-For). The proxy header options trust that header completely: only use one when your server accepts traffic from that proxy alone.
  • The REST route /wp-json/init-content-protector/v1/crawler must be reachable for crawlers: not blocked in robots.txt, and not restricted to logged-in users by a security plugin. If the check cannot be completed, decryption stays withheld.
  • Verification needs DNS lookups on your server. They only run when the User-Agent claims to be a known crawler, and a verified IP is remembered for a day.
Developers can adjust it with the init_plugin_suite_content_protector_verified_crawlers (crawlers and their reverse DNS domains), init_plugin_suite_content_protector_pre_crawler_dns_check (for example to compare against published IP ranges) and init_plugin_suite_content_protector_is_verified_crawler filters. Verification only matters when Headless Browser Detection is enabled in Encrypt mode.

Does the loading skeleton support dark mode?

Yes, since 1.10. Under Loading Skeleton Color Scheme choose Light (default), Dark, or Automatic, which follows the visitor's system light/dark setting (only choose it if your theme does the same). The scheme also applies to the "enable JavaScript" notice. If your theme has its own dark mode switch, every color is a CSS custom property you can set on the .icp-protected wrapper, for example: html.dark .icp-protected { --icp-skeleton-bg: #2b2f36; --icp-skeleton-shine: rgba(255, 255, 255, 0.06); } Available properties: --icp-skeleton-bg, --icp-skeleton-shine, --icp-skeleton-radius, --icp-skeleton-height, --icp-skeleton-gap, --icp-noscript-bg, --icp-noscript-border, --icp-noscript-color. Your rules always win over the built-in schemes. Developers can also pick the scheme per request or per post in PHP with the init_plugin_suite_content_protector_skeleton_scheme filter (return light, dark or auto), for example from the theme's dark mode cookie: add_filter( 'init_plugin_suite_content_protector_skeleton_scheme', function ( $scheme ) { return ( isset( $_COOKIE['theme_mode'] ) && 'dark' === $_COOKIE['theme_mode'] ) ? 'dark' : $scheme; } ); Note: when the page is served from a full-page cache, a scheme picked per visitor in PHP is cached too; the CSS approach works with any cache.

Is there a JavaScript event for when encrypted content has been decrypted?

Yes. In Encrypt mode the article first shows a loading skeleton, so scripts that scan the page on load (search term highlighting, table of contents, reading progress, lightboxes) run before the real text exists. After a block has been successfully decrypted and inserted into the page, the plugin fires an init-content-decrypted event. It works the same for Inline and Enhanced (REST API) key delivery, and it is never fired when decryption fails or is withheld (for example by Headless Browser Detection). The event is dispatched on the element that now holds the content and bubbles, so you can listen on document or window. event.detail.element is the element holding the decrypted content and event.detail.postId is the post ID. It fires once per protected block, so register your listener early (when your script loads) rather than after the page has finished. document.addEventListener( 'init-content-decrypted', function ( event ) { var container = event.detail.element; // Re-run your feature on container here. } ); For example, the Highlight Search Terms plugin can be told to run again on this event with its own hlst_events filter: add_filter( 'hlst_events', function ( $events ) { $events[] = 'init-content-decrypted'; return $events; } ); There is also an earlier init-content-payload-ready event (on window) that fires when the encrypted payload has been found, before decryption.

My theme or reader app scrolls the page by itself. Will Anti-Screenshot Protection react?

Init AntiSnap 6.0 only reacts to repeated, equally sized scroll steps made by script while the visitor is not touching the page. If your own code does that (an automatic page-turn feature, for example), call InitAntiSnap.trust(ms) before scrolling, or InitAntiSnap.pause() / InitAntiSnap.resume() around it.

更新日志:

1.11 – November 25, 2026 1.10 – November 20, 2026 1.9 – November 18, 2026 1.8 – November 17, 2026 1.7 – September 26, 2026 1.6 – August 28, 2026 1.5 – August 28, 2026 1.4 – July 20, 2026 1.3 – November 15, 2025 1.2 – November 14, 2025 1.1 – August 16, 2025 1.0 – July 23, 2025