Monday, February 20, 2023

Tim Hortons phishing email with subject We have been trying to reach you, your reward is waiting!

For the record, this is a Tim Hortons phishing email attempt that is recently going around, with subject "We have been trying to reach you, your reward is waiting!"

What to do?  Report them, goto bottom of page. 


From : Win Tim Hortons <info@contq.com>
Subject : 
 We have been trying to reach you, your reward is waiting!

                       





Following the link







PHISHING LINKs;


1. 
http://212.3.116.142/rd/xxx...

How to tell this is a Phishing email ?

  1. Check email address in full, if it's not from originating company then it's phishing.
  2. Hover over all links in email, if it's not from the  company's website then forget it.
  3. The best way is to 

How to examine Email Message Source ?

Now lets look at message source
  1. Outlook.com->Actions->View Message Source. 
  2. Gmail.com->More (down arrow to top right)->Show original.
Check for suspicious links, anything that does not originate from apple.com.


Report Phishing Email (not as Spam)

  1. Outlook.com->Junk (at Top)->Phishing Scam
  2. Gmail.com->More (down-arrow to top right)->Report Phishing 

Report Phishing

If you have received this email take it further at 

  1. https://www.google.com/safebrowsing/report_phish/


Report phishing at Microsoft and subsequently government agencies

  1. http://www.microsoft.com/security/online-privacy/phishing-faq.aspx
  2. Report Phishing Sites | CISA
  3. Home - Canada's Anti-Spam Legislation (fightspam.gc.ca)

Sunday, February 19, 2023

Wordpress Fixing WooCommerce 7.3.0+ Uncaught TypeError Cookies is defined

How to fix WooCommerce 7.3.0+ Uncaught TypeError : Cookies is undefined 

Recently, upgraded WooCommerce to Version 7.3.0.  

Strangely, I was getting the following error 


The following WooCommerce scripts was included for cookies

1
plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js

Turns out v2.1.4 was release Apr 3, 2017

