The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for 2018

A way to bypass a Chrome interstitial page is to type a secret keyword…

Posted by jpluimers on 2018/01/10

Some sites do not have their TLS security set- up correctly. You can get around the page that Chrome then displays. This is called the “interstitial bypass”, you should use it with great care (not like one of the sites I visited a year ago that got themselves a nice ransomware attack), for instance on machines you can dispose off.

The mechanism has changed over time, from a simple button to a passphrase that changes every now and then.

Some historic links on this:

Via:

A way to bypass a Chrome interstitial page is to type a secret keyword. Until today, this not-no-secret keyword was “badidea”. And it just changed. So h… – François Beaufort – Google+

–jeroen

Read the rest of this entry »

Posted in Chrome, Google, Power User | Leave a Comment »

xs:choice element to C# – Google Search

Posted by jpluimers on 2018/01/10

Some links via xs:choice element to C# – Google Search.

I need them one day to better understand xsd:choice mapping to C# for both XSD and WSDL usage.

I have the feeling that the WSDL and XSD importer are trying to be smart, so for instance when you have multiple choices that come down to a common basic type like a derivation from xsd:string, it makes to two properties: a C# enumeration to select the type and a C# string value for the content referencing the enumeration through a XmlChoiceIdentifierAttribute.

–jeroen

Posted in .NET, C#, Development, Software Development | Leave a Comment »

Delphi: playing Chimes.wav as an external file or embedded WAVE resource in Delphi XE5.

Posted by jpluimers on 2018/01/10

As a by-effect, this article seems to one of the few that shows where Delphi uses the .dres file extension introduced around Delphi XE.

Recently I had to play some notification sounds in a Windows Delphi application where the application deployment should be as easy as possible: preferable copying the EXE around.

Playing a sound file seems easy, especially if it is a [WayBackWAV file: just use the [WayBack] PlaySound or the (older) [WayBack] sndPlaySound API functions.

But if you start searching on the internet, you see lots of curious implementations for playing WAV resources through sndPlaySound.

The actual implementation is really really easy though, just make sure you follow the steps right and nothing can go wrong.

[WayBack] The full source code is on my BeSharp.net repository, here is how to to it step by step:

The steps depend on the MMSystem unit, so most of the code translates back to [WayBack] Turbo Pascal for Windows (yes, the 16-bit Pascal days when the MMSystem unit was introduced) with the exception of the SND_SENTRY flag.

The thing that more recent Delphi versions made a lot easier is embedding WAV files as WAVE resources, more on that further on. Read the rest of this entry »

Posted in Borland Pascal, Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Pascal, Software Development, Turbo Pascal | Leave a Comment »

Damned ! var Comp : function(const s1, s2: string): Boolean; begin if CheckB…

Posted by jpluimers on 2018/01/10

One of my main gripes about lots of RTL/VCL/FMX code: conventions are often lacking.

Which means one of the below functions starts with Ansi (but does a Unicode operation) and the other has the parameters in reverse.

var 
  Comp: function(const s1, s2: string): Boolean;
  begin 
    if CheckBox1.Checked then 
      Comp := ContainsText 
    else 
      Comp := AnsiStartsText;
  end;

–jeroen

source: [WayBackDamned ! var Comp : function(const s1, s2: string): Boolean; begin if CheckB… – Paul TOTH +

Posted in Delphi, Development, Software Development | 2 Comments »

Autoregister attribute for Delphi | Jon L. Aasenden

Posted by jpluimers on 2018/01/10

Interesting idea:

[WayBack] Wouldn’t it be nice if Delphi has an attribute that automatically registers your class for you? – Lennart Aasenden – Google+

Source at [WayBackAutoregister attribute for Delphi | Jon L. Aasenden

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

SSLLabs security reports for some embarcadero subdomains

Posted by jpluimers on 2018/01/09

I hope this is a coincidence. Before Nick Hodges left, the TLS security of the various embarcadero https servers was increased, most from grade F. Now they might soon be grade F again.

Hopefully somebody in IT has time to take a renewed look as security needs constant attention.

I’ve only included a fraction of their sub-domains, as really this is a job for the Embarcadero IT department.

Related:

Posted in Encryption, HTTPS/TLS security, Power User, Security | Leave a Comment »

Anonymise of data is hard, not just for now, but especially preventing future de-anonymisation

Posted by jpluimers on 2018/01/09

Two very interesting videos showing some background information as it is extremely hard to anonymise data. Not just for now, but especially against future de-anonymisation efforts.

–jeroen

Posted in Development, Software Development | Leave a Comment »

Some FastMM scenarios require NeverUninstall because the System unit finalizes things innitialised in other units

Posted by jpluimers on 2018/01/09

You always have to be careful  with Delphi finalization sections cleaning up things that might have not created inside the corresponding initialization section. This is especially true for the System unit.

That one actually contains this little piece of code that is being called after FinalizeUnits is called which also fianalises external memory managers like FastMM:

finalization
{$IFDEF WEAKREF}
  InstHashMap.Finalize;
{$ENDIF}...
{$IFDEF MSWINDOWS}
 FinalizeLocaleDate;
 if PreferredLanguagesOverride <> nil then
 FreeMem(PreferredLanguagesOverride);
...

Which means that you will have to enable the NeverUninstall conditional define as soon as the InstHashMap has been used.

Most often that’s the case with FMX applications that heavily relies on weak references.

The same holds for PreferredLanguagesOverride which is used by SetLocaleOverride and can be worked around by performing this right at the end of the .dpr:

SetLocaleOverride('');

–jeroen

via:

Posted in Delphi, Development, Software Development | Leave a Comment »

Some KlikAanKlikUit links – it runs at 433 Mhz is insecure, but for lights should work fine

Posted by jpluimers on 2018/01/09

Since I’ve an old TPC-200 lying around…

–jeroen

Posted in Development, Hardware Development | Leave a Comment »

Zabbix: better “Disk space usage” graphs for Windows systems

Posted by jpluimers on 2018/01/09

The default [WayBack] Zabbix Disk space usage graph (named Disk space usage {#FSNAME}) for Windows looks like this:

Total disk space on C:

Total disk space on C:

What I want is a graph over time. Based on that, I can start working on different triggers than the default “less than 20% free space available“, for instance:

So I want graphs similar to the CPU load (in the graph itself called Processor load) graph which looks like this:

CPU load (a.k.a. Processor load) is actually graphed

CPU load (a.k.a. Processor load) is actually graphed “over time”

It is part of the Graph prototypes for the Template OS Windows discovery list Mounted filesystem discovery:

For now I’ve added this graph prototype as Line chart with 95th percentile:

If that work, I can start working on the triggers:

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | 2 Comments »