Tag Archives: Access

Windows Firewall Application Management Tutorial

In that same … Windows security firewall topic as Windows Firewall Blocking IP Primer Tutorial below … and allied to … yesterday’s Microsoft Defender Virus Protection Tutorial … … today we look at how the Win+R command … control firewall.cpl … can be used to manage Windows firewall settings Microsoft Defender will be defending, especially the Windows desktop applications you allow through the firewall that would, as a default, refuse. We had this happening on our Windows laptop involving the FileZilla sftp manager of file transferring to and from a public website … the one you are reading from. Previous relevant Windows Firewall Blocking IP Primer Tutorial is shown below. A firewall is a security device, or network security system, designed to protect a secure internal network from other networks, by the means to control the incoming and outgoing network traffic, via a rule set (in a similar way to how some email systems allow the user to write their own rules, to control the flow of emails into their email client mailboxes). Today, with our slideshow example, we imagine, on a Windows 7 laptop, that you want to block (or ban) the network traffic from a nominated IP address (or range of IP addresses). This kind of control can perhaps protect the computer network “behind” the firewall from some sort of scamming operation. This would be of pretty obvious interest to system administrators and network administrators charged with protecting the integrity of their network arrangements. The way to access the firewall functionality in Windows has been pretty fluid over the various versions of the Windows operating system, but the one we gravitate towards, as a generic piece of advice, is to … get to a Windows Command Line prompt … and … type … firewall.cpl The firewall in Windows 7, at least, also appears in Control Panel as “Windows Firewall” … mainly because it would be pretty obtuse to say “Fenestra Firewall” (though it sounds like a good movie). Sometimes the firewall duties for a Windows laptop, for instance, are taken on by the Virus Protection software you have installed, perhaps. For instance, the Norton by Symantec software called Internet Security offers up its own Windows Firewall as an option for use, that will supercede any Windows Firewall arrangements that come with an install of the Windows operating system. So please take a look at our slideshow showing you … Continue reading →

Posted in eLearning, Networking, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , | Leave a comment

AlmaLinux Apache Status Report Inspiration Tutorial

