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

Did you know? 10.2 Tokyo has introduced 3 new warnings for Delphi compilers:…

Posted by jpluimers on 2019/02/27

Seems I forgot to push the “publish” button on this 2 years ago (:

Did you know?

10.2 Tokyo has introduced 3 new warnings for Delphi compilers:

Implicit integer cast with potential data loss from ‘<from>’ to ‘<to>’ W1071 IMPLICIT_INTEGER_CAST_LOSS Default: Off
Implicit conversion may lose significant digits from ‘<from>’ to ‘<to>’ W1072 IMPLICIT_CONVERSION_LOSS Default: Off
Combining signed type and unsigned 64-bit type – treated as an unsigned type W1073 COMBINING_SIGNED_UNSIGNED64 Default: On

Source: [WayBack] Did you know? 10.2 Tokyo has introduced 3 new warnings for Delphi compilers:…

Comment:

they were initially documented in less detail than the above table, and it keeps surprising me that you need to read employee blogs instead of the docwiki to keep current: [WayBack] New Warnings, Illegal Casts, and other Delphi compiler changes in 10.2 Tokyo.

Since then, documentation has improved to this:

Read the rest of this entry »

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

GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Posted by jpluimers on 2019/02/27

[WayBack] GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Example saves: [WayBack] gplus-archiver

Via:

–jeroen

Posted in Development, G+: GooglePlus, PHP, Power User, Scripting, SocialMedia, Software Development, Web Development | Leave a Comment »

Any opinion on RAD Server vs Node.js/LoopBack vs TMS XData vs other?

Posted by jpluimers on 2019/02/26

Interesting thread still: [WayBack] Any opinion on RAD Server vs Node.js/LoopBack vs TMS XData vs other? – Kyle Miller – Google+

Tools mentioned there (not limited to Delphi):

–jeroen

Read the rest of this entry »

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

Don’t complain about the multitude of “places”/services that your fav G+ers are going…

Posted by jpluimers on 2019/02/26

Great post: [WayBack] Don’t complain about the multitude of “places”/services that your fav G+ers are going and how that makes your life miserable. We all met here by acciden… – Jan Wildeboer – Google+:

Don’t complain about the multitude of “places”/services that your fav G+ers are going and how that makes your life miserable. We all met here by accident, had a good time, mostly. And now we move on.

There is no “one size fits all” replacement out there. Instead, look forward to meeting new people and old friends at whichever place you are going to.

Find me on Twitter, Mastodon and infrequently on Pluspora. Or maybe at a (hopefully open and distributed) new place that doesn’t even exist yet.

[WayBack] OK, maybe Diaspora can become my “new home”, at least for sharing my blog posts and allowing comments. – Thomas Mueller (dummzeuch) – Google+

[WayBack] Diaspora API Dev Progress Report 30 by Open Source and Fediverse Advocate/Developer exploring longvetity and software from a 1st person point of view

–jeroen

Posted in G+: GooglePlus, LifeHacker, Power User, SocialMedia | Leave a Comment »

Thomas Mueller has started to write some documentation on the internal workings of GExperts…

Posted by jpluimers on 2019/02/26

From a while ago, for my link archive:

[WayBack] I have started to write some documentation on the internal workings of GExperts. For now, it covers only a very small part of the IDE form enhancement… – Thomas Mueller (dummzeuch) – Google+

Back then, this was done:

–jeroen

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

sed in a bash script: backslash escape anything that looks suspicious

Posted by jpluimers on 2019/02/26

Did I ever tell I dislike regular expressions and old-skool shells?

They’re not good for anything but basic commands, so if you try any scripts in them, you’re basically lost.

If you disagree, please read [WayBack] Don’t write Shell scripts. I would recommend Python, but I tried “pip search mysql”…. – Kristian Köhntopp – Google+) and [WayBack] How did this shit ever work? by the same author.

On the other hand: on many system, the baseline isn’t much more than a shell and a very limited tool set.

With nx like systems that usually comes down to sed and a shell like bash.

Since I wanted to modify an openssh hardening script to cover more permutations that was using sed in a bash script, I had not much choice but to bite the bullet.

TL;DR:

When you use any of the below characters, prepend them with a backslash as they have a bash meaning in addition to a sed meaning.

  • ? becomes \?
  • ( becomes \(
  • ) becomes \)
  • | becomes \|

The script

Hopefully by now it’s [Archive.is] been merged into https://github.com/comotion/gone/blob/github/modules/ssh. If not, it’s at https://github.com/jpluimers/gone/blob/jpluimers-ssh-hardening-patch/modules/ssh.

The diff: [Archive.is] https://github.com/jpluimers/gone/commit/329bf12a320704080e68eee90f4c099e92d8388d?diff=unified

The relevant portion (which also uses backslashes as line continuation and wrap a command over multiple lines [WayBack]):

