MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
April
Sun Mon Tue Wed Thu Fri Sat
           
           
2017
Months
Apr


Sun, Apr 30, 2017 8:33 pm

SORBS Blocking Email from Gmail

A family member reported that she hadn't received an email message sent to her today by a Gmail user who had sent her message in reply to the family member's email to her. Since I administer the Sendmail email server she uses, I checked the Sendmail log file at /var/log/maillog. I saw the outgoing email sent to the Gmail address, but no incoming email from that address. So I sent email messages from a Gmail account I have as well as email messages from other external addresses to the root account on the server. The other email messages arrived, but none I sent from the Gmail account arrived. So I ran tcpdump on the server to capture data to/from port 25 on the system, which is the well-known port for Simple Mail Transfer Protocol (SMTP) traffic. I then sent another email message to the root account on the Sendmail server from my Gmail account. After allowing several minutes for an attempted delivery from the Gmail server to occur, I stopped the packet capture with Ctrl-C.

# tcpdump -i enp1s4 port 25 -w smtp_2017-04-30.pcap
tcpdump: listening on enp1s4, link-type EN10MB (Ethernet), capture size 65535 bytes
^C225 packets captured
225 packets received by filter
0 packets dropped by kernel
# ls -lh smtp_2017-04-30.pcap 
-rw-r--r--. 1 tcpdump tcpdump 33K Apr 30 12:33 smtp_2017-04-30.pcap
#

[ More Info ]

[/network/email/spam/sorbs] permanent link

Sun, Apr 23, 2017 11:31 pm

Phishing email leading to ridersrepublic.in

Someone notified me that she had received an email from a business contact a couple of days ago informing her that he had shared a document using Dropbox. But when she later contacted his company, she was informed that someone else was sending out email using his email address. She forwarded the message to me, which is shown below with the actual sender's address changed, though:

Subject: Blaine Watkins has shared a file with you using Dropbox
From: Blaine Watkins <blainewatkins@example.com>
Date: Tue, April 18, 2017 6:09 pm
To:

Hi, I just uploaded a Document for you to see using Dropbox. View|Download files and let me know what you think.

Thanks

Blaine

She was concerned that her system might have been infected by malware when she viewed the message. I scanned her system with SUPERAntiSpyware Free Edition, but SUPERAntiSpyware didn't find any malware recently placed on her system. McAfee Total Protection is the real-time antivirus software on her system, but I've found that using additional tools, such as SUPERAntiSpyware, can sometimes detect malware missed by a user's antivirus software. I performed a full scan of the system using McAfee Total Protection after running the SUPERAntiSpyware scan, but it didn't find anything, either. I also checkd the system with Malwarebytes Anti-Malware Home (Free), but it didn't find any malware, either, except for a zip file I created containing files associated with malware I found on the system quite some time ago.

[ More Info ]

[/security/phishing] permanent link

Sat, Apr 22, 2017 11:20 pm

Vertically aligning an image with text using CSS

If you wish to vertically align an image with text in Hypertext Markup Language (HTML) code that is compliant with Cascading Style Sheets (CSS) you can do so using <style="vertical-align: position;"> where position is bottom, middle, or top. E.g., if I want to align an image of the direct current symbol, which is a horizontal line over top of three shorter horizontal lines, so that the image is vertically in the middle of the text, I could use the code below:

24V <img src="direct-current.gif" width="49" height="49" style="border: none; vertical-align: middle;" alt="Direct current symbol">1500mA

I would then see the following:

24V Direct current 
symbol1500mA

If I used vertical-align: top, instead, the image would appear as shown below where the text is aligned with the top of the image:

24V Direct current 
symbol1500mA

If I used vertical-align: bottom, instead, the image would appear as shown below:

24V Direct current 
symbol1500mA

If I did not specify a vertical alignment, the image would appear as it did when I specified "bottom" for the vertical alignment as shown below:

24V Direct current symbol1500mA

Though, in this case I could also have used the HTML code &#9107;, instead, for the direct current symbol and avoided the use of an image and the need to align the image with the text, though I didn't realize that when I started using the image on a page for power adapter for various devices.

E.g.: 24V ⎓ 1500mA