Examining the RJM Programming’s Apache web server’s cPanel‘s … Apache Status … report, showing RJM Programming URL accesses in real time, can be very eye opening. Among recent surprises we got there were accesses ( regarding PHP $_SERVER[‘REQUEST_URI’] … ie. the stuff after www.rjmprogramming.com.au ) starting with … Starting with … … then. Our initial response … The action we took … /wiki/ Sai_Baba_of_Shirdi What the …? Who are those guys? Redirected to English relevant Wikipedia webpage … 404.shtml (in Apache Document Root) change … function onPageLoad() { if (document.URL.indexOf(‘/currency/’) != -1) { location.href=’//www.rjmprogramming.com.au/PHP/country_currency_quiz.php#showcur=’ + document.URL.split(‘/currency/’)[1]; } if (document.URL.indexOf(‘/wiki/’) != -1) { location.href=’//wikipedia.org/wiki/’ + document.URL.split(‘/wiki/’)[1]; } // rest of code follows } /currency/ lbp-lebanese-pound We’re officially gobsmacked! 404.shtml (in Apache Document Root) change … then …country_currency_quiz.php (with this live run link), featuring these changes … that last one today’s work, borne out of Apache Status Fascination! Making something out of nothing?! We’ve got nothing to lose, and we may surprise some user out there (perhaps just mucking around). And so, with similar themes to HTML5 Time Tag Timeline AlmaLinux Debug Tutorial we set out to make something out of nothing here, and we’ve closely documented what we did regarding today’s animated GIF presentation. Previous relevant HTML5 Time Tag Timeline AlmaLinux Debug Tutorial is shown below. Another day, another use for (in our case Google Chrome web browser) web inspector functionality. Yes, even if the source of the issue is PHP (which we moved on from a CentOS starting with 5 version to an AlmaLinux version starting with an 8) we’re yet to see an issue that could not be resolved with the help of a clientside web inspector debugging arrangement. Of course, the simpler the PHP the more likely this is to happen, but we can’t emphasise enough how useful these web inspectors are. Today’s case in point revisits the use_time.htm clientside web application we talked about at HTML5 Time Tag Timeline Tutorial. Moving to AlmaLinux, and revisiting it on trying … … as a reason we should add to the list (of two we talked about at PHP Migration Software Strategies Tutorial) … fgrep … preemptive approach … and/or … error_log … reactive approach examining Apache Status log every now and then … via (now AlmaLinux cPanel but used to also be on CentOS cPanel) Apache Status report we talked about at CentOS Web Server cPanel Apache Status Tutorial … Continue reading →

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , , , | Leave a comment

PHP Recompiles C Numerical Sort Hashtag Genericization Tutorial

Thinking about yesterday’s PHP Recompiles C Numerical Sort Genericization Tutorial might beggar the question for many users … Is there a way to not have to worry about “simple defence mechanisms” sharing user entered data onto a serverside recipient webpage codeset? The short answer is “yes”. The long answer is “y-e-s”. Two alternatives occur to us, of many more, we daresay, other people might come up with … set up the arrangements so that the recipient webpage actually exists in an iframe overlaying (probably totally) the parent webpage (via form target=[nameOfThatIframeElement]) … and in that recipient (can still be method=POST) you can refer back to (for example) parent.document.getElementById(‘anyElementOfInterest’)‘s value/innerHTML/outerHTML/whatevvvvvvver … or, what we use today … use hashtagged information … the thing that eases security angst here being that data passes across in the clientside realm rather than any serverside realm. Neither alternative approach is relying on HTML form element usage (for this style of data sharing, though we have a mix of styles now with our Numerical Sorting web application), either. So, as we do today, we have a … new item of data, being the prefixing output wordage to the sorted array (output) … now displayed in a span element attributed contenteditable=true … <?php $inprintf=”youllneverfindthis”; $outprintf=”youllneverfindthis”; // and then, down a ways … $suffix=explode($prefix . $midbit, $ccont)[1]; if (strpos($suffix, ‘printf(“‘) !== false) { $inprintf='”‘ . explode(‘”‘, explode(‘printf(“‘, $suffix)[1])[0] . ‘”‘; $outprintf='”‘ . “</span><span style=cursor:pointer;background-color:lightgreen; title=\”Tailorable output\” id=mycespan contenteditable=true onblur=\” document.getElementById(‘myform’).action=document.getElementById(‘myform’).action.split(‘#’)[0] + ‘#’ + encodeURIComponent(this.innerHTML); \”>” . str_replace(‘”‘,”,$inprintf) . “</span><span id=zsuffix>” . ‘”‘; } ?> … which comes into play, later with … <?php echo ” <span id=sprefix>” . str_replace($httpis,” Thanks to <a onclick=\”window.open(this.innerHTML,’_blank’,’top=100,left=100,width=700,height=700′);\” style=cursor:pointer;text-decoration:underline;>” . trim($httpis), str_replace($endaf, $endat, str_replace(“\n”, “<br>”, str_replace(‘>’,’&gt;’,str_replace(‘<‘,’&lt;’,$prefix))))) . “</span><textarea onkeydown=’retval=true;’ onblur=\”document.getElementById(‘mysub’).click();\” name=myarr id=myarr style=display:inline-block;background-color:pink; rows=1 cols=” . (2 + strlen($midbit)) . ” value=\”” . $midbit . “\”>” . $midbit . “</textarea><span id=ssuffix>” . str_replace($inprintf,$outprintf,str_replace(“\n”, “<br>”, str_replace(‘>’,’&gt;’,str_replace(‘<‘,’&lt;’,$suffix)))) . “</span> “; ?> using an onblur event … <?php echo ” document.getElementById(‘myform’).action=document.getElementById(‘myform’).action.split(‘#’)[0] + ‘#’ + encodeURIComponent(this.innerHTML); “; ?> … means by which to detect a change, and … affecting the HTML form action=[hereIsLookingBackAtYouKid] to become action=[hereIsLookingBackAtYouKid]#[encodedSpanContents] allowing the flow through the workflow via this hashtagged data … which can be checked on at the document.body onload event logic … as per … <?php echo ” <body onload=\”if (document.getElementById(‘myresult’)) { document.getElementById(‘myresult’).innerHTML=( ( (” + location.hash).replace(/^null/g,”).replace(/^undefined/g,”) == ”) ? document.getElementById(‘myresult’).innerHTML : decodeURIComponent((” + location.hash).replace(/^\#/g,”))); } if (document.getElementById(‘mycespan’)) { document.getElementById(‘mycespan’).innerHTML=( … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

PHP Recompiles C Numerical Sort Genericization Tutorial

We come at improving yesterday’s PHP Recompiles C Numerical Bubble Sort Tutorial two ways, today, they being … genericization … taking the form of changing a hardcoding in a dropdown and associated variable “remix” regarding the functionality of the “what we should now call just” Numerical Sort web application … and … simple defensive programming … where code can get to the operating system, as with serverside languages such as PHP and compiled programs like we’re doing here with C then care is needed By “genericization” we’re taking the “bubble” out of “squeak” “bubble sort” to just leave “sort” with our thinking, though we’d like to restrict the sorting to “numerical sorting” ideas. In other words, we’ve channelled the excellent C code bases at W3schools, thanks, for more than just a “bubble sort” and left it up to the PHP to see what has been “plonked” C wise by us to develop a dropdown $selsorttype PHP variable containing a genericized outerHTML, rather than the previous “bubble_sort” hardcoding used … <?php $sorttype=”bubble_sort”; $selsorttype=”bubble_sort”; $ccont=””; $lastresult=””; if (isset($_POST[‘mysort’])) { $sorttype=str_replace(‘+’,’ ‘,urldecode($_POST[‘mysort’])); $ccont=file_get_contents(‘./’ . $sorttype . ‘.c’); } else if (isset($_GET[‘mysort’])) { $sorttype=str_replace(‘+’,’ ‘,urldecode($_GET[‘mysort’])); $ccont=file_get_contents(‘./’ . $sorttype . ‘.c’); } else { $ccont=file_get_contents(‘./bubble_sort.c’); } foreach (glob(‘*_sort.c’) as $filename) { if (strpos(basename($filename), ‘new_’) === false) { if ($selsorttype == “bubble_sort”) { $selsorttype=”<select onchange=\”location.href=’./bubble_sort_c.php?mysort=’ + this.value;\” style=display:inline-block; name=\”mysort\” id=\”mysort\”><option value='” . explode(‘.’,basename($filename))[0] . “‘>” . explode(‘.’,basename($filename))[0] . “</option></select>”; } else if (basename($filename) == ($sorttype . “.c”)) { $selsorttype=str_replace(” id=\”mysort\”>”, ” id=\”mysort\”>” . “<option value='” . explode(‘.’,basename($filename))[0] . “‘>” . explode(‘.’,basename($filename))[0] . “</option>”, $selsorttype); } else { $selsorttype=str_replace(“</select>”, “<option value='” . explode(‘.’,basename($filename))[0] . “‘>” . explode(‘.’,basename($filename))[0] . “</option></select>”, $selsorttype); } } } ?> Why worry about “simple defensive programming”? Some users might be looking for loopholes in your code to exploit what the underlying programming language used is capable of, and that can be altering file systems. What if it was possible in that “what we hope” is a user supplied numerical comma separated list, somebody was able to embed some operating system call? Well, we figure that malicious idea would have to contain a quote or double quote, so now we have … <?php $prefix=explode(‘ = {‘, $ccont)[0] . ‘ = {‘; $midbit=explode(‘”‘,explode(“‘”,explode(‘}’, explode($prefix, $ccont)[1])[0])[0])[0]; $suffix=explode($prefix . $midbit, $ccont)[1]; $altmidbit=$midbit; $httpis=” http”; $endaf=”youllveverfindthis”; $endat=”youllveverfindthis”; $hbits=explode(‘ http’, $prefix); if (sizeof($hbits) > 1) { $endaf=’ http’ . explode(‘ ‘, $hbits[1])[0]; $endat=’ http’ . explode(‘ ‘, $hbits[1])[0] . … Continue reading →

Posted in eLearning, Operating System, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

AlmaLinux DNS Changeover Activated Tutorial

And so, we arrive at performing the DNS changeover part to our CentOS to AlmaLinux migration journey, further to yesterday’s AlmaLinux DNS Changeover FileZilla sftp Tutorial progress towards this point. We wanted to have in the blog posting title a changed word starting with “A” (and we chose “Activated”) because it is our rjmprogramming.com.au (Crazy Domains‘s) DNS Hosting‘s relevant A Record that is affected by our DNS Changeover today. We, in this A Record updating, changed the CentOS IP Address 65.254.92.213 mentions to those of AlmaLinux 65.254.95.247 IP Address. Not very onerous, but it takes a few hours to filter through to the world wide web! Even so, you may be reading this blog posting on AlmaLinux … yayyyyyy!!!!! Previous relevant AlmaLinux DNS Changeover FileZilla sftp Tutorial is shown below. Another day, another piece of the puzzle changing IP address web server references for the domain name rjmprogramming.com.au … ie. DNS changeover (like with AlmaLinux Landing Page WordPress Content Update Solution Tutorial). All this information will be blasé knowledge to many system operators out there, but a lot of us are not system operators, so we’ll outline what we see and find out here. Regular readers will know we use and really like the great FileZilla product to use for the first of … sftp … Secure ftp … ssh … via (for us macOS) Terminal command line … cPanel … group of access methodologies to our web server here at rjmprogramming.com.au domain. And, believe me, they are all used extensively around here, for many and various purposes. We had ssh sorted pretty easily for the two scenarios, because it’s use only involved IP addresses, the two, for us, that are concerned, but with sftp, at least for us, we find three scenarios of concern show at the end of this posting part, the last of which we’ll show you the creation of a connection mechanism to in configuring FileZilla, with today’s animated GIF tutorial picture presentation, where no remembering of passwords was needed, and you’ll see us demonstrating … FileZilla (top left icon) SiteManager -> Duplicate … … and … FileZilla SiteManager -> Rename … … talents ! Huh?! How so?! Well, we’re glad you got that proxy to ask?! OpenSSH is used a lot, and for us … … with web server access arrangements, and these passwords end up being the crux of access controlled by keychains and … Continue reading →

Posted in eLearning, Networking, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

AlmaLinux DNS Changeover FileZilla sftp Tutorial

Another day, another piece of the puzzle changing IP address web server references for the domain name rjmprogramming.com.au … ie. DNS changeover (like with AlmaLinux Landing Page WordPress Content Update Solution Tutorial). All this information will be blasé knowledge to many system operators out there, but a lot of us are not system operators, so we’ll outline what we see and find out here. Regular readers will know we use and really like the great FileZilla product to use for the first of … sftp … Secure ftp … ssh … via (for us macOS) Terminal command line … cPanel … group of access methodologies to our web server here at rjmprogramming.com.au domain. And, believe me, they are all used extensively around here, for many and various purposes. We had ssh sorted pretty easily for the two scenarios, because it’s use only involved IP addresses, the two, for us, that are concerned, but with sftp, at least for us, we find three scenarios of concern show at the end of this posting part, the last of which we’ll show you the creation of a connection mechanism to in configuring FileZilla, with today’s animated GIF tutorial picture presentation, where no remembering of passwords was needed, and you’ll see us demonstrating … FileZilla (top left icon) SiteManager -> Duplicate … … and … FileZilla SiteManager -> Rename … … talents ! Huh?! How so?! Well, we’re glad you got that proxy to ask?! OpenSSH is used a lot, and for us … … with web server access arrangements, and these passwords end up being the crux of access controlled by keychains and OpenSSH protected files which also get transferred, in all probability during a migration phase where web server contents is transferred from one IP address to the new web server IP addresses. For us, we relied on our web hoster, the great Crazy Domains to do this migration, and it all went so smoothly, thanks, but if you have those system operator skills you can do this yourself, if you decide to roll this way, or that way … Anyway, we’re here today nearing the time for the actual DNS changeover, mulling over the question … But what if we have forgotten something?! We’re pretty sure there’ll be a bit of time where access back to the CentOS web server will be available to us, and we’d like an sftp access … Continue reading →

Posted in eLearning, Networking, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment