xaNoCTA – No Click-to-Activate (patch)

Legal considerations around the U.S. Patent No. 5,838,906, currently held by infamous Eolas company for the single purpose of "defending" it, forces Opera to abstain from implementing any measures that could be interpreted as ”invoking external application providing interaction and display of embedded objects“.

Therefore the user of Opera has to take the burden to ”click-to-activate“ a Flash applet in a web page first, before he is able to use it and interact with it.

This ”click-to-activate“-hassle can be removed individually by an Opera-user on his end (and in his own responsibility!) by patching the Opera binary code.

This is first and foremost the result of research done by Rafal aka d.i.z., who was probably the first to distribute an easy to apply patch that was generic in such a way, that you could apply it to various versions (builds) of Opera 9 thru 10. Please read his interesting report on his studies in his blog.

New builds of Opera arrived and the patch stopped working, as the binaries had changed too much. You could introduce new patch patterns into the Rafal's patchscript, but the script got more and more confusing. Thus I re-structured the script to make it easier to introduce new patch patterns into it.

The Patch

You find the more-or-less-carefree all inclusive package, consisting of a patch appliance batch-script for Windows (and 4NT/TakeCommand/TCC), the upx un-/packer and a rudimentary perl binary distribution as helper tools, and a (probably outdated) patchscript as a download here:

→ Yikes! With plugin functionallity included. ☺

    • xa-nocta.zip

The standalone perl patchscript is behind the following link. It is possibly a more recent version than the one embedded in the all inclusive package; you can use this standalone script to update your install of the all inclusive package:

→ WOW! The plain script supports plugins as well!

    • xa-nocta.pl

Installation and Usage

Perhaps you need admin-credentials to perform some or all of the following steps!


  • Option A → post-installation patch of opera.dll in Opera's program folder

    Extract the all inclusive pack into Opera's binary installation folder (ie probably ”%PROGRAMFILES%\opera\“ on Windows systems). The standalone perl script should be placed into that folder as well.

    Now make sure, Opera is not currently running! If it is, though, shut it down and wait long enough for the (sometimes painfully slow) shut down sequence to finish.

    To apply the patch you either double click the xa-nocta.bat batch script in the Explorer or you start it from the console. If you prefer to solely use the perl patch script (and do the eventual unpacking and backing up parts yourself), run something like ”perl xa-nocta.pl opera.dll“ from a console command line.

  • → give it a try! ☺


  • Option B → pre-installation patch of Opera's installer (v11+)

    For Opera 11+ there is another means to apply the patch being tested. Drag and drop the NewInstaller 7Ziped executable onto the batch script called xa-nocta-the_installer.bat or call that script from the command line passing the path to the installer as an argument. The script will extract the opera.dll binary, apply the patch to it and re-implant it to a copy of the installer. All what's left to do is installing Opera using that modified installer (it will carry a suffix _xanocta) – no need to shut down Opera after the forced (installer-induced) start in order to apply the xaNoCTA patch no more. ☺

Notes

Each revision of this package will be published without having been thoroughly tested!
You have been warned!

Applying any patch, including the patches included in this package, may or may not be legal, may or may not work. You do it in your very own responsibility. You won't hold anyone responsible for any mishap or disaster than you very self!

This following copyright and license should apply to the files making up the xa-nocta-package, as far as applicable and as far as not contradicting any other existing rights covering those:

Copyright © by XA, 2010-2012. Licensed under a Creative Commons by-nc-sa 3.0 Unported License.

Works (including, but not limited to, new patch byte patterns) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Derivative. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of the granted license. As far as applicable, the included patch byte patterns shall be considered licensed under a Creative Commons CC0 1.0 Universal license.

Based on work by Rafal / d.i.z and multiple contributors on the MyOpera forums.

Creating plugins

Have a look at the sample plugin xa-nocta-plugin-00-SilentHTTPSUserJS.pl.txt, included in the Zip-Package, to get a clue. 😉 xaNoCTA scans automatically for plugins, finding them stored in the same folder as the main script and matching the filename pattern xa-nocta-plugin-*.pl; that means, you'll have to rename the sample plugins distributed in the all-inclusive-package, changing the double extension .pl.txt into a simple single .pl!

Creating new patch patterns

Besides on this page here, you can find the latest source in a Mercurial repository at Bitbucket.

Look into the xa-nocta.pl patch script. Between lines of ”###…##“ you find the array describing all the implemented possible patches. This is pretty self explanatory. (There is a priority scheme implemented, thus the patches are organized in a two-level-array structure. This is not used up to now.) A patch is resembled by an instruction record like

{
desc => 'Opera 11.00 [1045, 1060]',
assert => undef,
test => qr/\x66\xBA\x2C\x00\xE8(.{4})\xF7\xD8\x1B\xC0\xB0\x01/s,
match => qr/\x66\xBA\x2C\x00\xE8(.{4})\xF7\xD8\x1B\xC0\xF7\xD8/s,
replace => '"\x66\xBA\x2C\x00\xE8$1\xF7\xD8\x1B\xC0\xB0\x01"'
},

Pay attention to the right use of quotes in the replace part!

If your patch applies to an yet unsupported version of Opera – and if it works well, then feel free to post the patch instruction record (like the example above) in the comments to this posting! ☺


Latest Changes

  • 2012-08-10

    • Support 12.01 32bit build 1532, 12.50 32bit builds 1538,1546.
    • Use the /s modifier on RegExps to treat patterns as single line, even if containing some newline char. [Ralf Onat is right, thanks!]
  • 2012-07-27

    • Support 12.00 32bit builds 1439,1440,1441,1445,1448,1450,1454,1456,1465,1467, 12.01 32bit builds 1473,1486,1491,1517,1520,1528, 12.50 32bit builds 1497,1513.
  • 2012-05-30

    • New patch strategy (patched params to subroutine have been swapped) supporting 12.00 32bit builds 1359,1360,1372,1380,1383,1385,1386,1387,1406,1413,1417,1422,1424,1429,1431,1433,1438.
    • Support 12.00 build 1301,1306,1312,1317,1325,1328,1351_32bit.
  • 2012-02-10

    • Support 11.61 build 1250, 11.62 builds 1273,1297, 12.00 builds 1256,1272,1289.
    • Incorporate modification to certain patch pattern to cover 12.00 build 1301 – contributed by BtEO.
  • 2012-01-16

    • Included another sample plugin (contributed by BtEO and Nibiru); it should patch away the host name highlightning in the address bar.
    • Renamed ”Silent UJS HTTPS“ sample plugin file.
    • Support 11.61 builds 1222,1234,1236, 12.00 1232labs.
  • 2011-12-22

    • Support 11.61 build 1222.
    • Relaxed matching for ”Silent UJS HTTPS“ sample plugin.
  • 2011-12-22

    • Embraced contribution by BtEO for a unified patch pattern supporting Opera 12.00 builds 1085,1090,1105,1116,1155,1174,1191,1211,1213], 11.60 builds 1134,1139,1144,1145,1147,1150,1159,1163,1169,1173,1177,1178,1180,1181,1184,1185.
    • Plugin functionality (from pluggable branch) merged into default branch.
  • 2011-10-13

    • Supports 12.00 build 1085,1090;1105.
    • Modified new 1085/1090-patch-strategy to embrace 1105.
  • 2011-10-07

    • New patch strategy introduced to support patching Ragnarök-based 12.00 build.
  • 2011-09-28

    • Supports 11.51 builds 1084,1087, 12.00 builds 1017,1020,1027,1033,1039,1042,1047;1054,1060,1065,1076.
  • 2011-06-21

    • Adapted latest patch pattern to cover build 1052 of Opera 11.50.
    • Support 11.50 builds 1040,1049;1052.
  • 2011-06-10

    • Incorporated new patch strategy for builds of later trait of Opera 11.50.
    • Supports 11.50 builds 1024,1027,1031,1035,1036,1037.
  • 2011-05-27

    • Supports 11.50 builds 1009,1015,1016,1018,1020.
  • 2011-05-18

    • Supports 11.10 builds 2090,2091,2092 final, 11.11 build 2109 final.
  • 2011-04-11

    • Supports 11.10 builds 2005,2014,2018,2020,2025,2033,2039,2040,​2042,2045,2047,2048,2053,2064,2067,2076,​2077,2079,2081,2085,2087.
  • 2011-01-26

    • Supports 11.00 builds 1164,1169,1175,1179,1189,1190.
  • 2011-01-07

    • Supports 11.00 build 1160.
    • Corrected behavior in case no patch matches.
  • 2010-12-17

    • Fixes to xa-nocta-the_installer script.
    • Now includes full working copy of 7Zip in all inclusive pack. But that's a lot of bytes. Maybe it'd be better to instruct potential users to get 7Zip elsewhere.
  • 2010-12-16

    • New auxiliary script allows patching opera.dll virtually in the new Opera 11+ installer prior to the actual installation procedure.
  • 2010-12-14

    • Supports 11.00 build 1104,1111,1128,1133,1136,1140,1145,1149.
  • 2010-11-17

    • Supports 11.00 build 1094. Cosmetic changes and one MS compatibility fix to batch script.
  • 2010-11-15

    • Supports 11.00 build 1085.
  • 2010-11-14

    • Treated MS cmd compatibility issues in wrapper batch script (which is essentially for 4NT/TC).
  • 2010-11-11

    • Supports 11.00 build 1060. Add license info for the tools packaged into the happy-pack.
  • 2010-11-06

    • Supports 11.00 build 1055.
  • 2010-11-05

    • Sorted out oddities in the naming of original, backup and patched files.
  • 2010-11-05

    • Implemented possibility of an assertion guard for each patch class and/or patch method. If defined, the assert pattern has to match before applying a patch is considered.
  • 2010-11-03

    • Initial release covering Opera versions 9.x, 10.x, some 10.50 builds, 11.00 builds 1029 and 1045

150 Replies to “xaNoCTA – No Click-to-Activate (patch)”

  1. Experimental version (based roughly on research by gwarser – thanks!) temporarily available here:

    This is an experimental version and has not been thoroughly tested! The patch actually is not entirely understood.You have been warned!

    »» xa-nocta-EXPERIMENTAL.pl ««

    Feedback kindly requested.

  2. I know where the function is, but I wait for some fancy labels/comments from IDA 😛

  3. Originally posted by XAntares:But this happens to me here on moving mouse and hovering over grey additional names […] in MyOpera blogs, even with Javascript disabled: […]…and I see dots (“……”) behind form buttons and after paragraph breaks.>_ oincidence?The dots and brackets originate from=== http://static.myopera.com/community/css/themes/users-shared.css
    .clearfix:after, .buttons:after, .post:after, #side ul:after {
    content:”.”;
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
    }and=== http://static.myopera.com/community/css/themes/users-style.css
    .userlink span:before {
    content: ‘(‘;
    }
    .userlink span:after {
    content: ‘)’;
    }respectively. The “content:”s shouldn’t be applied multiple times, though.

  4. For now=== Build 1031(!):
    679199B6 8B4424 04 mov eax,[dword ss:arg1]
    679199BA 6A 17 push 17
    679199BC 6A 00 push 0
    679199BE 6A 01 push 1
    679199C0 6A 2C push 2C ; — /! 0x2C vs 0x2D
    679199C2 E8 7895CEFF call Opera_dll.67602F3F
    679199C7 F7D8 neg eax
    679199C9 1BC0 sbb eax,eax
    – 679199CB F7D8 neg eax
    + 679199CB B0 01 mov al,1
    679199D C2 0400 retn 4
    sems to be the better patch opportunity – further understanding of what it’s doing pending. 😉

  5. The relevant function gets called quite often with mouse over Plugin…(And the proposed patch does not produce the CPU Flags as would do a real 1 result – but that does not seem to matter, as far as I see it.)But this happens to me here on moving mouse and hovering over grey additional names (e.g – on menus as well) in MyOpera blogs, even with Javascript disabled: …and I see dots (“……”) behind form buttons and after paragraph breaks.>_ oincidence?By the way: This page can be used for testing purposes »» http://files.myopera.com/XAntares/files/noctatest.html

  6. Is this normal? (relevant function still not analyzed) :ko: :faint:

  7. I’ll also check this. But anyways, thanks so far.In a quick attempt to find a new patch, I got all the way to the procedure, where presumably the plugin window and overlay window are CreateWindowExW’ed, stepping around I found the CTA-overlay’s event loop and MouseUp event – but did not manage to quickly find a working patch there.

  8. CPU DisasmAddress Hex dump Command67916E72 /$ 8B4424 04 MOV EAX,DWORD PTR SS:[ARG.1]67916E76 |. 6A 17 PUSH 1767916E78 |. 6A 00 PUSH 067916E7A |. 6A 01 PUSH 167916E7C |. 6A 2D PUSH 2D67916E7E |. E8 189FCEFF CALL 67600D9B — because of this67916E83 |. F7D8 NEG EAX67916E85 |. 1BC0 SBB EAX,EAX67916E87 |. F7D8 NEG EAX67916E89 . C2 0400 RETN 4

  9. Why do you have .{4} in the middle of it? 18 9F CE FF should be there instead.Anyway, good job, since it seems to work here.Original:005c6274h: 24 04 6A 17 6A 00 6A 01 6A 2D E8 18 9F CE FF F7005c6284h: D8 1B C0 F7 D8 C2 04 00 8B 44 24

  10. 11.50-1035 (32bit windows)Before:6A 17 6A 00 6A 01 6A 2D E8 .{4} F7 D8 1B C0 F7 D8 C2 04 00 After:6A 17 6A 00 6A 01 6A 2D E8 .{4} F7 D8 1B C0 B0 01 C2 04 00Someone should check this.

  11. Right, the previous patterns do not match with the core-updated versions.Someone having investigated new, working patch patterns already? Please contribute here, it will be appreciated by a lot of people. :)I’d try to find the new patch now, if only I had the time… So it will take some time on this end.

  12. Cannot work. Opera 11.50 build 24581 (Tech. Preview)Opera 11.50 build 24661 (WebGL Tech. Preview)Opera Next 11.50 build 1024

  13. The xa-nocta.bat worked for me on Opera 11.11 (2109). International patent law is ridiculous.

  14. Does not seem to work with the first public Ragnarok labs build 11.50.24581.

  15. is there any chance of building “No Click-to-Activate” dll for Opera 10.10?

  16. Originally posted by XAntares:Thanks for the notice – the link works for me, though.Weird. I checked under Opera and Firefox.

  17. Hi, XenoAntares! The patch works. Thank You very match! You’re done! :up:

  18. I tried as you told me (copied to another folder and also tried the same in Win XP SP3) same Opera 10.10 build 1893 and got the report:Unpacked 1 file.* Patching… + Trying to apply class ‘Generic’… + Trying to apply class ‘Generic’ / method ‘Opera 11.00 [1045,1055,1085,1094,1101,1111,1128,1133]’… + Trying to apply class ‘Generic’ / method ‘Opera 11.00 [1029,1060,1136,1140,1145,1152,1156,1160,1164]’… + Trying to apply class ‘Generic’ / method ‘Opera 10.x, 10.50 [..], 11.00 [1149]’… + Trying to apply class ‘Generic’ / method ‘Opera 10.x (early versions’ “Methode 2”)’…- An ERROR occurred!* Restoring original ‘opera.dll’ from backup ‘opera.dll_original’+ … done!* Press any key to exit.

  19. @migawka: The perl script should no longer report success despite the fact, no matching pattern had been found.I can’t tell what happens with Vista. Maybe it’s a UAC / user rights issue? Try to run the patch from a user folder, then: • Copy entire patch package into a subfolder of “My Files”; • copy opera.dll to be patched there, too, perform the patch and copy the patched file back into Opera’s %ProgramFiles% installation folder, – or – • apply new installer-patch-script to an Opera NewInstaller residing in an unrestrictedly writable folder and use the created, modified installer package to install NoCTA patched Opera.

  20. Just tested the latest script from Bitbucket on a v10.10 build1893 DLLGot the same output as migawka, but the file contents did not change.P.S. my working patched DLL differs at offset 44A57C :original – F7 D8patched – B0 01

  21. Can anyone confirm?That the patch claims success after it ran out of methods to try even though actually didn’t succeed may be an error of patch script. I’ll look into that.

  22. Not working with Opera 10.10, Windows Vista 32 bit, despite the result of patch – “Opera patching completed successfully!”* Patching… + Trying to apply class ‘Generic’… + Trying to apply class ‘Generic’ / method ‘Opera 11.00 [1045,1055,1085,1094,1101,1111,1128,1133]’… + Trying to apply class ‘Generic’ / method ‘Opera 11.00 [1029,1060,1136,1140,1145,1152,1156]’… + Trying to apply class ‘Generic’ / method ‘Opera 10.x, 10.50 [..], 11.00 [1149]’… + Trying to apply class ‘Generic’ / method ‘Opera 10.x (early versions’ “Methode 2”)’… * File ‘opera.dll’ successfully written.+ … done!

  23. Maybe someone could write a patch to fix the background sending Opera of personal data, statistics and other information to Google (and elsewhere)?

  24. @Robin Zalek: I’d probably like the result of that patch, but I don’t want the “burden” of maintaining more than one patch (that luckily didn’t change yet beyond fluctuating between three methods).–There is a new script targeting the new_installer and applying the patch at that stage. Don’t know yet if it works under all circumstances (actually wrote it with MS cmd.exe in mind, but testing only under 4NT/TakeCommand shell).You’ll find (the most recent version of) the script in the BitBucket repository if not in the all inclusive pack.

  25. It is a fresh install. From scratch. I deleted all the files related to Opera from my laptop and then from the registry too.Could you please tell me now, step by step, what do I need to do?Thanks a lot for your effort and help!EDIT – Scratch that^^, it worked this time! Thank you!

  26. Again: Works for me.Did you manage to get the console output? What does it say?Did you manually delete opera.dll_original? Did you close Opera (and did you wait long enough) before trying to patch?

  27. Worked great with 10.63 with win98se.Thanks to you both.Now if I can just get Java to work like 10.10

  28. Did you try .bat from the latest .zip, uploaded a few hours ago? It should have a pause executed last to prevent the console from closing too fast.Another way to sneak a peek ‘d be to run the batch file from a console session (something like Start » Run… » cmd.exe ↲ — cd %ProgramFiles%opera ↲ — xa-nocta ↲).

  29. Hi XenoAntares, I tried using the .zip file. The command prompt comes up and goes out within a second when I try to patch. I can’t read what the problems is. 🙁

  30. It’s not working with the latest version of Opera 11.00. 🙁

  31. It’s working for me, though.Maybe you have to delete an old backup (ie opera.dll_original) first?

  32. Originally posted by GLaF:You include perl 5.10 […]. Why not include new patched perl 5.12?
    You can always use a flavor of perl of your own liking. 😉

    Packaged with (ActiveState) Perl 5.12.2_1202_x86 the download size grows by 350 kB against the package including of Perl 5.10.0_1001_x86 – maybe I consider including it, anyway.

    But first, I’ll upload the all inclusive package to ship with latest (Active)Perl 5.10.1_1007_x86 next.

  33. Originally posted by rseiler:how did the 11-11 build not support 1085?
    It did. It’s just an updated description string. You can always refer to the diffs in the bitbucket repository to see the changes.

    The backup is not overwritten, because this backup step would be performed /before/ the perl patch script possibly decides the patch as already applied. At that time the user wouldn’t have a backup of the genuine, unchanged file anymore.

  34. I’m curious, how did the 11-11 build not support 1085? It worked here.

  35. You include perl 5.10, Secunia says this version i buggy. Why not include new patched perl 5.12?

  36. Thanks. One suggestion: why not overwrite opera.dll_original? Just as a precaution?

  37. For MS cmd “0 == ” is false in an if-construction; that yields true in 4NT, however. That’s been the reason for the unwanted upx-action.

  38. Thanks for the report. I use JP-Soft’s 4NT / TakeCommand instead of MS’s cmd.exe as a windows shell (and couldn’t live without it), so it’s always likely I miss issues with the standard shell (due to my laziness in skipping testing with cmd ;)). I’l look into it, soon.

  39. Thanks. BTW, I know you said in the other blog that a repack would only occur if it sees that it was packed originally, but that didn’t happen here. I tried your latest bat against 1060 (Windows), and it showed that there was nothing to unpack (plus you can tell by its size that it wasn’t packed), yet at the end of the process there was a repack.

  40. It’s easy to read the patterns from the perl code, though.

  41. XenoAntares,thanks for taking over the Eolas patching updates. Would you please consider to always show the proper patch string in this blog for those of us who like to patch manually? Thanks.

Comments are closed.