sed -i \
-e 's/#\?MaxAuthTries *[0-9]*.*/MaxAuthTries 2/' \
-e 's/#\?PermitRootLogin *\(yes\|no\).*/PermitRootLogin no/' \
-e 's/#\?UsePrivilegeSeparation *\(yes\|no\|sandbox\).*/UsePrivilegeSeparation sandbox/' \
-e 's/#\?StrictModes *\(yes\|no\).*/StrictModes yes/' \
-e 's/#\?IgnoreRhosts *\(yes\|no\).*/IgnoreRhosts yes/' \
-e 's/#\?PermitEmptyPasswords *\(yes\|no\).*/PermitEmptyPasswords no/' \
-e 's/#\?ChallengeResponseAuthentication *\(yes\|no\).*/ChallengeResponseAuthentication yes/' \
-e 's/#\?KerberosAuthentication *\(yes\|no\).*/KerberosAuthentication no/' \
-e 's/#\?GSSAPIAuthentication *\(yes\|no\).*/GSSAPIAuthentication no/' \
-e 's/#\?GatewayPorts *\(yes\|no\).*/GatewayPorts no/' \
-e 's/#\?X11Forwarding *\(yes\|no\).*/X11Forwarding no/' \
-e 's/#\?PrintMotd *\(yes\|no\).*/PrintMotd no/' \
-e 's/#\?PrintLastLog *\(yes\|no\).*/PrintLastLog yes/' \
-e 's/#\?TCPKeepAlive *\(yes\|no\).*/TCPKeepAlive no/' \
-e 's/#\?PermitUserEnvironment *\(yes\|no\).*/PermitUserEnvironment no/' \
-e 's/^\(HostKey .*ssh_host_dsa_key\)/#\1/' \
sshd_config

More on sshd hardening

In case I have to revisit the script again, here are some more links on ssh and hardening from my blog posts:

–jeroen

 

 

 

Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, sed, sed script, Software Development | Leave a Comment »

WoL (Wake on LAN) from various routers

Posted by jpluimers on 2019/02/25

Until recently, I hardly used Wake on LAN, so I never noticed that many routers nowadays can send WoL requests themselves.

A few links:

And a few ones from my previous WoL related posts:

–jeroen

Posted in Ethernet, Network-and-equipment, Power User, Wake-on-LAN (WoL) | Leave a Comment »

How to hide an entire drive from prying eyes on Windows 10 | Windows Central

Posted by jpluimers on 2019/02/25

For my link archive: 3 ways to hide drive letters.

TL;DR:

  1. Using diskman.msc (Disk Management) by removing drive letters or/and changing the mount point to be in another drive.
  2. Using regedit.exe (or other Registry Editor like reg.exe) for a bitmap of drive letters to add a value named [WayBackNoDrives to
    • globally to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    • locally for the current user to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Using secpol.msc (Local Security Policy editor, or find it through gpedit.msc) to add a security policy similar to the registry.

Source: [WayBackHow to hide an entire drive from prying eyes on Windows 10 | Windows Central

After setting NoDrive you have to reboot (logoff/logon isn’t sufficient).

For the NoDrive bitmap: these list below has the values to add for each drive to hide, but it’s easier to use the [WayBackNT Drive Calculator – The ‘NoDrives’ Registry Key Value Calculator which calculates the Decimal version of the value needed.

Read the rest of this entry »

Posted in Power User, Windows, Windows 10 | Leave a Comment »

If you are looking for good Travis engineers, look at the #TravisAlums hashtag on Twitter

Posted by jpluimers on 2019/02/23

Idera is laying of a lot of really good Travis engineers.

If you want to hire them, then follow the [Archive.is] #TravisAlums hashtag on Twitter

Via: [WayBackJosé León Serna on Twitter: “Idera acquired Embarcadero Technologies in 2016 and fired almost all its R&D (150+ people in Spain, Russia, US, etc) so not sure why #TravisAlums are surprised, that’s what they do, that’s their business model.”

–jeroen

Posted in Continuous Integration, Development, Software Development, TravisCI | Leave a Comment »

Ubiquity UniFi SDN – Server status “UniFi Controller is starting up… Please wait a moment”

Posted by jpluimers on 2019/02/22

When your UniFi Cloud Key web interface shows this [Archive.is] after upgrading:

 

UniFi Controller is starting up…

Please wait a moment

 

Then you just ran into a bug which seems to occur most with 5.9.29 of the UniFi software: [Archive.is] “UniFi Controller is starting up…” “Please wait a moment” “5.9.29” – Google Search

The easiest way is to restore from a backup: this usually works.

For that you need ssh access, which usually is with the ubnt user. But you could have made life more complicated when you followed these:

Steps from [WayBack] UniFi Controller is starting up… Please Wait A Moment – Ubiquiti Networks Community (thanks [Archive.is] About mrfoxdk – Ubiquiti Networks Community!):

  1. SSH to the Unifi CloudKey
  2. dpkg -P unifi
  3. Open a browser and browse the URL of CloudKey
  4. Login
  5. Press “Install” under UniFi
  6. Wait for the process to complete, and then wait a bit for the service to be brought online.
  7. Recover the configuration backup from the latest backup

Removing and reinstalling the UniFi software, then restore from backup

Step 2 above will purge the unifi software of the cloud key as per dpkg --help:

Read the rest of this entry »

Posted in *nix, Power User, Ubiquiti, WiFi | Leave a Comment »