[/network/web/html/css] permanent link

Wed, Apr 19, 2017 10:11 pm

Excel 2016 - Workbook Protected

I wanted to add another sheet to an Excel workbook, but when I clicked on the "+" to add the additional worksheet, I saw the message "Workbook is protected and cannot be changed."

Excel 2016 - workbook protected

I didn't know what the password might be because I had never set a password for the workbook, which I had created in a prior version of Excel; I'm using Microsoft Office 2016 on a MacBook Pro running OS X El Capitan (10.11.6) at the moment.

[ More Info ]

[/software/office/excel] permanent link

Tue, Apr 18, 2017 11:23 pm

Vinagre RDP client for CentOS 7

I needed to connect to a Microsoft Windows 10 system using the Remote Desktop Protocol (RDP) from a CentOS 7 system. I've used rdesktop software to control a Windows system from a Linux system in the past and I thought there might be an rdesktop package available for CentOS, but when I tried to install one with yum, I found that none was available.

# yum install rdesktop
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: archive.linux.duke.edu
 * extras: centos.vwtonline.net
 * updates: centos.firehosted.com
No package rdesktop available.
Error: Nothing to do
#

But I found that Vinagre, was already available on the system. Vinagre is a Virtual Network Computing (VNC), Secure Shell (SSH), Remote Desktop Protocol (RDP) and Simple Protocol for Independent Computing Environments (SPICE) client for the GNOME desktop environment.

[ More Info ]

[/network/rdp] permanent link

Thu, Apr 13, 2017 10:37 pm

Counting the number of instances of a process on Microsoft Windows

If you need to know the number of instances of a particular process running on a Microsoft Windows system, you can see all of the instances by using the tasklist /fi option to filter the output from the tasklist command by imagename. E.g., I could view information on the PuTTY processes currently running on a Windows system with the command below:

C:\>tasklist /fi "IMAGENAME eq putty.exe"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
putty.exe                    57380 Console                    1      4,404 K
putty.exe                    49012 Console                    1      3,584 K
putty.exe                    72424 Console                    1      3,060 K
putty.exe                     8028 Console                    1      3,992 K
putty.exe                    96136 Console                    1      4,632 K
putty.exe                   102860 Console                    1      2,936 K
putty.exe                    87200 Console                    1      4,572 K
putty.exe                   121020 Console                    1      2,908 K
putty.exe                   100348 Console                    1      4,228 K
putty.exe                    81692 Console                    1      3,068 K
putty.exe                   118448 Console                    1      2,020 K
putty.exe                   102856 Console                    1      2,544 K
putty.exe                   126692 Console                    1      4,332 K
putty.exe                   133004 Console                    1      3,664 K
putty.exe                   136344 Console                    1      5,204 K
putty.exe                   126408 Console                    1      3,620 K
putty.exe                   114896 Console                    1      2,880 K
putty.exe                   132868 Console                    1      2,972 K
putty.exe                   133048 Console                    1      3,860 K
putty.exe                   139232 Console                    1      3,732 K
putty.exe                   132756 Console                    1      2,928 K
putty.exe                   136484 Console                    1      3,576 K
putty.exe                   147964 Console                    1      2,960 K
putty.exe                   142800 Console                    1      6,136 K
putty.exe                   139192 Console                    1      2,952 K
putty.exe                    32748 Console                    1      2,896 K
putty.exe                    78048 Console                    1      3,596 K
putty.exe                   113756 Console                    1      3,304 K
putty.exe                    62572 Console                    1      4,120 K
putty.exe                    17620 Console                    1      3,376 K
putty.exe                    36156 Console                    1      1,756 K
putty.exe                    86144 Console                    1      3,528 K
putty.exe                     4600 Console                    1      4,440 K
putty.exe                    46532 Console                    1      6,048 K
putty.exe                    49572 Console                    1      2,884 K
putty.exe                    69560 Console                    1      3,268 K
putty.exe                    67948 Console                    1      4,120 K
putty.exe                   139328 Console                    1      2,948 K
putty.exe                    25888 Console                    1      6,552 K
putty.exe                   119096 Console                    1      3,676 K
putty.exe                    48572 Console                    1      3,084 K
putty.exe                   132724 Console                    1      6,720 K
putty.exe                   123480 Console                    1      2,944 K
putty.exe                   148548 Console                    1      3,704 K
putty.exe                    46280 Console                    1      7,860 K
putty.exe                   146844 Console                    1      4,648 K
putty.exe                    47612 Console                    1      6,548 K
putty.exe                    84404 Console                    1      3,060 K
putty.exe                    35920 Console                    1     15,780 K
putty.exe                    91288 Console                    1     14,832 K
putty.exe                   115612 Console                    1      5,216 K
putty.exe                    85164 Console                    1      6,972 K
putty.exe                    22796 Console                    1      9,640 K
putty.exe                    87868 Console                    1     15,596 K