1
2
3
4
5
6
7
8
/*!
 * JavaScript Cookie v2.1.4
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function (factory) {

Solution 

Upgrading to v3.0.1 released Sep 1, 2021, cleared the error. Why is this not part of the WooCommerce plugin upgrade? 

CDN - https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.js

1
2
wp_deregister_script( 'jquery-cookie' );
wp_enqueue_script( 'jquery-cookie', 'https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js', array( 'jquery' ), '3.0.1', true );

Saturday, February 18, 2023

WordPress on Submit / Submissions goes to blank screen

 









Recently, witnessed an odd behavior on a WordPress site I maintain.

  1. As logged in Administrator, and submit button would lead to blank screen, execute but not forward to next page.
  2. As logged in Administrator, deleting a user, when selecting delete all contents, this would lead to a blank screen, execute but not forward. Refreshing screen, says user does not exist. 
  3. As a user, of site any submission would lead to a blank screen. 
It was annoying and took me some time to find the issue, checked the error_log indicated the problem. 

1
[18-Feb-2023 07:14:33 UTC] PHP Warning:  Cannot modify header information - 
headers already sent by (output started at /home/bond007/public_html/wp-content/themes/James/
functions.php:1) in 


But after I restored a previous version of functions.php I could not find any differences, using WinMerge

I opened the file in VSCode, could not find anything on line 1 wrong. 








I opened the file in Notepad++, could not find anything on line 1 wrong. 









Then I opened the file in Fred an open-source hex editor. 





So then I remember, allong time ago, in far off land, I got BOMed. 

Issue: 

You should ensure that the included files do not start with a BOM.

You may also find that the BOM causes problems for an ordinary PHP page. When sending custom HTTP headers the code to set the header must be called before output begins. A BOM at the start of the file causes the page to begin output before the header command is interpreted, and may lead to error messages and other problems in the displayed page.

Src: https://www.w3.org/International/questions/qa-byte-order-mark

Solution:

Change Encoding type in Notepad++ to UTF-8. Then save.


Tips:

Pay attention to the bottom of your editor for the file type. 



















Thursday, February 16, 2023

Tail for Windows 10


















Tial is orginally a Unix command that has been ported to Windows that prints last ‘N’ lines of any text file.

Tail command for Windows is one to the tools in the Windows Server 2003 Resource Kit Tools free upgrade provided by Microsoft. It has been discounted and not available from official Microsoft support sites any longer. Luckily, we have the Way Back Machine to our rescue.

Getting tail command for Windows

Firstly, download Windows resource kit from the Internet Archive link

📂Microsoft Windows Server 2003 Resource Kit Tools (English) : Microsoft Corporation : Free Download, Borrow, and Streaming : Internet Archive

Run the en_windows_server_2003_reskit.exe


It installs the tools in the default directory C:\Program Files\Windows Resource Kits\Tools

Add path to Environment Variable to avoid changing directory to the install directory
How to: Add Tool Locations to the PATH Environment Variable | Microsoft Learn

or unzip the msi and copy tail.exe to C:\Windows\System32 

  1. Download 7-Zip from this page and install it.
  2. Right-click on the .exe file (menu choose 7-Zip > Extract to "en_windows_server_2003_reskit\")
  3. Navigate to folder and right-click on the rktools.msi file (from the menu choose 7-Zip > Extract to "rktools\"
  4. Navigate to folder and copy tail.exe to c:\Windows\System32

Tail command usage

C:\Program Files\Windows Resource Kits\Tools>tail.exe /?
usage: TAIL [switches] [filename]*
switches: [-?] display this message
[-n] display last n lines of each file (default 10)
[-f filename] keep checking filename for new lines

Examples:

To print the last 10 lines of the file  data.txt:

tail -10 A.txt

To print the data as and when it’s added to the file:

tail -f A.txt

The above command is mostly used for viewing log files contents while more data is being written to them. Tail command with -f option does not terminate until the user presses [Ctrl]-[C].

Windows Server 2003 Resource Kit Tools available commands;  

The following tools are provided:

  • Acctinfo.dll (documented in Readme.htm)
  • Adlb.exe: Active Directory Load Balancing Tool
  • Admx.msi: ADM File Parser
  • Atmarp.exe: Windows ATM ARP Server Information Tool
  • Atmlane.exe: Windows ATM LAN Emulation Client Information
  • Autoexnt.exe: AutoExNT Service
  • Cdburn.exe: ISO CD-ROM Burner Tool
  • Checkrepl.vbs: Check Replication
  • Chklnks.exe: Link Check Wizard
  • Chknic.exe: Network Interface Card Compliance Tool for Network Load Balancing
  • Cleanspl.exe: Spooler Cleaner
  • Clearmem.exe: Clear Memory
  • Clusdiag.msi: Cluster Diagnostics and Verification Tool
  • Clusfileport.dll: Cluster Print File Port
  • Clusterrecovery.exe: Server Cluster Recovery Utility
  • Cmdhere.inf: Command Here
  • Cmgetcer.dll: Connection Manager Certificate Deployment Tool
  • Compress.exe: Compress Files
  • Confdisk.exe: Disk Configuration Tool
  • Consume.exe: Memory Consumers Tool
  • Creatfil.exe: Create File
  • Csccmd.exe: Client-Side Caching Command-Line Options
  • Custreasonedit.exe: Custom Reason Editor (documented in Readme.htm)
  • Delprof.exe: User Profile Deletion Utility
  • Dh.exe: Display Heap
  • Diskraid.exe: RAID Configuration Tool
  • Diskuse.exe: User Disk Usage Tool
  • Dnsdiag.exe: SMTP DNS Diagnostic Tool (documented in Readme.htm)
  • Dumpfsmos.cmd: Dump FSMO Roles
  • Dvdburn.exe: ISO DVD Burner Tool
  • Empty.exe: Free Working Set Tool
  • Eventcombmt.exe: Check Replication
  • Fcopy.exe: File Copy Utility for Message Queuing
  • Frsflags.vbs
  • Getcm.exe: Connection Manager Profile Update
  • Gpmonitor.exe: Group Policy Monitor
  • Gpotool.exe: Group Policy Objects
  • Hlscan.exe: Hard Link Display Tool
  • Ifilttst.exe: IFilter Test Suite
  • Ifmember.exe: User Membership Tool
  • Inetesc.adm: Internet Explorer Enhanced Security Configuration
  • Iniman.exe: Initialization Files Manipulation Tool
  • Instcm.exe: Install Connection Manager Profile
  • Instsrv.exe: Service Installer
  • Intfiltr.exe: Interrupt Affinity Tool
  • Kerbtray.exe: Kerberos Tray
  • Kernrate.exe: Kernel Profiling Tool
  • Klist.exe: Kerberos List
  • Krt.exe: Certification Authority Key Recovery
  • Lbridge.cmd: L-Bridge
  • Linkd.exe
  • Linkspeed.exe: Link Speed
  • List.exe: List Text File Tool
  • Lockoutstatus.exe: Account Lockout Status (documented in Readme.htm)
  • Logtime.exe
  • Lsreport.exe: Terminal Services Licensing Reporter
  • Lsview.exe: Terminal Services License Server Viewer
  • Mcast.exe: Multicast Packet Tool
  • Memmonitor.exe: Memory Monitor
  • Memtriage.exe: Resource Leak Triage Tool
  • Mibcc.exe: SNMP MIB Compiler
  • Moveuser.exe: Move Users
  • Mscep.dll: Certificate Services Add-on for Simple Certificate Enrollment Protocol
  • Nlsinfo.exe: Locale Information Tool
  • Now.exe: STDOUT Current Date and Time
  • Ntimer.exe: Windows Program Timer
  • Ntrights.exe
  • Oh.exe: Open Handles
  • Oleview.exe: OLE/COM Object Viewer
  • Pathman.exe: Path Manager
  • Permcopy.exe: Share Permissions Copy
  • Perms.exe: User File Permissions Tool
  • Pfmon.exe: Page Fault Monitor
  • Pkiview.msc: PKI Health Tool
  • Pmon.exe: Process Resource Monitor
  • Printdriverinfo.exe: Drivers Source
  • Prnadmin.dll: Printer Administration Objects
  • Qgrep.exe
  • Qtcp.exe: QoS Time Stamp
  • Queryad.vbs: Query Active Directory
  • Rassrvmon.exe: RAS Server Monitor
  • Rcontrolad.exe: Active Directory Remote Control Add-On
  • Regini.exe: Registry Change by Script
  • Regview.exe (documented in Readme.htm)
  • Remapkey.exe: Remap Windows Keyboard Layout
  • Robocopy.exe: Robust File Copy Utility
  • Rpccfg.exe: RPC Configuration Tool
  • Rpcdump.exe
  • Rpcping.exe
  • RPing: RPC Connectivity Verification Tool
  • Rqc.exe: Remote Access Quarantine Client
  • Rqs.exe: Remote Access Quarantine Agent
  • Setprinter.exe: Spooler Configuration Tool
  • Showacls.exe
  • Showperf.exe: Performance Data Block Dump Utility
  • Showpriv.exe: Show Privilege
  • Sleep.exe: Batch File Wait
  • Sonar.exe: FRS Status Viewer
  • Splinfo.exe: Print Spooler Information
  • Srvany.exe: Applications as Services Utility
  • Srvcheck.exe: Server Share Check
  • Srvinfo.exe: Remote Server Information
  • Srvmgr.exe: Server Manager
  • Ssdformat.exe: System State Data Formatter
  • Subinacl.exe
  • Tail.exe - List last n line of a file
  • Tcmon.exe: Traffic Control Monitor
  • Timeit.exe (documented in Readme.htm)
  • Timezone.exe: Daylight Saving Time Update Utility
  • Tsctst.exe: Terminal Server Client License Dump Tool
  • Tsscalling.exe: Terminal Services Scalability Planning Tools
  • Uddicatschemeeditor.exe: UDDI Services Categorization Scheme Editor
  • Uddiconfig.exe: UDDI Services Command-line Configuration Utility
  • Uddidataexport.exe: UDDI Data Export Wizard
  • Usrmgr.exe: User Manager for Domains
  • Vadump.exe: Virtual Address Dump
  • Vfi.exe: Visual File Information
  • Volperf.exe: Shadow Copy Performance Counters
  • Volrest.exe: Shadow Copies for Shared Folders Restore Tool
  • Vrfydsk.exe: Verify Disk
  • Winexit.scr: Windows Exit Screen Saver
  • Winhttpcertcfg.exe: WinHTTP Certificate Configuration Tool
  • Winhttptracecfg.exe: WinHTTP Tracing Facility Configuration Tool
  • Winpolicies.exe: Policy Spy
  • Wins.dll: WINS Replication Network Monitor Parser
  • Wlbs_hb.dll & Wlbs_rc.dll: Windows Load Balancing Server Network Monitor Parsers


Tuesday, February 7, 2023

Tail Command for Windows


















Tial is orginally a Unix command that has been ported to Windows that prints last ‘N’ lines of any text file.

Tail command for Windows is one to the tools in the Windows Server 2003 Resource Kit Tools free upgrade provided by Microsoft. It has been discounted and not available from official Microsoft support sites any longer. Luckily, we have the Way Back Machine to our rescue.

Getting tail command for Windows

Firstly, download Windows resource kit from the Internet Archive link

📂Microsoft Windows Server 2003 Resource Kit Tools (English) : Microsoft Corporation : Free Download, Borrow, and Streaming : Internet Archive

Run the en_windows_server_2003_reskit.exe


It installs the tools in the default directory C:\Program Files\Windows Resource Kits\Tools

Add path to Environment Variable to avoid changing directory to the install directory
How to: Add Tool Locations to the PATH Environment Variable | Microsoft Learn

or unzip the msi and copy tail.exe to C:\Windows\System32 

  1. Download 7-Zip from this page and install it.
  2. Right-click on the .exe file (menu choose 7-Zip > Extract to "en_windows_server_2003_reskit\")
  3. Navigate to folder and right-click on the rktools.msi file (from the menu choose 7-Zip > Extract to "rktools\"
  4. Navigate to folder and copy tail.exe to c:\Windows\System32

Tail command usage

C:\Program Files\Windows Resource Kits\Tools>tail.exe /?
usage: TAIL [switches] [filename]*
switches: [-?] display this message
[-n] display last n lines of each file (default 10)
[-f filename] keep checking filename for new lines

Examples:

To print the last 10 lines of the file  data.txt:

tail -10 A.txt

To print the data as and when it’s added to the file:

tail -f A.txt

The above command is mostly used for viewing log files contents while more data is being written to them. Tail command with -f option does not terminate until the user presses [Ctrl]-[C].

Windows Server 2003 Resource Kit Tools available commands;  

The following tools are provided:

  • Acctinfo.dll (documented in Readme.htm)
  • Adlb.exe: Active Directory Load Balancing Tool
  • Admx.msi: ADM File Parser
  • Atmarp.exe: Windows ATM ARP Server Information Tool
  • Atmlane.exe: Windows ATM LAN Emulation Client Information
  • Autoexnt.exe: AutoExNT Service
  • Cdburn.exe: ISO CD-ROM Burner Tool
  • Checkrepl.vbs: Check Replication
  • Chklnks.exe: Link Check Wizard
  • Chknic.exe: Network Interface Card Compliance Tool for Network Load Balancing
  • Cleanspl.exe: Spooler Cleaner
  • Clearmem.exe: Clear Memory
  • Clusdiag.msi: Cluster Diagnostics and Verification Tool
  • Clusfileport.dll: Cluster Print File Port
  • Clusterrecovery.exe: Server Cluster Recovery Utility
  • Cmdhere.inf: Command Here
  • Cmgetcer.dll: Connection Manager Certificate Deployment Tool
  • Compress.exe: Compress Files
  • Confdisk.exe: Disk Configuration Tool
  • Consume.exe: Memory Consumers Tool
  • Creatfil.exe: Create File
  • Csccmd.exe: Client-Side Caching Command-Line Options
  • Custreasonedit.exe: Custom Reason Editor (documented in Readme.htm)
  • Delprof.exe: User Profile Deletion Utility
  • Dh.exe: Display Heap
  • Diskraid.exe: RAID Configuration Tool
  • Diskuse.exe: User Disk Usage Tool
  • Dnsdiag.exe: SMTP DNS Diagnostic Tool (documented in Readme.htm)
  • Dumpfsmos.cmd: Dump FSMO Roles
  • Dvdburn.exe: ISO DVD Burner Tool
  • Empty.exe: Free Working Set Tool
  • Eventcombmt.exe: Check Replication
  • Fcopy.exe: File Copy Utility for Message Queuing
  • Frsflags.vbs
  • Getcm.exe: Connection Manager Profile Update
  • Gpmonitor.exe: Group Policy Monitor
  • Gpotool.exe: Group Policy Objects
  • Hlscan.exe: Hard Link Display Tool
  • Ifilttst.exe: IFilter Test Suite
  • Ifmember.exe: User Membership Tool
  • Inetesc.adm: Internet Explorer Enhanced Security Configuration
  • Iniman.exe: Initialization Files Manipulation Tool
  • Instcm.exe: Install Connection Manager Profile
  • Instsrv.exe: Service Installer
  • Intfiltr.exe: Interrupt Affinity Tool
  • Kerbtray.exe: Kerberos Tray
  • Kernrate.exe: Kernel Profiling Tool
  • Klist.exe: Kerberos List
  • Krt.exe: Certification Authority Key Recovery
  • Lbridge.cmd: L-Bridge
  • Linkd.exe
  • Linkspeed.exe: Link Speed
  • List.exe: List Text File Tool
  • Lockoutstatus.exe: Account Lockout Status (documented in Readme.htm)
  • Logtime.exe
  • Lsreport.exe: Terminal Services Licensing Reporter
  • Lsview.exe: Terminal Services License Server Viewer
  • Mcast.exe: Multicast Packet Tool
  • Memmonitor.exe: Memory Monitor
  • Memtriage.exe: Resource Leak Triage Tool
  • Mibcc.exe: SNMP MIB Compiler
  • Moveuser.exe: Move Users
  • Mscep.dll: Certificate Services Add-on for Simple Certificate Enrollment Protocol
  • Nlsinfo.exe: Locale Information Tool
  • Now.exe: STDOUT Current Date and Time
  • Ntimer.exe: Windows Program Timer
  • Ntrights.exe
  • Oh.exe: Open Handles
  • Oleview.exe: OLE/COM Object Viewer
  • Pathman.exe: Path Manager
  • Permcopy.exe: Share Permissions Copy
  • Perms.exe: User File Permissions Tool
  • Pfmon.exe: Page Fault Monitor
  • Pkiview.msc: PKI Health Tool
  • Pmon.exe: Process Resource Monitor
  • Printdriverinfo.exe: Drivers Source
  • Prnadmin.dll: Printer Administration Objects
  • Qgrep.exe
  • Qtcp.exe: QoS Time Stamp
  • Queryad.vbs: Query Active Directory
  • Rassrvmon.exe: RAS Server Monitor
  • Rcontrolad.exe: Active Directory Remote Control Add-On
  • Regini.exe: Registry Change by Script
  • Regview.exe (documented in Readme.htm)
  • Remapkey.exe: Remap Windows Keyboard Layout
  • Robocopy.exe: Robust File Copy Utility
  • Rpccfg.exe: RPC Configuration Tool
  • Rpcdump.exe
  • Rpcping.exe
  • RPing: RPC Connectivity Verification Tool
  • Rqc.exe: Remote Access Quarantine Client
  • Rqs.exe: Remote Access Quarantine Agent
  • Setprinter.exe: Spooler Configuration Tool
  • Showacls.exe
  • Showperf.exe: Performance Data Block Dump Utility
  • Showpriv.exe: Show Privilege
  • Sleep.exe: Batch File Wait
  • Sonar.exe: FRS Status Viewer
  • Splinfo.exe: Print Spooler Information
  • Srvany.exe: Applications as Services Utility
  • Srvcheck.exe: Server Share Check
  • Srvinfo.exe: Remote Server Information
  • Srvmgr.exe: Server Manager
  • Ssdformat.exe: System State Data Formatter
  • Subinacl.exe
  • Tail.exe - List last n line of a file
  • Tcmon.exe: Traffic Control Monitor
  • Timeit.exe (documented in Readme.htm)
  • Timezone.exe: Daylight Saving Time Update Utility
  • Tsctst.exe: Terminal Server Client License Dump Tool
  • Tsscalling.exe: Terminal Services Scalability Planning Tools
  • Uddicatschemeeditor.exe: UDDI Services Categorization Scheme Editor
  • Uddiconfig.exe: UDDI Services Command-line Configuration Utility
  • Uddidataexport.exe: UDDI Data Export Wizard
  • Usrmgr.exe: User Manager for Domains
  • Vadump.exe: Virtual Address Dump
  • Vfi.exe: Visual File Information
  • Volperf.exe: Shadow Copy Performance Counters
  • Volrest.exe: Shadow Copies for Shared Folders Restore Tool
  • Vrfydsk.exe: Verify Disk
  • Winexit.scr: Windows Exit Screen Saver
  • Winhttpcertcfg.exe: WinHTTP Certificate Configuration Tool
  • Winhttptracecfg.exe: WinHTTP Tracing Facility Configuration Tool
  • Winpolicies.exe: Policy Spy
  • Wins.dll: WINS Replication Network Monitor Parser
  • Wlbs_hb.dll & Wlbs_rc.dll: Windows Load Balancing Server Network Monitor Parsers