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. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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. 🙁

  8. 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 ↲).

  9. 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?

  10. 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!

  11. @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.

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

  13. 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!

  14. 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.

  15. 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

  16. @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.

  17. 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.

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

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

  20. 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.

  21. 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.

  22. 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

  23. 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

  24. 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.

  25. 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

  26. 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. 😉

  27. 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.

  28. 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.

  29. Originally posted by rseiler:…[posting removed by author]Appreciate your comment. 😉 I don’t experience those mentioned phenomena, but others report plenty of crashes with build 1040 (and without noCTA) as well. So I agree, it’s probably a coincidence.

  30. Right. Adapted patch already, works again. ,) You’ll find it now on BitBucket or rather soonish here.

  31. Are you going by the build numbers posted at the top of the page? If so, don’t, since the latest build there just reflects the last time that the string location changed. It continues to work through build 1074.

  32. Originally posted by TheRockSays:Doesn’t work with Opera 11.50 final. Please help. This is God-send.Works for me…did you get the latest perl script?

  33. Here is another thing to try out:

    This version not only supports introducing arbitrary patches by editing the Perl script, but also makes use of simple plugins!

    A sample plugin patching away the UserJS-on-HTTPS warning (courtesy of Dither) is included. Please give it a try (and give me feedback)!

    »» xa-nocta_pluggable.zip [updated version below]

    Note: As always you can use your own Perl installation, if you have one. For size reasons there is now a slightly archaic Perl version included, ie Perl 5.6.1 from the MSYS package. That is, because newer versions don’t come self-contained regarding glob – the Perl 5.12 formerly included in the all-inclusive-package will not as-is support this plugin-enabled version!

  34. I cannot think of a way to make it even clearer, where to find the most recent versions, where possibly slightly older. 😉

  35. Just to let people know that this xa-nocta.zip located above, that officially supports builds up to 1052 works fine with the latest official and final version 10.50 build 1072 build of Opera :PIn case you don’t know 😛

  36. Re-packaged with Activestate Perl 5.6.1_635; previous pack wasn’t sufficient for folks without a MSYS installation.

    »» xa-nocta_pluggable.zip [updated version below]

    Note: Sample plugin does not work with new Opera 12.00 pre-alpha anymore.

  37. I tried this and it worked like a charm, now YouTube works great (although I hate the fact that their new player hides the video controls automatically)… So, it’s necessary to re-patch every time Opera is upgraded, isn’t it?

  38. Originally posted by Sac:I tried this and it worked like a charm, now YouTube works great (although I hate the fact that their new player hides the video controls automatically)… So, it’s necessary to re-patch every time Opera is upgraded, isn’t it? Yes, because every upgrade overwrites Opera.dll.

  39. Thanks for the sample plugin. The last time I found out someone (d.i.z.) had made a patch for that it had already broken in the latest version and he’d started working for Opera, compromising his ability to generate patches like that.

  40. This patch is a really great idea! I’m testing your xa-nocta_pluggable, and I have the following error twice :Use of uninitialized value in pattern match (m//) at xa-nocta.pl line 134.Code :134 : if (!$patchclass->{match} || ($buf =~ m/$patchclass->{match}/) ) {

  41. Changing @6781DAA8

    8B 4C 24 04 57 6A 17 6A 00 6A 01 BF A0 02 00 00
    E8 03 D3 B2 FF F7 D8 1B C0 F7 D8 5F C2 04 00

    to

    8B 4C 24 04 57 6A 17 6A 00 6A 01 BF A0 02 00 00
    E8 03 D3 B2 FF F7 D8 1B C0 B0 01 5F C2 04 00

    works for me right now.

    That is

    Address dump Command
    6781DAA8 8B4C24 04 mov ecx,[dword ss:arg1]
    6781DAAC 57 push edi
    6781DAAD 6A 17 push 17
    6781DAAF 6A 00 push 0
    6781DAB1 6A 01 push 1
    6781DAB3 BF A0020000 mov edi,2A0
    6781DAB8 E8 03D3B2FF call Opera_dll.6734ADC0
    6781DABD F7D8 neg eax
    6781DABF 1BC0 sbb eax,eax
    -6781DAC1 F7D8 neg eax
    +6781DAC1 B0 01 mov al,1
    6781DAC3 5F pop edi
    6781DAC4 C2 0400 retn 4

    Feedback?

  42. {
    # contributors: XA
    desc => ‘Opera 12.00 [1085]’,
    assert => undef,
    test => qr/x6Ax17x6Ax00x6Ax01xBFxA0x02x00x00xE8(.{4})xF7xD8x1BxC0xB0x01x5FxC2x04x00/,
    match => qr/x6Ax17x6Ax00x6Ax01xBFxA0x02x00x00xE8(.{4})xF7xD8x1BxC0xF7xD8x5FxC2x04x00/,
    replace => ‘”x6Ax17x6Ax00x6Ax01xBFxA0x02x00x00xE8$1xF7xD8x1BxC0xB0x01x5FxC2x04x00″‘
    },
    would be the respective patch record in xa-noCTA format.

  43. Originally posted by XenoAntares:A sample plugin patching away the UserJS-on-HTTPS warning (courtesy of Dither) is included. Please give it a try (and give me feedback)!»» xa-nocta_pluggable.zipDang, this is going to annoy me. The UserJS patch doesn’t work for me with 12.00 [1090].I’m going to try and find a fix, but my experience with such things is extraordinarily limited.

  44. There is a brand new version of the ”pluggable“ branch out, get (and test) it while it’s fresh: 😉

    »» xa-nocta_pluggable.zip

    Supports 12.00 build 1090.
    Plugins can now be passed to xanocta.pl via -P options avoiding CORE::glob dependency in Perl.
    xanocta.pl can still scan by itself, given CORE::glob availability and option -p.
    Settled for Perl 5.12 to be packed into the all-inclusive-package.
    Implemented scan for plugins in batch wrappers; this involves a hack for stupid CMD. CMD needs a feature called “delayed variable expansion” (/V:ON) to support my approach of collecting plugin names. Most folks probably won’t have it enabled in their standard CMDs. So I perform some wizardry to check for the feature, and re-launch the batch file from a feature-enabled second CMD process, if necessary. – Use JP-Soft’s TCC / 4NT and life becomes easy. 😉
    Updated anti UserJS-on-HTTPS warning plugin with contributions by BtEO (thanks, well done!).

    The Mercurial repository on Bitbucket may give you details on the changes.

  45. When testing for delayed variable expansion you need to move the code for the -donotrecurse check into a label. If %~f0 expands to a path with brackets in (e.g. Program Files (x86)) the script dies at that point because the if block is closed early.Example (you’d probably need to modify the installer patcher too.)Or you could just avoid the whole mess altogether and add SetLocal EnableDelayedExpansion to the top of the script :P; I think it needs to be a separate command from the existing SetLocal.

  46. Thanks a lot.I vaguely remembered once having stumbled across a way to set DelayedExpansion on the fly — but just didn’t find it any more (and didn’t google enough, apparently ;)).I’ll incorporate your suggestion.… Did I tell already, I don’t like CMD? ^^

  47. That’s very nice, thank you!That reminds me of an Opera.dll hack I saw before on Opera 11, which disables the URL highlighting feature.http://operafan.net/forum/index.php?topic=17407.0Related discussion: http://my.opera.com/community/forums/topic.dml?id=385751&abc=&page=4&skip=150&show=&perscreen=50It was actually a bit disheartening for me to see the best browser, once known for customizability, had to resort to such method to do something fairly simple. It’s not a good time for picky people like me =(

  48. Maybe you want to use and maintain a NoCTA-plugin?E.g.
    #!/usr/bin/perl -w
    # xa-nocta — XA No-Click-To-Activate patchscript v1.5.0 / 2011-10-19
    #
    # Portions copyright (C) by XA, VI 2011 – X 2011.
    # Licensed under a Creative Commons CC-by-nd-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 Nibiru on the operafan.net forum.
    # http://operafan.net/forum/index.php?topic=17407.0

    push @main::PATCH_INFO,
    {
    desc => ‘No Addressbar host highlightning’,
    assert => undef,
    test => undef,
    match => qr/./,
    replace => undef,
    patchset => [
    {
    # No Addressbar host highlightning patch by Nibiru
    # contributors: Nibiru, XA
    desc => ‘Method 1 Opera 11.x, Opera 12.00’,
    assert => undef,
    test => qr/xD9x05.{4}(?:xD9xBC|x8Bx54)x24/,
    match => qr/xDDx05(.{4})(xD9xBC|x8Bx54)x24/,
    replace => ‘”xD9x05$1$2×24″‘
    },
    ]
    }
    ;

    1;
    Как-то так…Внимание! Did not test at all!___Edited on 2011-10-20

  49. Yes, it was ment more like a template or hint than a working solution. The pattern would have to be refined (as searching for a first xDDx05 would be way too coarse an approach).

  50. I have no experience in writing Perl, but I’ll give it a try these few days (your example should be enough for me to start with). Thanks a lot.

  51. Something changed betwee 11.60 build 1144 and 1145. xa-nocta-the_installer.bat worked for 1144, but it’s not finding anything in 1145.

  52. Attempt to patch 11.60 builds 1144,1145 can be checked out from the Bitbucket repository.I already – perhaps overhastily :ko: – uploaded the standard xa-nocta.pl and package as well as the _pluggable pack.

  53. Same here. Btw, it would be nice if the “UserJS warning when used on HTTPS” and “No Addressbar host highlighting” plugins worked on Opera 11.60 Build 1145.

  54. Originally posted by XAntares:Same here. Btw, it would be nice if the “UserJS warning when used on HTTPS” and “No Addressbar host highlighting” plugins worked on Opera 11.60 Build 1145.Well,this patch about “UserJS warning when used on HTTPS” now could not work on Opera 11.60 beta(build 1147).

  55. The same approach as took the previous “UserJS warning when used on HTTPS” patch does produce an access violation with me.Here are my superficial research results:
    CPU Disasm
    Address Hex dump Command Comments
    67671770 ³> À33C0 xor eax,eax
    67671772 ³> 8987 D4200000 mov [dword ds:edi+20D4],eax
    67671778 ³. 3BC3 cmp eax,ebx
    6767177A ³.↓ 74 5F je short Opera_dll.676717DB
    -6767177C ³> 56 push esi ; ÚArg2
    +6767177C 90 nop
    -6767177D ³. FFB7 D4200000 push [dword ds:edi+20D4] ; ³Arg1
    +6767177D 90 nop
    +6767177E 90 nop
    +6767177F 90 nop
    +67671780 90 nop
    +67671781 90 nop
    +67671782 90 nop
    -67671783 ³. E8 C1F31500 call Opera_dll.677D0B49 ; ÀOpera_dll.677D0B49, !!!!!!!!!!!!!!!!!!!!!!!!!!!
    +67671783 90 nop
    +67671784 90 nop
    +67671785 90 nop
    +67671786 90 nop
    +67671787 90 nop
    67671788 ³. A1 1042E267 mov eax,[dword ds:Opera_dll.67E24210]
    -6767178D 3998 CC200000 cmp [dword ds:eax+20CC],ebx
    +6767178D 8998 CC200000 mov [dword ds:eax+20CC],ebx
    -67671793 ↓ 75 4E jne short Opera_dll.676717E3
    +67671793 43 inc ebx
    +67671794 90 nop
    -67671795 3998 D0200000 cmp [dword ds:eax+20D0],ebx
    +67671795 8998 D0200000 mov [dword ds:eax+20D0],ebx
    6767179B ³.↓ 74 06 je short Opera_dll.676717A3
    6767179D ³. 56 push esi ; ÚArg1
    6767179E ³. E8 9FBC1000 call Opera_dll.6777D442 ; ÀOpera_dll.6777D442
    676717A3 ³> A1 1042E267 mov eax,[dword ds:Opera_dll.67E24210]
    676717A8 ³. 3998 D0200000 cmp [dword ds:eax+20D0],ebx
    676717AE ³.↑ 0F85 B4DEC9FF jne Opera_dll.6730F668
    676717B4 ³.↑ E9 ABDEC9FF jmp Opera_dll.6730F664

    ————————————————————————–

    That leads to binary pattern @6767177c in memory / @00420b7c file (Opera 11.60 build 1147):

    match: 56 FF B7 D4 20 00 00 E8 C1 F3 15 00 A1 10 42 E2 67 39 98 CC 20 00 00 75 4E 39 98 D0 20 00 00 74 06 56
    replace: 90 90 90 90 90 90 90 90 90 90 90 90 A1 10 42 E2 67 89 98 CC 20 00 00 43 90 89 98 D0 20 00 00 74 06 56

  56. Okay, think I got it.ebx should be restored to zero after we incremented it to store the ack(?)-flag. It will be used as const zero further on. CPU Disasm
    Address Hex dump Command Comments
    67671770 33C0 xor eax,eax
    67671772 8987 D4200000 mov [dword ds:edi+20D4],eax
    67671778 3BC3 cmp eax,ebx
    6767177A 74 5F je short Opera_dll.676717DB
    -6767177C 56 push esi ; ÚArg2
    +6767177C 90 nop
    -6767177D FFB7 D4200000 push [dword ds:edi+20D4] ; ³Arg1
    +6767177D 90 nop
    +6767177E 90 nop
    +6767177F 90 nop
    +67671780 90 nop
    +67671781 90 nop
    +67671782 90 nop
    -67671783 E8 C1F31500 call Opera_dll.677D0B49 ; ÀOpera_dll.677D0B49, !!!!!!!!!!!!!!!
    +67671783 90 nop
    +67671784 90 nop
    +67671785 90 nop
    +67671786 90 nop
    +67671787 90 nop
    67671788 A1 1042E267 mov eax,[dword ds:Opera_dll.67E24210]
    -6767178D 3998 CC200000 cmp [dword ds:eax+20CC],ebx
    +6767178D 8998 CC200000 mov [dword ds:eax+20CC],ebx
    -67671793 75 4E jne short Opera_dll.676717E3 ; jump if flagUJSModified == 1
    +67671793 43 inc ebx
    +67671794 90 nop
    -67671795 3998 D0200000 cmp [dword ds:eax+20D0],ebx
    +67671795 8998 D0200000 mov [dword ds:eax+20D0],ebx
    -6767179B 74 06 je short Opera_dll.676717A3 ; jump if flagUJSonHTTPSack == 0
    +6767179B 4B dec ebx
    +6767179C 90 nop
    6767179D 56 push esi ; ÚArg1
    6767179E E8 9FBC1000 call Opera_dll.6777D442 ; ÀOpera_dll.6777D442
    676717A3 A1 1042E267 mov eax,[dword ds:Opera_dll.67E24210]
    676717A8 3998 D0200000 cmp [dword ds:eax+20D0],ebx
    676717AE 0F85 B4DEC9FF jne Opera_dll.6730F668
    676717B4 E9 ABDEC9FF jmp Opera_dll.6730F664

    ————————————————————————–

    That leads to binary pattern @6767177c in memory / @00420b7c file (Opera 11.60 build 1147):

    match: 56 FF B7 D4 20 00 00 E8 C1 F3 15 00 A1 10 42 E2 67 39 98 CC 20 00 00 75 4E 39 98 D0 20 00 00 74 06 56
    replace: 90 90 90 90 90 90 90 90 90 90 90 90 A1 10 42 E2 67 89 98 CC 20 00 00 43 90 89 98 D0 20 00 00 4B 90 56

  57. So, can you please get the “No Addressbar host highlightning patch” plugin to work on the latest snapshot? Thanks in advance.

  58. Hi Mr Kirk.I’m afraid I cannot promise that one. I apologize.You know, the whole idea of introducing a plugin structure to xaNoCTA was to allow for special interest and pet patches to be easily applied to Opera without leaving the burden of providing long term maintenance on my shoulders.The ”UserJS on HTTPS“ warning is an issue annoying me severely enough to motivate me caring about the related plugin (which happens to be the sample plugin).Personally I do not really care* about the ”Addressbar host highlightning“ thingy, so I probably won’t maintain a plugin patching that one. But feel encouraged to do that yourself! Or maybe the original author/s (supposed to be Nibiru on operafan.net) want to provide that plugin?__* I quite like the custom setup opera:config#UserPrefs|HideURLParameter=0 (together with the default opera:config#UserPrefs|ShowFullURL=0)

  59. I’m sure you don’t want to hear this, but 12.00.1174 breaks it again. I wonder why it changes so much more often these days?

  60. I’ve taken a look at the patch in 12.00.1174Here’s the relevant code:There are two instances right next to each other, with the difference (both between the two instances, and between builds) marked in red.In 1155 the second instance is patched, and making the same change in 1174 works; curiously however patching either or both instances seems to work. Though I’ve didn’t run Opera for any longer than it took to test the click to activate was removed to see if any instability was introduced by patching the first instance. This is relevant because if we update the patch as it stands to match A3 as well as A0 and A1 then it would have matched the first instance in 1155 (and possibly future builds) instead of the second.For this reason I’m not suggesting a new match pattern as Xeno might know better than me (or not) the implications of patching the wrong instance.

  61. I had little time and stuck with the 11.60 series for the time being. Thanks for posting your findings.You mention a valid point. I think, eternal compatibility and true universal coverage of all versions will be difficult to promise – if not only due to the fact, that it meant to test against all former versions (or do better (context) documentation). Luckily enough, the BitBucket repository allows for cherry-picking development snapshots.That said, the “assert” clause could be employed here…

  62. I’ve decided to switch entirely to the ”pluggable“ branch soon.Here is a version, that includes a patch suitable for Opera 12.00 builds 1184 and 1191: xa-nocta_pluggable.zip.For those interested: It patches both locations mentioned by BtEO above, but in an other way than all the patches before. The pattern is quite specific, so it will probably break ”soonish“.The function called (not only) in these two locations is called with 3 or 4 parameters, three on the stack, one in EDI. It seems scan a (somehow compactly packed) map for an item, whose id is specified in EDI. This item is never found – possibly at least up until a CTA message appears in an unpatched session.If it was found, however, skipping some details, an item with a type or id given by arg3 (= 17) is examined in an referenced structure. If an item with that id is not to be found, arg2 (= 0) is returned as a fallback.This latest patch approach modifies, what is passed to that function for a fallback value, ie it pushes 1 instead of 0 as arg2.

  63. New match pattern for no click-to-activate, essentially a more generic version of the 1184/1191 patch.# contributors: XA [20111207], BtEO [20111219]
    desc => ‘Opera 12.00 [1085,1090,1105,1116,1155,1174,1191,1231], 11.60 [1134,1139,1144,1145,1147,1150,1159,1163,1169,1173,1177,1178,1180,1181,1184,1185]’,
    assert => undef,
    test => qr/x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{2}(.{2})xF7xD8x1BxC0xF7xD8[x5Fx5E]xC2x04x00.{5}x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{2}1xF7xD8x1BxC0xF7xD8[x5Fx5E]xC2x04x00/,
    match => qr/x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{2})(.{2})xF7xD8x1BxC0xF7xD8([x5Fx5E])xC2x04x00(.{5})x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{2})3xF7xD8x1BxC0xF7xD8([x5Fx5E])xC2x04x00/,
    replace => ‘”x6Ax17x6Ax01x6Ax01$1xE8$2$3xF7xD8x1BxC0xF7xD8$4xC2x04x00$5x6Ax17x6Ax01x6Ax01$6xE8$7$3xF7xD8x1BxC0xF7xD8$8xC2x04x00″‘Notes:* 12.00.1085 was the last non-trivial break, and this pattern matches every 11.60/12.00 build since then. (I knew there was a reason I’ve kept copies of possibly every single snapshot since 9.50 :P)* The CALL in both locations should go to both to the same function, so the address matched should be nearly identical (besides a difference in offset by 31 bytes) between them. The pattern above matches in the first location as (.{2})(.{2}) and in the second location as .{2}3 — the idea being that the top two bytes of the offset are unlikely to change and just adds a further sanity check in case of a false positive appearing. I recognise this is almost certainly overkill, and may unnecessarily fail in new builds whilst still not being a total guarantee against false positives. Currently omitting the backreferences yields no false positives on any 11.60/12.00 build. Here’s that version of the pattern:# contributors: XA [20111207], BtEO [20111219]
    desc => ‘Opera 12.00 [1085,1090,1105,1116,1155,1174,1191,1231], 11.60 [1134,1139,1144,1145,1147,1150,1159,1163,1169,1173,1177,1178,1180,1181,1184,1185]’,
    assert => undef,
    test => qr/x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{4}xF7xD8x1BxC0xF7xD8[x5Fx5E]xC2x04x00.{5}x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{4}xF7xD8x1BxC0xF7xD8[x5Fx5E]xC2x04x00/,
    match => qr/x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{4})xF7xD8x1BxC0xF7xD8([x5Fx5E])xC2x04x00(.{5})x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{4})xF7xD8x1BxC0xF7xD8([x5Fx5E])xC2x04x00/,
    replace => ‘”x6Ax17x6Ax01x6Ax01$1xE8$2xF7xD8x1BxC0xF7xD8$3xC2x04x00$4x6Ax17x6Ax01x6Ax01$5xE8$6xF7xD8x1BxC0xF7xD8$7xC2x04x00″‘

  64. I’m not using the new 11.61.1222 build, but I’ve just tested it.My revised pattern above works for the click-to-activate patch.The User JS patch breaks, the JNE SHORT has changed slightly.Revised patch, which just ignores the operand in both the jumps (they get NOP’d anyway):# Silent UJS HTTPS patch by XA, based on version of Dither
    # contributors: XA, Dither
    desc => ‘Silent HTTPS UserJS (Method 3) Opera 11.60 [1147,11,50,1159..], Opera 12.00 [1159,..]’,
    assert => undef,
    test => qr/x90{12}xA1.{4}x89x98.{4}x43x90x89x98.{4}x4Bx90x56/,
    match => qr/x56xFFxB7.{4}xE8.{4}(xA1.{4})x39(x98.{4})x75.x39(x98.{4})x74.x56/,
    replace => ‘”x90x90x90x90x90x90x90x90x90x90x90x90$1×89$2x43x90x89$3x4Bx90x56″‘Edit: Bryan’s post totally wasn’t there when I originally loaded the page. 😛

  65. So I spent some time with Nibiru’s address bar patch.First on the versions specifically listed at the site linked before (which helpfully included one for the latest 12.00 beta.) After much tweaking of the regex, expanding and contracting the scope I found a pattern with matched all those DLLs but only in the right place. Then I expanded the scope to every DLL from every build since the introduction of the 7z installer.Eventually I managed to find a match that hit reliably for the last 97 publicly released builds (from 11.10.1140 onwards.) The only real problem is that I don’t actually understand why Nibiru’s patch works, although it clearly does. 😛 Looking at the disassembly in OllyDbg doesn’t show any difference that I can spot between before and after code.I haven’t tested in every single one of those 97 builds, but I have tested several random builds from that set and found no problems. With luck this pattern should endure for some time.Patch (as plugin)Notes made while testing——————————————————————————————————————————————And more for the curious. I decided to hunt down the post for .1140 to see whether there was a particular reason for the blackout prior to this version. Before I can find it I stumble across the post for .1094 which is clearly the introduction of the address bar changes. Only 6 more DLL matches and I have a complete set. :PLong story short, the notes above do include a “perfect” regex. But it’s overkill. There’s two basic variants in 97 builds, but those 6 extra builds add two very different variants which may not even be right — I didn’t test. But I just couldn’t leave it without trying to find them.

  66. Hello, Robin Zalek! I am the author of the patch, disabling highlight the domain in the address bar. I want to try to make own universal patch, but for this I need all the original files opera.dll releases from ver 11.10. Could you put them in a single archive filehosting, if you have enough traffic, or suggest a way to quickly download all the required distributions and extraction of the file opera.dll. Thank you!PS. Now I use 3 patterns to search and replace DD -> D9:DD ?? ?? ?? ?? 67 D9 BC 24 ?? 00 00 00 DD ?? ?? ?? ?? 67 8B 54 24 1CDD ?? ?? ?? ?? 67 89 54 24 50

  67. Hi,Unfortunately I only have the installer files because I happened to make the decision way back in the 9.50 days to keep copies of every snapshot released. At the time I had no real reason to do so, other than the fact it wasn’t taking up much hard drive space — I actually have ~2.5 GiB of Opera installers now.Even if I take just the DLLs from since Opera switched to using the 7-zip based installer (which was only a few builds before they introduced the new address bar) they still total over 1 GiB, and even when compressed as heavily as possible into a solid 7-zip archive still take up around 150 MiB which is more than I can easily upload and distribute.I could setup a torrent, but right now it’d only be available for about 10 hours or so, then I have plans which involve my laptop coming with me. If you’re interested, and keep an eye on the comments here I’ll upload a .torrent file some time late on Sunday (GMT) which will be both the installers, so you can test patches, and the extracted DLLs so you can easily search the entire collection with regular expressions.I’ve actually already read with interest your recent (Google translated) post on the original thread about how you found the patch originally. It’s nice to understand how the patch actually works, which I didn’t before. I only have a passing knowledge of assembler and wouldn’t even have known where to begin if you hadn’t provided the patches you have.In case you didn’t notice it above my notes should make interesting reading, although they’re not especially well commented. Especially the part that shows what I believe to be the correct matches (I did not test all 97 versions, but I did test a random selection from those 97) for every build. I especially have not tested the 11.00.1094 – 11.00.1136 because their patterns differ substantially from all later builds, they are also before you produced your first patch.I’ll quickly break down my logic for the regular expression I use:xDDx05 [The FLD, this is the part we need to change]
    ( [The rest of the regex is only used to make sure we’re matching the correct instance so I capture the whole lot for the replacement]
    .{3}x67 [The address for the FLD, the x67 has been consistent across all versions]
    (?:[x89x8B].x24.)? [MOV, Fairly changeable between builds, and does not exist in all builds, entire block is optional]
    xD9xBCx24.x00{3} [FSTCW (so OllyDbg tells me), consistent in all builds but the earliest four, the . could be replaced with [x8Cx94] and still match every version]
    (?:[x89x8B].x24.)? [MOV, Again, very changeable, and does not exist in all builds, block is again optional]
    x0FxB7x84x24.x00{3} [This is the first perfectly consistent match after the xDDx05 that we are aiming to patch. The x0FxB7x84x24 exists in all but the earliest four builds, again the . could currently be reliably replaced with [x8Cx94] and still match]
    )
    And of course at the bottom of the file there’s the unused, untested, unoptimised regex that matches every single build since they changed the address bar. Which I only kept for my own curiosity, and maybe the curiosity of others.Currently your patterns would match all versions (not counting the six early versions) except 11.60.1150 (DD ?? ?? ?? ?? 67 89 54 24 4C). I’m not sure if you’d generate false positives with any of those though. This is why I prefer matching until the 0F B7 84 24 because this has been totally consistent, and the shorter the match pattern the more likely to find false positives in other builds; I think when I attempted to match only as far as the D9 BC 24 ?? 00 00 00 part I was still finding false positives.

  68. It’s worth noting that the Perl work is all by XenoAntares, whose blog this is. My only contributions have been new regular expressions; I only have a small amount of knowledge when it comes to Perl.Learning Perl would be useful, what’s far more important is learning regular expressions. Without those there’s pretty much no hope of making a good generic patch. You could write your own executable designed specifically for applying this patch, but it would inevitably end working in a similar fashion to a regular expression engine — and why reinvent the wheel.[1]Perl as a language has probably done the most with regular expressions. Many of the tokens used in matches would have first appeared in Perl, so learning both together might not be a bad idea. And if you can handle debugging assembler Perl should be well within you range. :P[1] Regular expressions, alongside the Xpath bindings in JavaScript, rank highly on my list of “Holy crap this is awesome” useful things.

  69. It would be nice if someone made a patch that removes the search option that is shown in the address bar’s drop down menu.

  70. Click to activate Broken in build 12.00.1301Further modified the first match pattern to un-break it. Seems to be working nicely, and seems to match the same older files[1] perfectly too.test => qr/x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{4}(?:xF7xD8x1BxC0xF7xD8)?[x5Fx5E]xC2x04x00.{5}x6Ax17x6Ax01x6Ax01[xBFx68].{4}xE8.{4}(?:xF7xD8x1BxC0xF7xD8)?[x5Fx5E]xC2x04x00/,
    match => qr/x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{4})((?:xF7xD8x1BxC0xF7xD8)?[x5Fx5E])xC2x04x00(.{5})x6Ax17x6Ax00x6Ax01([xBFx68].{4})xE8(.{4})((?:xF7xD8x1BxC0xF7xD8)?[x5Fx5E])xC2x04x00/,
    replace => ‘”x6Ax17x6Ax01x6Ax01$1xE8$2$3xC2x04x00$4x6Ax17x6Ax01x6Ax01$5xE8$6$7xC2x04x00″‘[1] I did some very heavy duty batch testing recently with my full collection of DLLs looking at exactly which patterns matched which builds (though not testing whether the match was genuine). The results are mostly useless, but did allow me to quickly make sure nothing broke with the changed patch above. The matches are numbered top-to-bottom (ignoring the commented patch in CTA) in the order they’re currently found in the individual .pl files. You can control the highlighting by editing cells F1, G1, and H1

  71. Eolas still has time to appeal the decision and such. It will probably still be a while before it is legally safe to remove click-to-activate.

  72. And that can go on indefinitely, since when isn’t there another place to appeal to, but it does say “in the meantime Eolas won’t be able to go after new targets.” Was Opera ever actually named in this? If not, they’re not an old target, so….

  73. I myself don’t experience issues you describe with 1328. (But 1351 w/ OOPP in contrast is unusably instable.)On the other hand, it is perfectly possible that there are undesired side effects with the patch.I have also have such a suspicion: With many tabs open (perhaps 80+) after a while of “heavy surfing” images (the larger the sooner) fail to render, then even app icons in the “open with…” menu fall back to Window’s default app ichon (blue framed white window). If you insist opening more tabs or visit more pages, the time will come where Opera crashes. To me that tastes like some handles or other resources going out of stock.But it is not exactly proportional to flash content embedded in the tabs, I suspect. So it’s probably *not* related to CTA (with its invisible overlay windows, whose creation should be inhibited in the first place by this patch). It is perhaps more related to the purportedly fixed 3025 background images bug CORE-42565.

  74. I think I may have found (in a last ditch effort before throwing in the towel) the new location using my usual semi-educated fumble in the dark with modified regexes method, but I’d like someone more educated to take a look before I commit to making a new match pattern that works on all the broken builds.This applies to build 12.00.1387 x86 (I think all the patches would need to be re-engineered from scratch for x64)In your hex editor of choice go to address 0x0060A238. You should find a “6A 00 6A 17” pattern, and again not long after at 0x0060A24F. Change both 00 values to 01 (i.e. the same patch idea as before) and see how it goes.I’m using it with this applied and I’m not getting the click-to-activate behaviour, which seems a good sign I’ve not changed the wrong thing, but I still think it’s good to be paranoid.

  75. Searching for “push 0; push 17” (apparently the arguments passed to called subroutine have been swapped) in build 1387 and then setting breakpoints on the more plausible occurrences leads me to the same location you found, Robin:
    Address Hex dump Command Comments
    6778AE33 /$ 56 push esi ; Opera_dll.6778AE33(guessed Arg1)
    6778AE34 |. 8B7424 08 mov esi,[dword ss:arg.1]
    -6778AE38 | 6A 00 push 0 ; // 17 2B0 (!!!)
    +6778AE38 6A 01 push 1 ; // 17 2B0 (!!!)
    6778AE3A |. 6A 17 push 17 ; Arg2 = 17
    6778AE3C |. 68 B0020000 push 2B0 ; Arg1 = 2B0
    6778AE41 |. E8 3E34ACFF call Opera_dll.6724E284
    6778AE46 |. 5E pop esi
    6778AE47 . C2 0400 retn 4
    6778AE4A /$ 56 push esi ; Opera_dll.6778AE4A(guessed Arg1)
    6778AE4B |. 8B7424 08 mov esi,[dword ss:arg.1]
    -6778AE4F | 6A 00 push 0 ; // 17 2AE (!!!!)
    +6778AE4F 6A 01 push 1 ; // 17 2AE (!!!!)
    6778AE51 |. 6A 17 push 17 ; Arg2 = 17
    6778AE53 |. 68 AE020000 push 2AE ; Arg1 = 2AE
    6778AE58 |. E8 2734ACFF call Opera_dll.6724E284
    6778AE5D |. 5E pop esi
    6778AE5E . C2 0400 retn 4
    Calling Opera_dll.6724E284 with 1 instead of 0 (similar to what the previous patches did) gives an empirically pleasing result. 🙂 You’re right.Another idea was to force the argument passed to Opera_dll.6724E284 and passed along therein in that function only:
    6724E284 /$ FF7424 08 push [dword ss:arg2] ; ÚArg4 => [Arg2], !!!!!!!!!!!!!!!!!!!!! core
    -6724E288 |. FF7424 10 push [dword ss:arg3] ; ³Arg3 => [Arg3]
    +6724E288 6A 01 push 1
    +6724E28A 90 nop
    +6724E28B 90 nop
    6724E28C |. 6A 01 push 1 ; ³Arg2 = 1
    6724E28E |. FF7424 10 push [dword ss:arg1] ; ³Arg1 => [Arg1]
    6724E292 |. E8 49FC0400 call Opera_dll.6729DEE0 ; ÀOpera_dll.6729DEE0
    6724E297 |. F7D8 neg eax
    6724E299 |. 1BC0 sbb eax,eax
    6724E29B |. F7D8 neg eax
    6724E29D . C2 0C00 retn 0C
    But that would probably counter the attempt to keep patches similar or even unified over versions…ETA: Apparently working, but not-unified, patch in BitBucket-repository…

  76. After using Opera for so long I only now stumbled upon this blog in finding a way to ease the “click to activate” pain.I have read all the info and posts here and have to say a big thank you to everyone involved in making this patch possible. I am somewhat of a developer myself, however my asm is severely lacking.So I was curious as to how this patch really works. As Xeno explained there is a function taking 3 parameters (17,0,1) where you modify the return value to 1 by changing the parameter 2 from 0 to 1. Is there any insight as to why this changes the behavior of the click to activate and how this is related?The reason I ask is the following: I have read on multiple locations here that a CreateWindowEx is used to capture the first click and to enable the control. If it really is a CreateWindowEx call that just needs to be prevented, then I have a much simpler approach: You could set a Windows hook and wait for a call to create this special overlay by Opera and simply prevent it. That would mean you have to run a 1MB app to monitor the calls, but you would (theoretically) never have to change a dll anymore, even after new versions.I have tried looking for the overlay Window, but all I can find is the flash plugin window itself (Class Name: aPluginWinClass)If someone could help here and given that it works that way, I could produce a working test app with source in a matter of moments.Thanks

  77. Guys, thank you for this. I just hope you make it available for the up coming Opera v. 12.00 and later too.

  78. Ralf, I read your earlier comment and think about it, when I find the time. ;)(First thought: How would you prevent creating the overlay window? You probably cannot return an error, so you have to ignore. Then what happens with the window’s WndProc, what’s the WndProc? Will it catch mouse clicks anyways (I think there was an issue like that)? Will it at times try to destroy the non-existing window?).But many thanks for your interest! (That png is huuuge. 😉 )

  79. Xeno! Thanks for your reply.You just have to SetWindowsHookEx(WH_CBT, CBTProc, hMod, 0) where the CBTProc function lies in a separate DLL of your program.When Opera tries to CreateWindowEx() your CBTProc will get called BEFORE, with a parameter HCBT_CREATEWND.From MSDN: If the hook procedure returns a nonzero value, the system destroys the window; the CreateWindow function returns NULL, but the WM_DESTROY message is not sent to the window. If the hook procedure returns zero, the window is created normally.So you can prevent the CreateWindowEx alltogether. I have tried this and you can successfully prevent the creation of for example the aPluginWindow window. But this does not seem to be the overlay, this rather seems to be the real flash window? If I prevent creation of this window then the rectangle where flash is supposed to be is just black.About the WndProc: No wndproc will be used/called since the window gets destroyed.An alternative approach would be (if there is NO overlay window): Use the same hook mechanism as above, catch the CreateWindowEx and then try to send a WM_LBUTTONDOWN to the window as soon as it is created, to mimic a user clicking the control without delay.

  80. In the meantime I have found a relevant piece of code in the x64 build of the latest stable 12.00 release.I still dont fully understand why it works, but it is analog to the patches in the x86 version. So if someone wants to try this out please report back. It essentially changes the “test eax, eax; setnz cl” to a “mov cl, 1; nop” which essentially removes CTA.Not sure about side effects. Please report back.
    {
    # contributors: PX
    desc => ‘Opera 12.00 64bit [1467]’,
    assert => undef,
    test => qr/x41xB8x01x00x00x00.{5}x33xC9x48x85xC0xb1x01x90x8BxC1x48x83xC4x38/,
    match => qr/(x41xB8x01x00x00x00.{5}x33xC9x48x85xC0)(x0Fx95xC1)(x8BxC1x48x83xC4x38)/,
    replace => ‘”$1xb1x01x90$3″‘
    },

  81. @vux77: Ralf Onat has proposed a solution, ie a patch pattern, a few comments above.I have no real means to verify it, though, for now. Try it, if you dare! 😉 Or maybe other folks verify or refine the proposed patch.If there is enough certainty the patch works, I can include it in the “pre-manufactured” scripts hosted here.

  82. huh :insane: :insane: :insane: I’m not a programmer, but…Reason I asked is because I did get couple of times that click to activate msg on some sites lately (not on YT).I replaced one of the blocks in .pl file with what Ralf wrote couple of comments above (did noticed that before, but didn’t know what to do with it 😆 😆 ) and everything passed.Can you pls post couple of example sites, to check is it really working(sites that asking “click to activate” video)

Leave a Reply

Your email address will not be published. Required fields are marked *