C:\>

If I don't want to manually count the instances, I can use the find command as shown below:

C:\>tasklist /fi "IMAGENAME eq putty.exe" | find /i /c "putty.exe"

54

C:\>

The /i option to the find command tells find that the case of letters is unimportant, i.e., it should match either lowercase or uppercase letters. The /c option instructs it to display a count for the number of matching lines it found.

If I want to put the count in a variable in a batch file, I can use the the command noted in Setting a Variable to be the Output of a Command.

Alternatively, you can use a Windows Management Instrumentation Command-line (WMIC) command. E.g.:

C:\>wmic process where name="putty.exe" get name | find /c "putty.exe"
54

C:\>

Related articles:

  1. Obtaining a list of running processes and their associated PIDs Date: April 8, 2017
    MoonPoint Support

[/os/windows/commands] permanent link

Wed, Apr 12, 2017 10:02 pm

Firefox - the page isn't redirecting properly

If you are seeing a "Firefox has detected that the server is redirecting the request for this address in a way that will never complete" message, the problem may be resolved by removing cookies or history associated with the site, but you might also need to check the cookies exceptions list in Firefox; that's how I was finally able to resolve a problem accessing a particular site that I could access in another browser on a system, but not with Firefox.

When trying to log into the Rakuten Marketing website using Firefox 52.0.1 on a Windows 10 system, I saw the message below after being redirected to http://cli.linksynergy.com/cli/common/login.php:

The page isn't redirecting properly


Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

• This problem can sometimes be caused by disabling or refusing to accept cookies.

[ More Info ]

[/network/web/browser/firefox] permanent link

Tue, Apr 11, 2017 8:37 pm

Writing to a CSV file with Python

I need to track the status of firewall rule requests and provide a status report every Monday. The requests are managed through a website where I can see the list of uncompleted requests and their status, but the site doesn't give me a count of the number of requests in each of the states that a request can be in, which can be "Pending Approval", "Modified", "Pending Removal" "On Hold", "Clarification Required", "Waiting Implementation", or "Waiting Removal". To obtain the count of the number of requests in each state, I download the webpage showing the requests and their status to my laptop and then run a Python script to count the queued items. But I also want to see how the numbers are changing over time, so I modified the script to write the counts to a comma-separated values (CSV) file that I can open in a spreadsheet program, such as Microsoft Excel.

To work with comma-separated value (CSV) files in a Python script, include the command import csv in the script. I also include the os.path module to use for testing whether a file already exists that will hold the data, the re module to perform regular expression parsing of lines in the downloaded webpage, the sys module for checking the command line arguments to the script, and the datetime module for determining the current date and formatting it in YYY-MM-DD format, where "YYYY" is the year, "MM" the month, and "DD" the day of the month, as explained in Python - Checking times and dates, for writing the date to the output file.

[ More Info ]

[/languages/python] permanent link

Mon, Apr 10, 2017 8:37 pm

Somone else is still using this PC

I connected remotely to a Microsoft Windows 10 system using the Remote Desktop Protocol (RDP). I updated some software on the system which required a reboot, so I clicked on the Windows Start button and chose to restart the system, however I saw the message "Someone else is still using this PC. If you restart now, they could lose unsaved work." There was a "Restart anyway" button, but, since it was late on a Sunday night, I didn't think anyone else should be accessing the system.

Someone else is still using this PC

[ More Info ]

[/os/windows/win10] permanent link

