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,862 other subscribers

Archive for January, 2021

datetime – Determine Whether Two Date Ranges Overlap – Stack Overflow

Posted by jpluimers on 2021/01/26

[WayBack] datetime – Determine Whether Two Date Ranges Overlap – Stack Overflow answer by Charles Bretana with input from Baodad and tomosius.

TL;DR (proof is in the post)

(StartA <= EndB) and (EndA >= StartB)

Alternative (also from the post):

DateRangesOverlap = max(StartA,StartB) < min(EndA,EndB)

It gets complicated when the date boundaries for A and B can be out of order.

The post also covers that.

Related:

–jeroen

Posted in Development, Software Development | Leave a Comment »

Delphi debugging tip: keep an eye on a object field of an object that will go out of scope eventually

Posted by jpluimers on 2021/01/26

Every once in a while you want to have a Delphi Watch of a field inside an object (say an object of type TContext), except that the field has no value yet, but eventually will point to another object (say an object of type TUser).

However, the original object will go out of scope, so you need to employ a few tricks.

First of all, you get the address of that field:

@(Context().FCurrentUser) = $7EF6F624

Then you watch the content of that field:

TUser(PPointer($7EF6F624)^),r = nil

To get to this trick, you have to remember:

  1. The contents of address $7EF6F624 is pointer (at first nil) to a TUser.
  2. You get to the contents of the address $7EF6F624 by using PPointer($7EF6F624)^.
  3. Then you cast it to the object you want with the TUser(...) cast.

–jeroen

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

PassProtect – Chrome Web Store

Posted by jpluimers on 2021/01/25

[Archive.is] PassProtect – Chrome Web Store:

Stop using bad passwords. PassProtect alerts you about breached credentials. Powered by “Have I Been Pwned?”.

Interesting plugin. Will try this soon.

Via:

–jeroen

 

Posted in Authentication, Chrome, Firefox, LifeHacker, Power User, Security, Web Browsers | Leave a Comment »

Windows events for Remote Desktop connections

Posted by jpluimers on 2021/01/25

Some notes and links, as eventually I want to react on Windows events raised for successful Remote Desktop connections.

Log-files:

  • Name Microsoft-Windows-TerminalServices-LocalSessionManager/Admin
  • Path %SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-TerminalServices-LocalSessionManager%4Admin.evtx
  • Name Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
  • Path %SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx

EventID 25:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-TerminalServices-LocalSessionManager" Guid="{5D896912-022D-40AA-A3A8-4FA5515C76D7}" /> 
<EventID>25</EventID> 
<Version>0</Version> 
<Level>4</Level> 
<Task>0</Task> 
<Opcode>0</Opcode> 
<Keywords>0x1000000000000000</Keywords> 
<TimeCreated SystemTime="2019-02-06T13:48:02.978377900Z" /> 
<EventRecordID>5358</EventRecordID> 
<Correlation ActivityID="{F4203346-1BFB-421E-8668-C7503D590000}" /> 
<Execution ProcessID="308" ThreadID="12552" /> 
<Channel>Microsoft-Windows-TerminalServices-LocalSessionManager/Operational</Channel> 
<Computer>MACHINE-NAME.subdomain.domain</Computer> 
<Security UserID="S-1-5-18" /> 
</System>
<UserData>
<EventXML xmlns="Event_NS">
<User>DOMAIN\jeroen</User> 
<SessionID>2</SessionID> 
<Address>192.168.1.42</Address> 
</EventXML>
</UserData>
</Event>

Links on the events:

Links on triggers and scripts running because of events:

 

 

 

–jeroen

Read the rest of this entry »

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

56 Linux Networking commands and scripts

Posted by jpluimers on 2021/01/25

Back in 2019, there were 56 commands and scripts covered. I wonder how many there are now.

An ongoing list of Linux Networking Commands and Scripts. These commands and scripts can be used to configure or troubleshoot your Linux network.

Source: [WayBack55 Linux Networking commands and scripts

List back then (which goes beyond just built-in commands: many commands from optional packages are here as well):

  1. arpwatch – Ethernet Activity Monitor.
  2. bmon – bandwidth monitor and rate estimator.
  3. bwm-ng – live network bandwidth monitor.
  4. curl – transferring data with URLs. (or try httpie)
  5. darkstat – captures network traffic, usage statistics.
  6. dhclient – Dynamic Host Configuration Protocol Client
  7. dig – query DNS servers for information.
  8. dstat – replacement for vmstat, iostat, mpstat, netstat and ifstat.
  9. ethtool – utility for controlling network drivers and hardware.
  10. gated – gateway routing daemon.
  11. host – DNS lookup utility.
  12. hping – TCP/IP packet assembler/analyzer.
  13. ibmonitor – shows bandwidth and total data transferred.
  14. ifstat –  report network interfaces bandwidth.
  15. iftop – display bandwidth usage.
  16. ip (PDF file) – a command with more features that ifconfig (net-tools).
  17. iperf3 – network bandwidth measurement tool. (above screenshot Stacklinux VPS)
  18. iproute2 – collection of utilities for controlling TCP/IP.
  19. iptables – take control of network traffic.
  20. IPTraf – An IP Network Monitor.
  21. iputils – set of small useful utilities for Linux networking.
  22. jwhois (whois) – client for the whois service.
  23. “lsof -i” – reveal information about your network sockets.
  24. mtr – network diagnostic tool.
  25. net-tools – utilities include: arp, hostname, ifconfig, netstat, rarp, route, plipconfig, slattach, mii-tool, iptunnel and ipmaddr.
  26. ncat – improved re-implementation of the venerable netcat.
  27. netcat – networking utility for reading/writing network connections.
  28. nethogs – a small ‘net top’ tool.
  29. Netperf – Network bandwidth Testing.
  30. netsniff-ng – Swiss army knife for daily Linux network plumbing.
  31. netstat – Print network connections, routing tables, statistics, etc.
  32. netwatch – monitoring Network Connections.
  33. ngrep – grep applied to the network layer.
  34. nload – display network usage.
  35. nmap – network discovery and security auditing.
  36. nslookup – query Internet name servers interactively.
  37. ping – send icmp echo_request to network hosts.
  38. route – show / manipulate the IP routing table.
  39. slurm – network load monitor.
  40. snort – Network Intrusion Detection and Prevention System.
  41. smokeping –  keeps track of your network latency.
  42. socat – establishes two bidirectional byte streams and transfers data between them.
  43. speedometer – Measure and display the rate of data across a network.
  44. speedtest-cli – test internet bandwidth using speedtest.net
  45. ss – utility to investigate sockets.
  46. ssh –  secure system administration and file transfers over insecure networks.
  47. tcpdump – command-line packet analyzer.
  48. tcptrack – Displays information about tcp connections on a network interface.
  49. telnet – user interface to the TELNET protocol.
  50. tracepath – very similar function to traceroute.
  51. traceroute – print the route packets trace to network host.
  52. vnStat – network traffic monitor.
  53. wget –  retrieving files using HTTP, HTTPS, FTP and FTPS.
  54. Wireless Tools for Linux – includes iwconfig, iwlist, iwspy, iwpriv and ifrename.
  55. Wireshark – network protocol analyzer.

Via:

–jeroen

Posted in *nix, *nix-tools, cURL, dig, Internet, nmap, Power User, SpeedTest, ssh/sshd, tcpdump, Wireshark | Leave a Comment »

Some Dutch curfew (avondklok) links, including English forms (at the bottom of the post)

Posted by jpluimers on 2021/01/24

Valid reasons:

English (Dutch)

  • I need to work and I have an employer’s declaration with me. (Ik moet werken en heb de Werkgeversverklaring Avondklok
    bij me).
  • I need urgent medical assistance or my pet needs urgent veterinary assistance. (Ik heb dringend medische hulp nodig of
    een dier heeft dringend medische hulp nodig).

    • Explanation (Toelichting):
  • Someone needs my urgent assistance. (Iemand anders heeft dringend mijn hulp nodig).
    • Explanation (Toelichting):
  • I am travelling to a destination outside the Netherlands and I have travel documents and other documents
    proving this is the reason I need to be outdoors between 21:00 and 04:30. (Ik reis naar het buitenland en kan met (reis)
    documenten aantonen dat ik daarom tussen 21.00 – 04.30 uur buiten ben.)
  • I am going to or returning from a funeral and I can prove this. (Ik ben onderweg van of naar een uitvaart en kan dit aantonen).
  • I am travelling in connection with a summons issued by a court or public prosecutor, or in connection with a court
    hearing in objection, judicial review or appeal proceedings, and I can prove this. (Ik ben onderweg in verband met een
    oproep van een rechter, officier van justitie of bezwaar- of beroepschriftencommissie en kan dit aantonen).
  • I am travelling to or from a live programme and have an invitation from the broadcaster to prove this. (Ik ben
    onderweg van of naar een live-programma en kan dit aantonen met een uitnodiging van de omroep die dit programma uitzendt.)
  • I am going to or returning from an exam that I must sit and I can prove this (applies to students in secondary
    vocational education (MBO) and higher education (HBO and university)). (Ik ben onderweg van of naar een examen of
    tentamen dat ik moet afleggen voor mijn opleiding op het mbo, hbo of wo en kan dit aantonen.)

Dutch

  • Ik moet werken en heb de Werkgeversverklaring Avondklok bij me.
  • Ik heb dringend medische hulp nodig of een dier heeft dringend medische hulp nodig. Toelichting:
  • Iemand anders heeft dringend mijn hulp nodig. Toelichting:
  • Ik reis naar het buitenland en kan met (reis)documenten aantonen dat ik daarom tussen 21.00 en 04.30 uur buiten ben.
  • Ik ben onderweg van of naar een uitvaart en kan dit aantonen.
  • Ik ben onderweg in verband met een oproep van een rechter, officier van justitie of bezwaar- of beroepschriftencommissie en kan dit aantonen.
  • Ik ben onderweg van of naar een live-programma en kan dit aantonen met een uitnodiging van de omroep die dit programma uitzendt.
  • Ik ben onderweg van of naar een examen of tentamen dat ik moet afleggen voor mijn opleiding op het mbo, hbo of wo en kan dit aantonen.

For my link archive:

–jeroen

Posted in About, LifeHacker, Personal, Power User | Leave a Comment »

Ruimere tijden grofvuil wegens avondklok – Gemeente Amsterdam

Posted by jpluimers on 2021/01/24

U kunt uw afval de avond voor de ophaaldag vanaf 18.00 uur buiten zetten. Op de ophaaldag kunt u uw afval voor 7.00 uur buiten zetten.

Source: [Wayback] Ruimere tijden grofvuil wegens avondklok – Gemeente Amsterdam

–jeroen

Posted in About, LifeHacker, Power User | Leave a Comment »

Ga met een gerust hart op vakantie met WoonVeilig beveiligingsset – CooleSuggesties

Posted by jpluimers on 2021/01/22

Ik had al eerder over woonveilig geschreven (Ik ben wat verward over de @WoonVeilig site. https://t.co/ui8agTkgM9 heeft het bijvoorbeeld over GATE-03 en GATE-02, maar…), nu iets meer over de installatie handleidingen van GATE-03:

De aanmeldprocedure brengt je naar [Archive.isalarmsysteem.woonveilig.nl/nl_NL_woonveilig/registratie, die voor registratie nog verwijst naar:

Een paar tips tijdens de registratie en gebruik:

–jeroen

 

Posted in LifeHacker, Power User, Security | Leave a Comment »

Anyone tried #Telegram to communicate securely?

Posted by jpluimers on 2021/01/22

Below are a few comments from [WayBack] Anyone tried #Telegram to communicate securely? Some nice features there… Looks way more secure than WeChat and all that. Thoughts? https://telegram…. – Jason Mayes – Google+.

The consensus seems to be

  • Signal is the way to go for secure chat. It is open source too.
  • When chatting with groups of people, there is technical security, but not social security.
  • Telegram is easier to use than some other chat platforms, and has a large user base.

The comments:

  • Ryan Ostendorf's profile photo
    Telegram is pretty nice, but its security leaves much to be desired. If it’s security and true privacy you want, Signal is the way to go.
  • M.A. Zaki's profile photo
    Hi+Ryan Ostendorf signal is indeed a way to go but didn’t have big users number compared to Telegram.
  • Wayne Harris's profile photo

    I use telegram, discord, slack & hangouts for variousn groups i talk with. Of those, telegeam is my preferred for ease of use etc. One thing i would like to see is a “index” of groups to maybe easier prioritise what i want to read (a-la how discord wokrs with its different servers) but im so used to the flat style of telegram/hangouts that i dont have a huge issue with its current design

    Re security, im not an expert, but it seems ok, with multuple options available. Havent heard of anything being intercepted/hacked, but who really know what our alien overlords – err governments – and other interested parties are up to behind the scenes.

  • oon arfiandwi (OonID)'s profile photo
    I use telegram more than whatsapp. I found many technical group discussion (at least for Indonesian) because telegram supports a huge amount of members per group.
    also, the telegram bot and channel give a unique feature for a developer to build an application on top of it.
  • Jason Mayes's profile photo
    +Ryan Ostendorf oooh thanks I shall check it out
  • Jason Mayes's profile photo
    Thanks everyone for feedback!
  • Leo Turing's profile photo
    I am using Telegram for 5 years now. Far faster and better than WhatsApp in many ways.
  • Christopher Gaul's profile photo

    It’s security level depends on who you ask. If you take their word at face value it’s great. If you believe the rumors it’s totally bent by U.S. surveillance agencies.

    Feature wise it’s decent otherwise.

    A few of us are on the hunt for a good, secure, multi platform messaging platform to replace Hangouts when they kill that. We’ve narrowed it down to a few that we’re testing.

    Signal was good until they killed their linux and browser clients.

    Retroshare is on the to test list along with…

    Viber.

    Tox.

  • epsi nurwijayadi's profile photo

    I have been a telegram user since october 2017.

    And I wonder, how do telegram make profit.

    Who is paying for the server to be alive ?

  • Christopher Gaul's profile photo
    Side note. You can just assume that any product based out of the U.S. or any Five Eyes country is not secure. I wouldn’t trust anything EU based either. What’s that leave you?
  • Christopher Gaul's profile photo
    +epsi nurwijayadi
    The NSA no doubt is footing the bills.
  • x Meta x's profile photo
    For dependable privacy, I use two cans and a string.
  • Jason Mayes's profile photo
    +x Meta x I can use a laser pointed at your string to measure the sound being transferred over it though
  • x Meta x's profile photo

    +Jason Mayes …..

    …. Curses! Foiled again!

  • Wayne Harris's profile photo
    I use the postal service. Nobody sends anything via that these days other than birthday cards from Nanna’s, so my most private missives go conpletely un-noticed by the authorities
  • epsi nurwijayadi's profile photo
  • Jason ON's profile photo
    I downloaded Telegram yesterday, in fact. Haven’t had a chance to try it out yet as I don’t know anyone using it. I had thought it would be more like BBM, with public groups in a social media-lite feature, but it’s not.
  • M.A. Zaki's profile photo
    +Jason ON telegram got more than that. The setting let you do much more.
  • epsi nurwijayadi's profile photo
    I remember getting very happy, when I got telegram from my father when I was a kid in about 80s. He had duty in other island faraway from home.
  • Willem Oosting's profile photo

    +Jason Mayes Check out Keybase.io they strike a sweet balance between Wire-like security (encrypted group chats), and Telegram-like usability/looks. And I thought it’s FOSS!

    Keybase

    Keybase
    keybase.io
  • Robert Wallis's profile photo

    Telegram has a very tempting feature set for a “messaging” service.

    I have recently started using it. Top reasons I like it so far are the ability to add a username, which means I can be available without giving people my phone number.

    My URL 👉 t.me/qwallis

    Also the ability to have branded public broadcast channels is different. I’ve set one up for London Meet-ups for +Happening London the URL for that is here 👉 t.me/HappeningLondon

    Any public post cam be embedded, so I’m surfacing the next meet-up on the +Happening London web site too 👉 happeninglondon.co.uk

    Those feature (and others) make Telegram interesting.

  • Christopher Gaul's profile photo

    +Robert Wallis I agree. With the caveat that this is as long as you aren’t expecting 100% guaranteed secure communications.

    Of course the question of whether such a thing even exists is valid. But in Telegram’s case, at least expect your local Five Eyes government surveillance state to be “reading” them.

  • Jonas Hellström (shellström)'s profile photo
    I’m giving Matrix/Synapse and riot.im a whirl.
    Mostly because I can selfhost it, and it’s got some good things going for it, like encrypted convos.
    They still got a mile or two on their clients and that’s where I’m holding off on inviting everyone and their dogs until there’s something that can be used by more people without becoming a troubleshooting nightmare/”this isn’t as easy as whatsapp. Can’t we use messenger instead?” kind of deal.

    Riot – Riot – open team collaboration

    Riot – Riot – open team collaboration
    about.riot.im
  • Robert Wallis's profile photo

    +Christopher Gaul yeah, but where aren’t they?

    As far as I understand Telegram has been validated for “secret chats” between two users, where security models are more easily implemented, but for groups of up to 200,00 that’s never going to be “secret” just hidden, and public broadcast channels are … well public.

–jeroen

Posted in Chat, Keybase, LifeHacker, Power User, Security, SocialMedia, Telegram | Leave a Comment »

Limiting Google Research to multiple web-sites using the OR and site: operators

Posted by jpluimers on 2021/01/22

I knew Google Search had a site: operator and I thought you could or them together using something like this:

reboot site:superuser.com or site:android.stackexchange.com

To my surprise that returned zero results as in empty result list.

Indeed: the OR needs to be in uppercase to work:

you can use the OR operator to add another site to your query:

reboot site:superuser.com OR site:android.stackexchange.com

–jeroen

Source: How to limit Google search result to a set of websites? – Web Applications Stack Exchange [WayBack]

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