Sun, Apr 09, 2017 4:51 pm

Adding a checkbox in Microsoft Excel

To add a checkbox (check box, tickbox, tick box) column in Microsoft Excel, you will need to first enable the developer ribbon in Excel, if it is not already enabled. To do so, take the following steps in Excel (the steps were written for Excel 2010 and 2013, but may be similar for other versions):

Click on File and select Options.

Excel - File - 
Options

[ More Info ]

[/software/office/excel] permanent link

Sat, Apr 08, 2017 11:26 pm

Obtaining a list of running processes and their associated PIDs

If you need to get a list of the processes running on a Microsoft Windows system and the process identifier (PID) for each of those processes, you can get the information from a command line interface (CLI), e.g., a command prompt, using the tasklist command or the Windows Management Instrumentation Command-line (WMIC) command wmic process get name, processid. If you wish to filter the output so that you only see information for a specific process, you can use the /fi option for the tasklist command. E.g., if I only wanted to determine the PID for the QuickBooks QBW32.exe process, I could use the command tasklist /fi "imagename eq QBW32.exe". With WMIC, you can include a "where" option, e.g., wmic process where name='QBW32.exe' get name, processid.

[ More Info ]

[/os/windows/commands] permanent link

Fri, Apr 07, 2017 3:14 pm

Counting SQLite records based on a specified date

I track work requests in an SQlite database. For each request in a table named "Tasks" in the database, there is a column holding the date the request was approved. Every week I need to include the number of requests approved that week in a weekly report. I can do that with the Structured Query Language (SQL) command SELECT COUNT(*) FROM Tasks WHERE Approved >= date(CURRENT_DATE,"-7 day"). I have a Python script that queries the SQL database to count the requests approved within the last week, but sometimes I want to determine the number of requests approved since a particular date. So I modified the script to accept a date provided as an argument on the command line and, if a date is specified, to determine the number of entries where the approval date matches the specified date or is later than the specified date.

[ More Info ]

[/languages/python] permanent link

Wed, Apr 05, 2017 10:47 pm

Counting queued items with a Python script

I need to review and approve firewall rule requests. I can get a list of those pending approval, ones requesting a modification to existing rules, those pending removal because they've expired (all rules must be reviewed on at least a yearly basis), ones on hold, ones that are in a "clarification required" state due to a question about the rules being requested, those approved for implementation, but not yet implemented, and those awaiting removal. But the page that displays the requests in each category doesn't give me a count of the number in each category, so I wrote a Python script that will read the webpage containing that information that I've downloaded, parse the HTML code for the page and give me a count of the number of requests in each category.

The script is named count_queued.py . The name of the HTML file that was downloaded should be provided on the command line. E.g.:

$ ./count_queued.py ~/Documents/Work/queued/Request.html
Request Status

Pending Approval:       69
Modified:               36
Pending Removal         43
On Hold:                0
Clarification Required: 28
Waiting Implementation: 26
Waiting Removal:        12

Total requiring review: 176
$

[ More Info ]

[/languages/python] permanent link

Sun, Apr 02, 2017 8:49 pm

Color & BgColor Clickable BBCode Bar Mod installation

When I attempted to install the Color & BgColor Clickable BBCode Bar mod on a Simple Machines Forum (SMF) 2.0.13 forum I saw an "Error in Packages" message:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

[ More Info ]

[/network/web/forums/smf] permanent link

Sat, Apr 01, 2017 6:14 pm

Can't log into phpMyAdmin

I was unable to log into phpMyAdmin from Firefox. Every time I entered the user name and password, I would be presented with the login screen again. I was able to resolve the problem by removing the coookies for the site on which phpMyAdmin was running from within Firefox 52.0 by the following process:
  1. Click on the menu button at the top, right-hand corner of the Firefox window - the one that has 3 horizontal bars - and select Options.
  2. Select Privacy.
  3. Click on the link under History for "remove individual cookies".
  4. Click on the site on which phpMyAdmin is running to select that site, then click on Remove Selected. Don't click on Remove All or you will remove cookies for all sites.

    Firefox - Removed Selected Cookies

  5. Click on Close to close the cookies list window.

[/network/web/tools/phpmyadmin] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo