tag:blogger.com,1999:blog-18997843017842812922024-03-13T15:33:12.579+05:30Amar HelloweenA Blog for Techno Geeks!IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.comBlogger91125tag:blogger.com,1999:blog-1899784301784281292.post-55011802805850113342024-01-18T18:50:00.003+05:302024-01-18T18:50:34.237+05:30Plesk : How to create banner notification in plesk<p> Today we will learn how to post banner notification in Plesk -Windows. This is useful when you want to display a specific content like new features or downtime message in the homepage of customer panel.</p><p>We will be using the plesk extension - <b>Broadcast message</b> to achieve this task.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpZ4qOhMF-6ifF6FBs6b-jUs5j_q-IhIc6qQHSSbIPNXva5nXbxvGyrNnd0OFGxbeHpsACpIsAbu6bfV2tKQciJbWsgwelF6_DQ9ioIksu9-6PkvgT-5OxefvyG9o9nznQTtpfg2KNEQIrwPtkyQMz_64PGneyuSYD5MI9YXc49b1w3xCp0s-SdowdHMwm/s1253/Screenshot%202024-01-18%20182132.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="821" data-original-width="1253" height="419" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpZ4qOhMF-6ifF6FBs6b-jUs5j_q-IhIc6qQHSSbIPNXva5nXbxvGyrNnd0OFGxbeHpsACpIsAbu6bfV2tKQciJbWsgwelF6_DQ9ioIksu9-6PkvgT-5OxefvyG9o9nznQTtpfg2KNEQIrwPtkyQMz_64PGneyuSYD5MI9YXc49b1w3xCp0s-SdowdHMwm/w640-h419/Screenshot%202024-01-18%20182132.png" width="640" /></a></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div>To install the extension :</div><div><b><span style="color: #2b00fe;">C:\> plesk bin extension --install broadcast-message</span></b></div><div><br /></div><div>Turn on the extension :</div><div><b><span style="color: #2b00fe;">C:\> plesk db "update ModuleSettings set value = 1 where name = 'enable' and module_id in (select id from Modules where name = 'broadcast-message')"</span></b></div><div><br /></div><div>Turn off the extension :</div><div><b><span style="color: #2b00fe;">C:\> plesk db "update ModuleSettings set value = 0 where name = 'enable' and module_id in (select id from Modules where name = 'broadcast-message')"</span></b></div><div><br /></div><div>Edit the notification text:</div><div><b><span style="color: #2b00fe;">C:\> plesk db "update ModuleSettings set value = '<new message>' where name = 'message' and module_id in (select id from Modules where name = 'broadcast-message')"</span></b></div><div><b><span style="color: #2b00fe;"><br /></span></b></div><div>Example :<br /><br /><div><b><span style="color: #2b00fe;">plesk db "SET @broadcast_id := (select id from Modules where name='broadcast-message'); insert into ModuleSettings values(@broadcast_id,'allowHtml',''),(@broadcast_id,'enable',1),(@broadcast_id,'message','This is a sample Banner for domain - <b>&lt;amarhelloween.com&gt; </b>'),(@broadcast_id,'type','info')"<br /><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAl8rfYT6Ql2ivCrRZBZnFQqqr_s_wLhtqcsLtknRYSep7Ng-uzQTcWDUh2MuPwkr1hcHucX9ou6bXFAikfE4Rd1IuNqNvERMA9Ujbc9EB7jmZFSr22sxW-Gl1afvOgCB0rgDTEBtiZaiD5yVxFoVv3QtWR3apcZXNBoRta-YUjpF32jdujIdqWn8Liv5e/s1065/Screenshot%202024-01-18%20184804.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="470" data-original-width="1065" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAl8rfYT6Ql2ivCrRZBZnFQqqr_s_wLhtqcsLtknRYSep7Ng-uzQTcWDUh2MuPwkr1hcHucX9ou6bXFAikfE4Rd1IuNqNvERMA9Ujbc9EB7jmZFSr22sxW-Gl1afvOgCB0rgDTEBtiZaiD5yVxFoVv3QtWR3apcZXNBoRta-YUjpF32jdujIdqWn8Liv5e/w640-h282/Screenshot%202024-01-18%20184804.png" width="640" /></a></div><br /></b></div></div><div><b><br /></b></div><div><b><br /></b></div><div><b><br /></b></div><div><b><br /></b></div><div><b><br /></b></div><div><br /></div><div><br /></div><div>The same settings can also be applied via GUI. Tools & Settings > Extensions > Broadcast Message</div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-19203923104345256272023-02-10T21:33:00.007+05:302023-02-10T21:35:10.668+05:30Powershell : How to find if a software is installed or not<p><span style="font-family: Poppins;">Task is to write a Function in Powershell which can be used by multiple boxes to find if a software is installed or not.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ8JcGbzZyh9Xyl1a_8TCmKKRcTpOSqOGPw-dr0wXGpY81OMf7be0ue3BaWx5j9JXNoXXRdIgWxkQy6NTxQaAVovW1ynqpBbCVxnmVhABZaJZv4laZp9q_OjY7acXx9MZpwAk55S4xhk8xzlMoQuG0vwVJ7yf_6bKrtXGyZ2mZxfvNJgCUX2fL3cbn/s1447/Screenshot_425.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="683" data-original-width="1447" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ8JcGbzZyh9Xyl1a_8TCmKKRcTpOSqOGPw-dr0wXGpY81OMf7be0ue3BaWx5j9JXNoXXRdIgWxkQy6NTxQaAVovW1ynqpBbCVxnmVhABZaJZv4laZp9q_OjY7acXx9MZpwAk55S4xhk8xzlMoQuG0vwVJ7yf_6bKrtXGyZ2mZxfvNJgCUX2fL3cbn/s16000/Screenshot_425.png" /></a></div><h2 style="text-align: left;"><span><span style="color: #2b00fe; font-family: Poppins;">SCRIPT</span></span></h2><div><span style="font-weight: normal;"><script src="https://gist.github.com/AmarJazzz/3ff1c04e2c9b05670a4c631fab65821d.js"></script><span style="color: #2b00fe;"><br /></span></span></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com2tag:blogger.com,1999:blog-1899784301784281292.post-55532982238637618262022-10-17T16:26:00.001+05:302022-10-17T16:26:21.869+05:30PowerShell Tip : How to fetch XML Event Data log using Powershell<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4HgVlKI46vQNJj1IgLEQ_CYShPzCWYHBudMQdI6myeOaEUNzdt_duel_1UwmzcR0Wng0tUYJHgxoLm_YYNJ3RRpULJ-hspjQ0wQ13C6g-M67bol8lMtWQ1KbWZD5xMzRJ0zr14ltW5j0sjZEOyANB0ipuD_oQzKYQXwvVFGCO3Ld9DYgP7PSu-G4H/s1560/Screenshot_271.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="736" data-original-width="1560" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4HgVlKI46vQNJj1IgLEQ_CYShPzCWYHBudMQdI6myeOaEUNzdt_duel_1UwmzcR0Wng0tUYJHgxoLm_YYNJ3RRpULJ-hspjQ0wQ13C6g-M67bol8lMtWQ1KbWZD5xMzRJ0zr14ltW5j0sjZEOyANB0ipuD_oQzKYQXwvVFGCO3Ld9DYgP7PSu-G4H/w640-h302/Screenshot_271.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: Poppins;">So Today, one of the member of our PowerShell Forum asked me the question - <b>How to Fetch the XML Event Data like Prop_DeviceName , Prop_ContainerID etc of a specific event ID 112 from the event log.</b></span></div><p></p><p><span style="font-family: Poppins;">So here is the solution for the same. In this example we will use the cmdlet Get-WinEvent and will try to grab the details.</span><br /></p><h2 style="text-align: left;"><span style="color: #2b00fe; font-family: Poppins;">CODE :</span></h2><p></p><p><span style="font-family: Poppins;">Get-WinEvent -FilterHashtable @{Logname="Microsoft-Windows-DeviceSetupManager/Admin";Id=112} -MaxEvents 1 | %{<br />$eventXml = ([xml]$_.ToXml()).Event<br />$eventXml.EventData.Data }</span></p><h2><span style="color: #2b00fe; font-family: Poppins;">OUTPUT :</span></h2><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhynDbAoJQJgozZh141BahsQzU6-2by5S1zKGH_tYdXNl4zMAadmwZP-KK3DzmkHCXDm66IBerUh_buP9MP2uVVdznrYR0S5v3MfTOxhM_9AITFo_6zPKoVAr22_46EOKPnjpDDRhXArdpVhARbNhC8IyFPsvqh4iXa1vw1Z3htbZEIPL6YWflZNj-i/s1420/Screenshot_272.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="1420" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhynDbAoJQJgozZh141BahsQzU6-2by5S1zKGH_tYdXNl4zMAadmwZP-KK3DzmkHCXDm66IBerUh_buP9MP2uVVdznrYR0S5v3MfTOxhM_9AITFo_6zPKoVAr22_46EOKPnjpDDRhXArdpVhARbNhC8IyFPsvqh4iXa1vw1Z3htbZEIPL6YWflZNj-i/w640-h204/Screenshot_272.png" width="640" /></a></div><br /></div><div><span style="font-family: Poppins;">You can modify the script as per your need. Happy Learning!</span></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-43876277473571297982022-08-23T00:55:00.002+05:302022-08-23T00:55:18.403+05:30Mailenable : Webmail showing Server communication failure<p><span style="font-family: Poppins;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLcY8JPoDbT5U7KEl-UEJDCK8xi3Ih4cjzcIQ8EJq0IWxNNNMWIenX7pDRuUhjEu_x_PTlKsnbxtsRrrXMA5NjvI6h7PPIPre1Y7k_R2OUjUV_tigPOMUmG-_l2bMdywAwx7L6fcPFUkbXMknf_3ALcSenJgF-hvulaRqCcqbdObp_wPeygaxHYj-I/s1288/Screenshot_181.png" imageanchor="1" style="background-color: #cccccc; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="437" data-original-width="1288" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLcY8JPoDbT5U7KEl-UEJDCK8xi3Ih4cjzcIQ8EJq0IWxNNNMWIenX7pDRuUhjEu_x_PTlKsnbxtsRrrXMA5NjvI6h7PPIPre1Y7k_R2OUjUV_tigPOMUmG-_l2bMdywAwx7L6fcPFUkbXMknf_3ALcSenJgF-hvulaRqCcqbdObp_wPeygaxHYj-I/w640-h218/Screenshot_181.png" width="640" /></a></span></p><span style="font-family: Poppins;">Many Mailenable users are familiar with the error "<b><span style="color: #800180;">Server communication failure. Please refresh your browser and try again.</span></b>". This error shows when you try to send an email using Mailenable webmail.<br /><br />In today's lesson, we will learn how to fix this. In general, there are two ways to resolve this problem:<br /></span><div><h2 style="text-align: left;"><b><span style="color: #2b00fe; font-family: Poppins;">STEP 1 :</span></b></h2><span style="font-family: Poppins;">The Mailenable webmail is mostly compatible with 32-bit applications written in .NET 2.0. To begin with, you can try this. Just go to <span style="color: #800180;"><b>MailenableAppPool</b></span> and in <b><span style="color: #800180;">Advanced settings change the .NET version to 2.0 and 32 bit as TRUE.</span></b><br /></span></div><div><h2 style="text-align: left;"><b><span style="color: #2b00fe; font-family: Poppins;">STEP 2 :</span></b></h2><span style="font-family: Poppins;">If the .NET version is already 2.0 and the error still occurs, then follow these steps.<br /><br /><ul style="text-align: left;"><li><span style="font-family: Poppins;">Go to Mailenable Bin path</span></li><li>Search for "<span style="color: #800180; font-weight: bold;">MeInstaller.exe</span>" file > Run it as Administrator</li><li>Now Select Option 13. Set .Net Framework version for web application > Next</li><li>Now it will ask for the ASP.Net configuration details and select the appropriate one you want to use > Execute</li></ul></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMGtn6f7UFpd-WotMtAaVGWtFYjnSX_-WTM4fj1vExFDVrlPq3TPNPTc0MOD25QhLVPy9SLJOVN0p1X2TGIq99riBzClAxkHNZfDTfgtGMiphrxaACNAE6y8Xk5bemXWBdabEwdIDmXF9_7ijN7ghEDWGLkaSrekNTTk50dps78xqiECi6pApz7ZZe/s1092/Screenshot_187.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="626" data-original-width="1092" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMGtn6f7UFpd-WotMtAaVGWtFYjnSX_-WTM4fj1vExFDVrlPq3TPNPTc0MOD25QhLVPy9SLJOVN0p1X2TGIq99riBzClAxkHNZfDTfgtGMiphrxaACNAE6y8Xk5bemXWBdabEwdIDmXF9_7ijN7ghEDWGLkaSrekNTTk50dps78xqiECi6pApz7ZZe/s16000/Screenshot_187.png" /></a></div><br /><span style="font-family: Poppins;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQuUqkCpzR15nXiYprarOvJIX1Kao2TMoVymRlIebqhYr9kO_WO-QwU8Z8nr4JeEElerynVwb9ADskivhS23tDcOmT7UutysVrlT6HtPFfFUK4zBBNjemW11_apFrjw6Yse3CqFwgzEpKIG91IOnuDtOw6i9VlPmZYHtOXocKw5cFFhPNCvX3vpGNx/s596/Screenshot_188.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="269" data-original-width="596" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQuUqkCpzR15nXiYprarOvJIX1Kao2TMoVymRlIebqhYr9kO_WO-QwU8Z8nr4JeEElerynVwb9ADskivhS23tDcOmT7UutysVrlT6HtPFfFUK4zBBNjemW11_apFrjw6Yse3CqFwgzEpKIG91IOnuDtOw6i9VlPmZYHtOXocKw5cFFhPNCvX3vpGNx/s16000/Screenshot_188.png" /></a></div><br /></div><div><span style="font-family: Poppins;">Hopefully, this will fix the problem.<br /></span><br /></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-15328331648901143972022-08-09T19:12:00.003+05:302022-08-09T19:14:27.677+05:30How to fix Trust Relationship issue in Windows (without System Reboot)<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnNpa3P45uvp27gsMCNiGKyutwf6Se0IzCzzN7zhZYmvbRKz4Son21d0CN_ClL1uCjE_btwVUwNCr03gvJKn4XcR79q8ui-gnsNQSSdf89aOnGHyX7aVG-L5vheXOsi-9rjgVoJcJfGITrjXhu6RBTs7olyB4YoX4sBBcxlK8wZkHAxncfYl4tmFCm/s637/Screenshot_172.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="377" data-original-width="637" height="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnNpa3P45uvp27gsMCNiGKyutwf6Se0IzCzzN7zhZYmvbRKz4Son21d0CN_ClL1uCjE_btwVUwNCr03gvJKn4XcR79q8ui-gnsNQSSdf89aOnGHyX7aVG-L5vheXOsi-9rjgVoJcJfGITrjXhu6RBTs7olyB4YoX4sBBcxlK8wZkHAxncfYl4tmFCm/w640-h378/Screenshot_172.png" width="640" /></a></div><p><span style="font-family: Poppins;">Hello Readers, today we are going to learn how to Fix trust relationship issue between the workstation and the domain. But before jumping into the solution, we need to learn the concept of Secure channel.<br /></span></p><h2 style="text-align: left;"><span style="font-family: Poppins;"><b><span style="color: #2b00fe;">What is a Secure Channel ?</span></b></span></h2><div><span style="font-family: Poppins;">Before understanding the trust relationship issue, you will need to know what is a <b><u>Secure channel</u></b>. </span></div><div><ol style="text-align: left;"><li><span style="font-family: Poppins;">Whenever you add a computer or client machine to an Active Directory domain, your computer account gets created in Active Directory.</span></li><li><span style="font-family: Poppins;">Secure Channel helps to make the communication between the client machine and DC (Domain Controller), Example : Replicating Group Policies.</span></li><li><span style="font-family: Poppins;">Always remember in a Secure channel the computer authentication takes place and not the User Authentication</span></li><li><span style="font-family: Poppins;">So for this Authentication Password is required. Once computer is joined to the domain a password for authentication is proposed to the Active Directory</span></li><li><span style="font-family: Poppins;">By Default, Computer account password change is initiated by the client computer in every <b>30 days</b>. This can be modified in Group Policy settings.</span></li><li><span style="font-family: Poppins;"><b>NETLOGON</b> Service is responsible for establishing the secure channel.</span></li></ol></div><div><h2><span style="font-family: Poppins;"><b><span style="color: #2b00fe;">Why Trust Relationship issues occurs ?</span></b></span></h2></div><div><span style="font-family: Poppins;">Trust relationship issue occurs when the <b>secure channel is not getting established between the Client computer and the Domain Controller</b>. This can happen if the last recorded password in Active Directory doesn't match with the Local client computer password. </span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;">By default there is no way to know what is the password. Only thing in your hand is to reset or re-establish the secure channel.</span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="color: #800180; font-family: Poppins;"><b>Examples when this can occur :</b></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;">1. You have reset your computer recently</span></div><div><span style="font-family: Poppins;">2. You are trying to build new server from an OS Image which was joined to a domain previously</span></div><div><span style="font-family: Poppins;">3. Rebuilding VM Files (.avhdx)</span></div><div><span style="font-family: Poppins;">4. NetLogon service is not working properly</span></div><div><h2><span style="font-family: Poppins;"><b><span style="color: #2b00fe;">Ways to Fix Trust Relationship issue without doing reboot ?</span></b></span></h2></div><p></p><p><span style="font-family: Poppins;">Usually the below step also fixes this issue but only disadvantage is it requires system reboot.</span></p><p><span style="color: #800180; font-family: Poppins;"><b>Computer Properties > Add the computer to Workgroup > Reboot the system > and then Join the the computer back to the domain.</b></span></p><p><span style="font-family: Poppins;">So the question arises how to fix this issue without doing System Reboot?</span></p><h3 style="text-align: left;"><b><span style="color: #2b00fe;"><span style="font-family: Poppins;">Step 1 ) Using </span><span style="font-family: Poppins;">Reset-ComputerMachinePassword</span></span></b></h3><p><span style="color: #800180; font-family: Poppins;"><b>Reset-ComputerMachinePassword -Server "DC01" -Credential "<DomainAdminCreds>"</b></span></p><p><span style="font-family: Poppins;">This command will only work on PowerShell 4.0 and 5.0 </span></p><h3 style="text-align: left;"><b><span style="color: #2b00fe;"><span style="font-family: Poppins;">Step 2 ) Using Test-ComputerSecureChannel</span></span></b></h3><div><b style="color: #800180; font-family: Poppins;">Test-ComputerSecureChannel -Repair -Credential "<DomainAdminCreds>"</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><span style="font-size: 18.72px;"><br /></span></span></div><div><span style="color: #2b00fe; font-family: Poppins;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWgY9xu7NP8JmiClMx2LLGQCOABJQ2KX8UrHuUACuNj1xe13BrIoPzJ0ODVzVzEaqiDWIzyqV_xkQNQ9EcqfSd9ISd0mb9baizparRBvpsiWgMkeBFVlzLftxgCTWtPyH6oc4F6R7tK3n2pLQURM79gShgJ3__pfDjskBaYK5uy2Emb6szkM1UxV39/s951/Screenshot_171.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="153" data-original-width="951" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWgY9xu7NP8JmiClMx2LLGQCOABJQ2KX8UrHuUACuNj1xe13BrIoPzJ0ODVzVzEaqiDWIzyqV_xkQNQ9EcqfSd9ISd0mb9baizparRBvpsiWgMkeBFVlzLftxgCTWtPyH6oc4F6R7tK3n2pLQURM79gShgJ3__pfDjskBaYK5uy2Emb6szkM1UxV39/w640-h102/Screenshot_171.png" width="640" /></a></div><br /></span><h3><b><span style="color: #2b00fe;"><span style="font-family: Poppins;">Step 3 ) Reset Computer on ADUC</span></span></b></h3></div><p></p><ul style="text-align: left;"><li><span style="font-family: Poppins;">Login to Domain Controller</span></li><li><span style="font-family: Poppins;">Open Active Directory Users and Computers (dsa.msc)</span></li><li><span style="font-family: Poppins;">Search for the ComputerName and then Right click on it and then Reset.</span></li></ul><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNtdxv41BahxZS1Q-jllzE4QO1WNnaxer4WSCyzWghuZ3dWmA__-cLjjqHbIM_wrHkCieukeA3tiFFmhlwgWC9lJBqkEb80OErUzl5VSRu288hl6LufMAgHoQJ7vBWKsF2j6SBb6CjuWyooUHeg79bzPYJeNVKIf7Lb2-fg8BE4tLO1WD4-XwEntnP/s579/Screenshot_173.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="476" data-original-width="579" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNtdxv41BahxZS1Q-jllzE4QO1WNnaxer4WSCyzWghuZ3dWmA__-cLjjqHbIM_wrHkCieukeA3tiFFmhlwgWC9lJBqkEb80OErUzl5VSRu288hl6LufMAgHoQJ7vBWKsF2j6SBb6CjuWyooUHeg79bzPYJeNVKIf7Lb2-fg8BE4tLO1WD4-XwEntnP/w400-h329/Screenshot_173.png" width="400" /></a></div><br /><span style="color: #2b00fe; font-family: Poppins;"><b>Happy Learning!</b></span><p></p>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-79093997160948858602022-08-03T12:37:00.003+05:302022-08-03T12:37:49.449+05:30GIT : How to remove untracked files in git<p><span style="font-family: Poppins;">There might be several conditions where you have started editing a file in git but then you realize its not needed any more and want to roll it back. </span></p><p><span style="font-family: Poppins;">Such files will be showing in untracked files list in git as show below when you run <b><span style="color: #800180;">git status</span></b> command.</span></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhterorAeszTX35ySQ--XGWtvfFYcYL_0ANM6H0v5_bhi9E_juSz0b0TOV-77yOr1CcgjP-Dn9VW-Uhbep8_Wnm1cdLKzVPNVtetCkv8a-h5LkDckQfTOIaEnfuTaS3Db4Jy-GHJkdsj3VwBBhU9lsW8nfc7zzZydtHIJncPYzCKMfZTMzoUt7KI-g9/s1110/Screenshot_158.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="1110" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhterorAeszTX35ySQ--XGWtvfFYcYL_0ANM6H0v5_bhi9E_juSz0b0TOV-77yOr1CcgjP-Dn9VW-Uhbep8_Wnm1cdLKzVPNVtetCkv8a-h5LkDckQfTOIaEnfuTaS3Db4Jy-GHJkdsj3VwBBhU9lsW8nfc7zzZydtHIJncPYzCKMfZTMzoUt7KI-g9/w640-h178/Screenshot_158.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: Poppins;">Today we will learn how to remove such untracked files in git. </span></div><h2 style="text-align: left;"><span style="color: #800180; font-family: Poppins;">To fix it you can run the below command : </span></h2><h3 style="text-align: left;"><b style="color: #2b00fe; font-family: Poppins;">git clean -f </b></h3><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg754Nu2OBpcAvFfM-yy1j3yvmZldew_jHabxPewKbSQ34VzESHy8uVw58442jdhUUaM0zLQSbiLgI2alDHVxpX7eV3ON0xybsuA0WlIcodXRNoNNg4ARXXjYoxwGyGR-DHAH8g_UO9Fg3aik-T0oQuNchd49gj4wciCtjHaR_M8tIItG9JJjla2kvr/s945/Screenshot_159.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="308" data-original-width="945" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg754Nu2OBpcAvFfM-yy1j3yvmZldew_jHabxPewKbSQ34VzESHy8uVw58442jdhUUaM0zLQSbiLgI2alDHVxpX7eV3ON0xybsuA0WlIcodXRNoNNg4ARXXjYoxwGyGR-DHAH8g_UO9Fg3aik-T0oQuNchd49gj4wciCtjHaR_M8tIItG9JJjla2kvr/w640-h208/Screenshot_159.png" width="640" /></a></div><br /><b style="color: #2b00fe; font-family: Poppins;"><br /></b></div><div><p><br /></p><p><br /><br /></p></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-11850092530455088932022-07-21T13:20:00.000+05:302022-07-21T13:20:07.883+05:30Linux Tip : How to fix Route issues<p><span style="font-family: Poppins;">Today we are going to learn how to fix route issues on Linux. Suppose you have 2 NIC interface (one is for public traffic - 100 GBPS Link and other one in Private interface for private communication 10 GBPS Link ).</span></p><p></p><h2 style="text-align: left;"><span style="color: #2b00fe; font-family: Poppins;">What is the exact issue ?</span></h2><span style="font-family: Poppins;">Initially our customers reported that they were unable to reach internet on the box (They tried performing ping 8.8.8.8 -or- ping google.com). It was not working via both IP and domain name even tried with browser.</span><p></p><h2 style="text-align: left;"><span style="color: #2b00fe; font-family: Poppins;">So lets begin the troubleshooting :</span></h2><p><span style="font-family: Poppins;"><b>Step 1 :</b> Replicate the issue from your side, because we need to be 100% sure before deep diving.</span></p><p><span style="font-family: Poppins;"><b>Step 2 :</b> We were able to replicate the same. It was 100% packet loss. So now we need to check if the <b><span style="color: #741b47;">public interface is up and running or not</span></b>. Our public interface is eth1 so run command : <b><span style="color: #38761d;">ip a</span></b></span></p><p><span style="font-family: Poppins;">This will show you if interface is UP / Down. Eth1 was up and running here.</span></p><p><span style="font-family: Poppins;"><b>Step 3 :</b> Next I was interested to see how is the traffic going out - is it crossing any single hop or not , whether Gateway is reachable or not. To find that , you can use <span style="color: #800180;"><b>TRACE ROUTE</b></span> Command.</span></p><p><span style="font-family: Poppins;">Using traceroute helped to identify that the traffic was actually going via the private interface gateway instead of public interface. This indicates something was wrong with routing table.</span></p><p><span style="font-family: Poppins;"><b>Step 4 : </b>Use <span style="color: #38761d; font-weight: bold;">netstat -rn</span> or<b><span style="color: #38761d;"> ip route show</span></b> command to see the route. Checked the outgoing traffic 0.0.0.0 and found it was mapped to Private gateway.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeckshRp9XWzB4mtAwIzj6zKd8fFp1PUlARx3H7RpdX6GuUdyFUpiVnefFYWNXPOWpQFJygSQOrOU98AdrU7fXy2qXEYVLbKhv1KDmZQDtCaWSWgAUUmCMklDZipafe-iI495S9LH_x9LG2uBG7e6Y0F1Oo3u_DxZu7Sc8RSN3Ds06ohrG212wML6b/s1151/InkedScreenshot_165.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="1151" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeckshRp9XWzB4mtAwIzj6zKd8fFp1PUlARx3H7RpdX6GuUdyFUpiVnefFYWNXPOWpQFJygSQOrOU98AdrU7fXy2qXEYVLbKhv1KDmZQDtCaWSWgAUUmCMklDZipafe-iI495S9LH_x9LG2uBG7e6Y0F1Oo3u_DxZu7Sc8RSN3Ds06ohrG212wML6b/w640-h206/InkedScreenshot_165.jpg" width="640" /></a></div><br /><span style="font-family: Poppins;"><br /></span><p></p><p><b> </b></p><p><span style="font-family: Poppins;"><b><br /></b></span></p><p><b style="font-family: Poppins;"><br /></b></p><p><b style="font-family: Poppins;">Step 5 :</b><span style="font-family: Poppins;"> Now as we have identified the cause, it's time to change the route to Public. Use below command :</span></p><p><b style="font-family: Poppins;"><span style="color: #741b47;">ip route change 0.0.0.0/0 via <PublicNic Gateway IP> dev eth1</span></b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8xvRwondrfNuits7tHOGdtVrS8qeas3ctdZvm3EmXM-_rfBL2oor8hgj0uM2pEtpbp5x8ImOyjQe_KY12YI8tWaiVS9muZGpTYDl8bt5MtfCMllMAtZglGc3vpwvrC53PElFuNMKiQs2M0lb4SMmSaiTSXT4EYe4Ra-OepN4GRbGJV5fg2fLrADp_/s1275/InkedScreenshot_166.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="1275" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8xvRwondrfNuits7tHOGdtVrS8qeas3ctdZvm3EmXM-_rfBL2oor8hgj0uM2pEtpbp5x8ImOyjQe_KY12YI8tWaiVS9muZGpTYDl8bt5MtfCMllMAtZglGc3vpwvrC53PElFuNMKiQs2M0lb4SMmSaiTSXT4EYe4Ra-OepN4GRbGJV5fg2fLrADp_/w640-h250/InkedScreenshot_166.jpg" width="640" /></a></div><span style="font-family: Poppins;"><span style="outline: none !important;"><b><span style="color: #741b47;"><p><br /></p></span></b><br /><br /><br /><br /></span></span><p></p><p><span style="font-family: Poppins;"><span style="outline: none !important;"><br /></span></span></p><p><b style="font-family: Poppins;">Step 6 :</b><span style="font-family: Poppins;"> This helped us to fix the issue. But note this is not a persistent route i.e. if system reboots these changes will get removed. so time to make it persistent, use the below command :</span></p><p><span style="font-family: Poppins;"><span style="outline: none !important;"><b><span style="color: #800180;">vi /etc/sysconfig/network-scripts/routes-eth0 </span></b></span><br /></span></p><p><span style="outline: none !important;"><span style="font-family: Poppins;">now in VI Editor just add the routes you want like below </span></span></p><p><span style="font-family: Poppins;"><span style="outline: none !important;"></span></span></p><span style="font-family: Poppins;">10.86.128.0/20 via 10.25.68.1 </span><div><span style="font-family: Poppins;">10.86.192.0/18 via 10.25.68.1 </span></div><div><span style="font-family: Poppins;">172.23.128.0/18 via 10.25.68.1</span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;">Hope this was helpful to get an insight. Going forward will also post how Route table works in Windows.</span></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-63662790091916637072022-07-17T07:27:00.061+05:302022-07-31T11:22:51.706+05:30Linux Useful commands<div><span style="font-family: Poppins;">Here are the list of some useful Linux commands that's used on a day-to-day work and are equally important for interview purposes. </span></div><div><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div><b><span style="color: #800180; font-family: Poppins;">1. How to check memory usage</span></b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>free -h</b></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBM4hYRiEN5bLfSVwnmJbUfCnfFfSMgeir0hoHRNzupAzKY_5s18PvDAKIj-iAEXSqru-01vMLUFJHo8dSUjK5OAnT8A2CpsXlvnZireqNrjacGl_PxUKURvoeVDEpgA7TuU67OzCCcPMdCWgiEBkLDmnl9yXihxnSZLcI82P2bbp_fFkUEaSo4Riv/s984/Screenshot_149.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="984" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBM4hYRiEN5bLfSVwnmJbUfCnfFfSMgeir0hoHRNzupAzKY_5s18PvDAKIj-iAEXSqru-01vMLUFJHo8dSUjK5OAnT8A2CpsXlvnZireqNrjacGl_PxUKURvoeVDEpgA7TuU67OzCCcPMdCWgiEBkLDmnl9yXihxnSZLcI82P2bbp_fFkUEaSo4Riv/s16000/Screenshot_149.png" /></a></div><br /><div><span style="font-family: Poppins;">-h is to make the result readable by humans.</span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="color: #800180; font-family: Poppins;"><b>2. How to check disk usage</b></span></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>df -h</b></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKa0XPnRIjpRsVDcPIUr6y43mw3Mb8BeWusbKNQWEzynNvJ3GQJ4Ip-6ZSw9z-anJ25a141ZJqn9j6g7xE6BvA_kQPm0Q0pMhfZAhglc2PxBWuAjahBv16nRn2dCS8hoi-jwgbGvTjETt9z9lnTpTkjJXbpfBXqDuyKtpz3zJ0ZjpP8WdK5ZA8yT92/s651/Screenshot_150.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="265" data-original-width="651" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKa0XPnRIjpRsVDcPIUr6y43mw3Mb8BeWusbKNQWEzynNvJ3GQJ4Ip-6ZSw9z-anJ25a141ZJqn9j6g7xE6BvA_kQPm0Q0pMhfZAhglc2PxBWuAjahBv16nRn2dCS8hoi-jwgbGvTjETt9z9lnTpTkjJXbpfBXqDuyKtpz3zJ0ZjpP8WdK5ZA8yT92/w400-h163/Screenshot_150.png" width="400" /></a></div><br /><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="color: #800180; font-family: Poppins;"><b><br /></b></span></div><div><span style="color: #800180; font-family: Poppins;"><b><br /></b></span></div><div><span style="color: #800180; font-family: Poppins;"><b><br /></b></span></div><div><b style="color: #800180; font-family: Poppins;">3. How to check CPU Usage</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>top</b></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXNmZgA7ry-uZs9IiexMXoPbj-uXtymKGtCPwqdaRI8YTgENqTLqxfgdWv6wFRGfFnCaaxRnLiiGyrzkxn3BsjypVGxMFtqL_15V_58LchxMdK3STEMvcQ21o--s-bgQ8H3bnm98GI2GuWYwHgOgNH-cAX8jGkAZ0xDy99m6zEeENU8ZJk2hCQBHDs/s894/Screenshot_151.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="894" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXNmZgA7ry-uZs9IiexMXoPbj-uXtymKGtCPwqdaRI8YTgENqTLqxfgdWv6wFRGfFnCaaxRnLiiGyrzkxn3BsjypVGxMFtqL_15V_58LchxMdK3STEMvcQ21o--s-bgQ8H3bnm98GI2GuWYwHgOgNH-cAX8jGkAZ0xDy99m6zEeENU8ZJk2hCQBHDs/w400-h155/Screenshot_151.png" width="400" /></a></div><br /><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><span style="color: #800180;"><b>4. How to quickly find the process id of a program</b></span></span></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>pgrep <ProcessName></b></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6OyB7J6H4xc-7Gx3SkPhTQUeiHCmeyqOeYmGSYfovSaELJmal1flZz2daJ886ZIIc22vRyLBBnYVJ-mnJC1XpRMCV7nM4T9phsHRuNtZNQWnJDoUroMN9LM0Ko2QWqCTHczmxV9vDnrzKcVbL0cXcxqk5tm2d2Srnh5hFytZRh7uE2Q0HZI0Hh1v/s333/Screenshot_153.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="154" data-original-width="333" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6OyB7J6H4xc-7Gx3SkPhTQUeiHCmeyqOeYmGSYfovSaELJmal1flZz2daJ886ZIIc22vRyLBBnYVJ-mnJC1XpRMCV7nM4T9phsHRuNtZNQWnJDoUroMN9LM0Ko2QWqCTHczmxV9vDnrzKcVbL0cXcxqk5tm2d2Srnh5hFytZRh7uE2Q0HZI0Hh1v/s320/Screenshot_153.png" width="320" /></a></div><br /><span style="font-family: Poppins;"><br /></span></div><div><span style="font-family: Poppins;"><br /></span></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;">5. How to find the Linux Kernal version</b></div><div><b style="color: #2b00fe; font-family: Poppins;">uname -r</b></div><div><div><span style="background-color: #eeeeee; font-family: Poppins;">amar@LPF22E8MA:~$ uname -r</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">4.4.0-19041-Microsoft</span></div></div><div><span style="background-color: #cccccc; font-family: Poppins;"><br /></span></div><div><b style="color: #800180; font-family: Poppins;">6. How to find the Operating System (OS) version</b></div><div><b style="font-family: Poppins;"><span style="color: #2b00fe;">cat /etc/os-release</span></b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>lsb_release -a</b></span></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><div><span style="background-color: #eeeeee; font-family: Poppins;">amar@LPF22E8MA:~$ <b><span style="color: #2b00fe;">cat /etc/os-release</span></b></span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">NAME="Ubuntu"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">VERSION="20.04 LTS (Focal Fossa)"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">ID=ubuntu</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">ID_LIKE=debian</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">PRETTY_NAME="Ubuntu 20.04 LTS"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">VERSION_ID="20.04"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">HOME_URL="https://www.ubuntu.com/"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">SUPPORT_URL="https://help.ubuntu.com/"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">VERSION_CODENAME=focal</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;">UBUNTU_CODENAME=focal</span></div><div><span style="background-color: #cccccc; font-family: Poppins;"><br /></span></div><span style="background-color: #eeeeee; font-family: Poppins;">amar@LPF22E8MA:~$ <b><span style="color: #2b00fe;">lsb_release -a</span></b><br />No LSB modules are available.<br />Distributor ID: Ubuntu<br />Description: Ubuntu 20.04 LTS<br />Release: 20.04<br />Codename: focal</span></div><div><span style="background-color: #eeeeee; font-family: Poppins;"><br /></span></div><div><div><b style="color: #800180; font-family: Poppins;">6. Want to see weather forecast in the Shell</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>curl wttr.in/bengaluru</b></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY3RUiGttgcvM4qw9GkK3gGBrk10q79HJ7amxCw98Bl2r7EC_57xPhFWKPNiCfV1hsF7OVHIlBiEdlvA1OJ7LZIPOmCO-oRqz5SXhczAjvvYUXdA5hNsD_pxsfTkACcV2m26iXL71xoB9JHeCCBrc-0I1L5wlJSCRyu4NXCUZbZVZRJ2qgPrxJJqg3/s1406/Screenshot_154.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="969" data-original-width="1406" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY3RUiGttgcvM4qw9GkK3gGBrk10q79HJ7amxCw98Bl2r7EC_57xPhFWKPNiCfV1hsF7OVHIlBiEdlvA1OJ7LZIPOmCO-oRqz5SXhczAjvvYUXdA5hNsD_pxsfTkACcV2m26iXL71xoB9JHeCCBrc-0I1L5wlJSCRyu4NXCUZbZVZRJ2qgPrxJJqg3/w640-h442/Screenshot_154.png" width="640" /></a></div><br /><div><br /></div><div><span style="color: #2b00fe; font-family: Poppins;"><br /></span><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;">7. Get live memory usage stats in a human readable format</b></div><div><div><span style="color: #2b00fe; font-family: Poppins;"><b>watch vmstat -sSM</b></span></div></div></div><div><span style="color: #2b00fe; font-family: Poppins;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipPEomfZSGg9l93msH4y2UhL2e5Du-lvluchKKbk2nTMy2cJshkzyb8WRT3uG_98qjc8SPJNyxPVHOzF8aQtiUXAJnRzmqcFbl-m8Au_G9C5zwYRHhVrmcYgi6ZB8nSB_HKVQB4OnEbkmUhv1JVEZreBV5jTnsBHa6F4KrHr3Cs0thJJCU0FwEyCuc/s712/Screenshot_155.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="712" data-original-width="505" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipPEomfZSGg9l93msH4y2UhL2e5Du-lvluchKKbk2nTMy2cJshkzyb8WRT3uG_98qjc8SPJNyxPVHOzF8aQtiUXAJnRzmqcFbl-m8Au_G9C5zwYRHhVrmcYgi6ZB8nSB_HKVQB4OnEbkmUhv1JVEZreBV5jTnsBHa6F4KrHr3Cs0thJJCU0FwEyCuc/s320/Screenshot_155.png" width="227" /></a></div><br /></span><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;"><br /></b></div><div><b style="color: #800180; font-family: Poppins;">8. How to encrypt a file using VI Editor</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b> vi -x test.txt</b></span></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEWMfneTHZxmJ0hN4oI9IUBWlK9mx8YeauJjBSn8KrsJk8YessZSof-2Ph2daq5-LQ-qjJFiUUWkVuO2yVb2DP5pmc2RXCANPyRsNBLi9RT-2l3sOwWtiD6dzRp62awePQdAej-HgDMr5g-YPTvM73kHML_RPdoGxE7jADbmbHDV3zwgCAGb_w4jgs/s451/Screenshot_156.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="451" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEWMfneTHZxmJ0hN4oI9IUBWlK9mx8YeauJjBSn8KrsJk8YessZSof-2Ph2daq5-LQ-qjJFiUUWkVuO2yVb2DP5pmc2RXCANPyRsNBLi9RT-2l3sOwWtiD6dzRp62awePQdAej-HgDMr5g-YPTvM73kHML_RPdoGxE7jADbmbHDV3zwgCAGb_w4jgs/s320/Screenshot_156.png" width="320" /></a></div></div><div><br /></div><div><div><b style="color: #800180; font-family: Poppins;">9. How to check whether computer is 32 bit or 64 bit</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>getconf LONG_BIT</b></span></div></div><span style="background-color: #cccccc;"><span style="font-family: Poppins;">amar@LPF22E8MA:~$ <span style="color: #2b00fe;"><b>getconf LONG_BIT</b></span><br />64</span></span><br /><div><br /></div><div><div><b style="color: #800180; font-family: Poppins;">10. How to limit the CPU Usage for a process</b></div><div><span style="color: #2b00fe; font-family: Poppins;"><b>cpulimit -p <pid of the process> -l 25</b></span></div></div><div><br /></div></div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-17107907894731747492022-07-06T15:56:00.002+05:302022-08-08T20:03:07.269+05:30PowerShell Tip : How to copy a file remotely using WINRM<p><span style="font-family: Poppins;">Today, we are going to see how to copy a file to remote destination using WINRM. Traditionally SMB Protocol (File Sharing \\Servername\C$) was used to transfer the files but nowadays you will find SMB Protocol disabled on some servers so you will require firewall changes to perform that. </span></p><p><span style="font-family: Poppins;">On the other hand WINRM Protocol 5985 is mostly open for Powershell Remote sessions, so we will use that to transfer the files.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQpHIpsJ3At5iB2ob6jCbSnwlBsH3UZsgldGIC2LPD1rQJ7PeGaai93bj-a30U7HSCD5pBzCLBdvgk39nSGc9MOC3a-QUxM_kGLQTCWoSm-K1TwxHzGy0nEcSg9YgFt-zSurOXr2dBvS0RcTkb4wvIpDs9RoQk3o7DhA7LWVHp1N2Ld5opOyTMI94/s1920/5319494.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQpHIpsJ3At5iB2ob6jCbSnwlBsH3UZsgldGIC2LPD1rQJ7PeGaai93bj-a30U7HSCD5pBzCLBdvgk39nSGc9MOC3a-QUxM_kGLQTCWoSm-K1TwxHzGy0nEcSg9YgFt-zSurOXr2dBvS0RcTkb4wvIpDs9RoQk3o7DhA7LWVHp1N2Ld5opOyTMI94/w640-h360/5319494.jpg" width="640" /></a></div><h2 style="text-align: left;"><span style="color: #6aa84f; font-family: Poppins;">Lets get started :</span></h2><p></p><p><span style="font-family: Poppins;"><b><span style="color: #4c1130;">Step 1 :</span></b> Create a PS Session for that server <br /></span></p><p><span style="color: #2b00fe; font-family: Poppins;"><b>$Session = New-PSSession -ComputerName <ServerName></b></span></p><p><span style="font-family: Poppins;"><b><span style="color: #4c1130;">Step 2 :</span></b> Use Copy-Item with -ToSession to transfer the file using WINRM</span></p><p><span style="color: #2b00fe; font-family: Poppins;"><b>Copy-Item -Path C:\Scripts\Amar\TestFile.txt -ToSession $Session -Destination "D:\"</b></span></p><p><span style="font-family: Poppins;">TestFile.txt file will get copied from local system to the D Drive of the remote server.</span></p><p><span style="font-family: Poppins;">Happy Learning :)</span></p>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-19539978501276454852022-07-01T15:00:00.003+05:302022-07-01T15:00:29.619+05:30ActiveDirectory : How to find unused AD User accounts using Powershell<p><span style="font-family: Poppins;">Today we are going to learn how to remove an AD User which is not Active since a long time lets say 1 year. As a part of Server hardening best practices, you should always run checks to remove the disabled or orphan accounts from Active directory.</span></p><p><span style="font-family: Poppins;">We will be using the Active Directory module in Powershell to perform the activity :</span><br /></p><h2 style="text-align: left;"><b><span style="color: #741b47; font-family: Poppins;">CODE : </span></b></h2><p></p><div><span style="color: #741b47; font-family: Poppins;"><b></b></span></div><span style="background-color: white;"><span style="color: #2b00fe; font-family: Poppins;">$Date =(Get-Date).AddDays(-365)<br />Get-ADUser -Filter 'LastLogondate -le $Date' -Properties LastLogonDate |<br />Select Name, LastLogonDate</span></span><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFAiD5oAoRWnXPcCePbz9NoNy1zrAZkQNAeVHtNNHfHW7jwtgnlLIA3wMK_J2uAOm8BvuMuFYs5ClYsXBiA5mR_Qp1VDEPRs9h0Qe3NBRk0aMvvk3BUjpSUxODIXAYpAnc4iMibfoWx047k0bX9AYsAAgjR0WNEi8XY2h49R6oLDoH87KwpCK1n3bW/s917/Screenshot_139.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="451" data-original-width="917" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFAiD5oAoRWnXPcCePbz9NoNy1zrAZkQNAeVHtNNHfHW7jwtgnlLIA3wMK_J2uAOm8BvuMuFYs5ClYsXBiA5mR_Qp1VDEPRs9h0Qe3NBRk0aMvvk3BUjpSUxODIXAYpAnc4iMibfoWx047k0bX9AYsAAgjR0WNEi8XY2h49R6oLDoH87KwpCK1n3bW/s16000/Screenshot_139.png" /></a><div style="text-align: left;"><span style="font-family: Poppins;">To remove the ADUser use : <b><span style="color: #4c1130;">Remove-ADUser -Identity "<SamAccountName>"</span></b></span></div></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-33358376365017253962022-06-28T12:10:00.007+05:302022-07-28T14:57:48.294+05:30Linux Tip : How to Switch user as root if you have Sudoers access<span style="font-family: Poppins;">Today we will see how one can become a root user if he / she has sudoers access. In some organizations if you try to switch user to root ( sudo su - root ), you may see error like below :<br /><br /><b><span style="color: #800180;">Sorry, user <username> is not allowed to execute '/bin/su - root' as root on <hostname></span></b></span><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidnu56QByFTzRVM8xQLH_5Ycz-yqj8Yte4BhpYzDXwVMjFsYZWDej32hf4X_RwaZKDSF9iOUzXaG7MbgVzw2dzPFviLmsljE65J9vN8W3AsMrV2Eeq93HahvB8fibvBov7Ju8l-BxLeqTmxipMLn-pLgi80SC8BpBJRg3Pbmkr5BA-5n1mLsb1SeyI/s1212/Screenshot_135.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="458" data-original-width="1212" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidnu56QByFTzRVM8xQLH_5Ycz-yqj8Yte4BhpYzDXwVMjFsYZWDej32hf4X_RwaZKDSF9iOUzXaG7MbgVzw2dzPFviLmsljE65J9vN8W3AsMrV2Eeq93HahvB8fibvBov7Ju8l-BxLeqTmxipMLn-pLgi80SC8BpBJRg3Pbmkr5BA-5n1mLsb1SeyI/w640-h242/Screenshot_135.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: Poppins;">But you can try other method to switch as root user. Lets look into those steps.</span></div><p style="clear: both; text-align: left;"><span style="font-family: Poppins;"><b>Method 1 :</b> Type <b><span style="color: #6aa84f;">sudo vi -c '!bash'</span></b> in the command line console and that's it.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu0jf2S2g16wWtGJVkq6ONVqW2LM8N0B-JgDnPAe-GhsjLTO40K0TXcbfWsBzfgp819GxYuU5u2xdNeqZpwTCF-MyTJPFPDUAFq0osErnnf0RpHigp8qA7Nq3nHPaO_auI2rJqfi6oZNO2SdH7zNLyLBQSwPwEyNfNCeTCT5WGuw_5XPrQQN7BaOq1/s728/Screenshot_136.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Poppins;"><img border="0" data-original-height="87" data-original-width="728" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu0jf2S2g16wWtGJVkq6ONVqW2LM8N0B-JgDnPAe-GhsjLTO40K0TXcbfWsBzfgp819GxYuU5u2xdNeqZpwTCF-MyTJPFPDUAFq0osErnnf0RpHigp8qA7Nq3nHPaO_auI2rJqfi6oZNO2SdH7zNLyLBQSwPwEyNfNCeTCT5WGuw_5XPrQQN7BaOq1/s320/Screenshot_136.png" width="320" /></span></a></div><div><span style="font-family: Poppins;"><b>Method 2 :</b><span style="font-weight: bold;"> </span>Type <span style="color: #6aa84f;"><b>sudo vi a.txt</b></span> in the command line console , it will open vi editor just press ESC (Escape) and then <span style="color: #6aa84f;"><b>:sh</b></span> and Enter<br /><br /></span></div><div><span style="font-family: Poppins;">Hope you all enjoyed this little hack, do share your queries in the comment box below.</span><br /><br /></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-49246860718568261352022-06-27T15:17:00.002+05:302022-08-08T20:08:16.060+05:30PowerShell Tip : How to find Host node name from inside the VM<p><span style="font-family: Poppins;">Let's assume a scenario where you are inside the Virtual Machine but you want to the know the Host node name. Unless you maintain some inventory management system, it would be a troublesome job to identify the same.</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij7IHhm1iS47DQVbORPtNzA9ZbQbLbplkNrYWoVeNcr8HDO1zHqzMyokgfXOdvevxze6dyYxJWS8mcYu9OiuVCGimcnIj9B4bgfOfGqVPUUCcwgI1BYKHHurMu9QNQlvGKCJpGWZ8wi-b-1bNLoamcRROiUz6j3rkZjYs2Y-aNjl9AwxJNNlqPWCFJ/s1920/2648969.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij7IHhm1iS47DQVbORPtNzA9ZbQbLbplkNrYWoVeNcr8HDO1zHqzMyokgfXOdvevxze6dyYxJWS8mcYu9OiuVCGimcnIj9B4bgfOfGqVPUUCcwgI1BYKHHurMu9QNQlvGKCJpGWZ8wi-b-1bNLoamcRROiUz6j3rkZjYs2Y-aNjl9AwxJNNlqPWCFJ/w640-h360/2648969.jpg" width="640" /></a></div><span style="font-family: Poppins;"><br />Here is how this can be achieved using Powershell. Just run the below one-liner on the VM :</span><p></p><h3 style="text-align: left;"><span style="color: #800180; font-family: Poppins;">(Get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")</span></h3>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-17338711056913971482022-05-28T12:53:00.010+05:302022-08-09T20:24:45.173+05:30Kubernetes and Docker Notes<h3 style="text-align: left;"><b><span><span style="color: #2b00fe; font-family: Poppins;">What is Kubernetes ?</span></span></b></h3><p><span style="font-family: Poppins;">Kubernetes (K8s) is a container orchestration tool, which helps to manage, deploy and scale containers like Docker etc. Kubernetes was designed by Google using Go Lang.</span></p><h3 style="text-align: left;"><b><span style="font-family: Poppins;"><span style="color: #2b00fe;">What is Docker ?</span></span></b></h3><p><span style="font-family: Poppins;">Docker is an open source project that automates the deployment of applications inside containers.</span></p><h3 style="text-align: left;"><b><span style="color: #2b00fe; font-family: Poppins;">What are Containers ?</span></b></h3><p><span style="font-family: Poppins;">⚡Containers are basically layer of Base image and application image, stacked together with all their necessary dependencies and configuration.</span></p><p><span style="font-family: Poppins;">⚡Containers are portable and scalable. </span></p><div style="text-align: left;"><span style="font-family: Poppins;"><b><span style="color: #800180;">Docker Public Repository :</span> </b><a href="https://hub.docker.com/">https://hub.docker.com/</a></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZA-L5O5qOQaVKp4exM79VLcNIkCWG3PUpzchXWWE1mctYGQ0DVPIdcdn3KEO1wcaFf9j1bepblYiDVH_VNfcOvd45eBZIUoPbE9q6kv7GLLWDP7Ysl6TTg9B6ad6Wy-rac7Y1bpgzf__4CypyWi1jj1dz_vjIgce1NrZhlDRTxrJBL-cAmOkGB4Fg/s1034/Screenshot_4.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: Poppins;"><img border="0" data-original-height="689" data-original-width="1034" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZA-L5O5qOQaVKp4exM79VLcNIkCWG3PUpzchXWWE1mctYGQ0DVPIdcdn3KEO1wcaFf9j1bepblYiDVH_VNfcOvd45eBZIUoPbE9q6kv7GLLWDP7Ysl6TTg9B6ad6Wy-rac7Y1bpgzf__4CypyWi1jj1dz_vjIgce1NrZhlDRTxrJBL-cAmOkGB4Fg/s16000/Screenshot_4.png" /></span></a><span style="font-family: Poppins;"><br /></span><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><h3 style="text-align: left;"><span style="font-family: Poppins;"><b><span style="color: #800180;">How to install Docker on Windows</span></b><b><span style="color: #800180;"> ?</span></b></span></h3><div style="text-align: left;"><span style="color: #2b00fe; font-family: Poppins;"><b>Note :</b> Hardware Virtualization should be enabled on the host box in order to install Docker. </span></div><div style="text-align: left;"><span style="color: #2b00fe; font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;">1. Go to the link = <span style="text-align: center;"><a href="https://docs.docker.com/desktop/windows/install/">https://docs.docker.com/desktop/windows/install/</a></span></span></div><div style="text-align: left;"><span style="font-family: Poppins;">2. Download and Install the application</span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><img border="0" data-original-height="295" data-original-width="669" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s16000/Screenshot_119.png" /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNrVTjyfAF1_LeKKQTzw3z6Au5mxhBc1529VezgKT7AUdqi2U3Ej8dx6-Vg3IZrbPCfk2DfkV8vLQoG2lxqPxPudODTsveIRvOzENqIK1tRjUmTRWvNrpv7Khjr4_unLj3TmkVoSz2Kk1yYXWmxI3A6uhhnNmV683iGYyF7WPc3XMbbXzJ7eIPPsR/s669/Screenshot_119.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: Poppins;"><br /></span></a></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;">To verify if installation was successful or not, just type : </span></div><div style="text-align: left;"><b><span style="color: #2b00fe; font-family: Poppins;">docker run hello-world</span></b></div><div style="text-align: left;"><span style="color: #274e13; font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;">while running the above command I got the below error, it was because I didn't run Docker desktop app with elevated privileges. so I executed the app via Run as administrator and It gave me message installation was done successfully.</span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXn078VSoPCF0s6HjSFKq-4zpGuZRYapCk9YYtvkm9rXLP3QJ0vhe0sODnRpDnU0SEECG7SMa88PF28knHIZcLSd1hLQ0BixVqQLbFGSSBNWqQ79kIW9XUcUAr8igOUEnCihYi5JqXk_ciLO3oVQf8kGJimuyO1bgiNaOJp7i5val18WX56ZX0t9a0/s1894/Screenshot_120.png" style="clear: left; display: inline; margin-bottom: 1em; margin-left: 1em; text-align: center;"><span style="font-family: Poppins;"><img border="0" data-original-height="758" data-original-width="1894" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXn078VSoPCF0s6HjSFKq-4zpGuZRYapCk9YYtvkm9rXLP3QJ0vhe0sODnRpDnU0SEECG7SMa88PF28knHIZcLSd1hLQ0BixVqQLbFGSSBNWqQ79kIW9XUcUAr8igOUEnCihYi5JqXk_ciLO3oVQf8kGJimuyO1bgiNaOJp7i5val18WX56ZX0t9a0/w400-h160/Screenshot_120.png" width="400" /></span></a></div><div style="text-align: left;"><b><span style="color: #800180; font-family: Poppins;"><br /></span></b></div><h3 style="text-align: left;"><b><span style="color: #2b00fe; font-family: Poppins;">How to pull the container image and run it once downloaded ?</span></b></h3><div style="text-align: left;"><span style="font-family: Poppins;">=><span style="color: #38761d;"> docker run <imagename:version></span></span></div><div style="text-align: left;"><span style="font-family: Poppins;">Example : docker run postgres:9.6</span></div><div style="text-align: left;"><span style="font-family: Poppins;"><br /></span></div><div style="text-align: left;"><span style="font-family: Poppins;">The above command will first try to find the image locally and if it doesn't find the image there, it will try to search for the image in public repo.</span></div></div><h3 style="text-align: left;"><span style="font-family: Poppins;"><span style="color: #2b00fe;"><b>How to see the list of running containers ?</b></span></span></h3><div style="text-align: left;"><span style="font-family: Poppins;">=> <span style="color: #274e13;">docker ps</span></span></div>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-53219995099380375852022-05-11T19:40:00.000+05:302022-05-11T19:40:15.580+05:30Powershell Tip : How to fetch public ip using Powershell ConsoleThere are several ways to fetch your public ip like below :<br /><br /><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7abIItFvyxeYszFFfltCC4UBa8fI_zk2SXvDYcIZzdglZqNZp-Ln1a4MEpSYIc6wdQhslKPDRZmdU0bUfsHhUO8Yi96ly6LGFqvDM0WsC3QtX2VwuNPrQAVrT1jqsOE3Emwx8pUReO5Jax5q-UgX69tru_llOxXFn0AFUgdD3GJ8jVzquVtrCwtw3/s1218/Screenshot_29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="484" data-original-width="1218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7abIItFvyxeYszFFfltCC4UBa8fI_zk2SXvDYcIZzdglZqNZp-Ln1a4MEpSYIc6wdQhslKPDRZmdU0bUfsHhUO8Yi96ly6LGFqvDM0WsC3QtX2VwuNPrQAVrT1jqsOE3Emwx8pUReO5Jax5q-UgX69tru_llOxXFn0AFUgdD3GJ8jVzquVtrCwtw3/s16000/Screenshot_29.png" /></a></div><div class="separator" style="clear: both; text-align: left;">But today we are going to see the simplest way to fetch the same via Powershell console :<br /><br /><b><span style="color: #800180;">Command : (Invoke-WebRequest -uri "http://ifconfig.me/ip").Content</span></b><br /><br /></div><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhDyKY0O_meJ0FmX89CNjYvqnnZhi57mxSrWph-GqJ4Hqxc9hGfpTT5L9CwDfjPiieKNmBcmYjLOX05oWa8VtPcnxGOt5c6Ul_AedAMWf9431VU43AhCPwA1m3WUnb7cjxgNsuwca3hW6LRJil3yHdLAM_35NmpLdin06gB7waMP-1K9p-8jdd54S3/s1031/Screenshot_28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="316" data-original-width="1031" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhDyKY0O_meJ0FmX89CNjYvqnnZhi57mxSrWph-GqJ4Hqxc9hGfpTT5L9CwDfjPiieKNmBcmYjLOX05oWa8VtPcnxGOt5c6Ul_AedAMWf9431VU43AhCPwA1m3WUnb7cjxgNsuwca3hW6LRJil3yHdLAM_35NmpLdin06gB7waMP-1K9p-8jdd54S3/w315-h98/Screenshot_28.png" width="315" /></a></div><br />IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-68498449210606345522022-05-09T12:37:00.008+05:302022-07-31T11:25:20.518+05:30How to check if SPF Record is valid or not ?<p>Before starting, lets understand <b><span style="color: #2b00fe;">what is SPF Record and its uses </span></b>?<br /><br /><b><span style="color: #800180;">SPF Record</span></b> is a Sender Policy Framework record. It is used by the mail servers to identify if the mails are coming from an authorized hosts or not. This helps to prevent spammers from sending mails using the Fake From address of your domain.<br /><br />Always avoid to keep multiple SPF Records for a domain.<br /><br />You can use the below domains to create or check if SPF Record is valid or not :<br /><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdM210sJx76VoT6bxwRBIqjrvJZ2btMbhCIrmoGMJ896en1c-i5oqkp49wwNytusW1IbWUBcDThlQrAJI1OOvpCeLMc7I1cJRy0VEfMLk6F471XUcDWWFhq-NqebdVvicrCECnh_kx6wKnq7ZkU5ODmpxH9tCanX2Qm5Y9iwz_Nnchw6GHn1JAGO2/s1063/Screenshot_19.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="934" data-original-width="1063" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdM210sJx76VoT6bxwRBIqjrvJZ2btMbhCIrmoGMJ896en1c-i5oqkp49wwNytusW1IbWUBcDThlQrAJI1OOvpCeLMc7I1cJRy0VEfMLk6F471XUcDWWFhq-NqebdVvicrCECnh_kx6wKnq7ZkU5ODmpxH9tCanX2Qm5Y9iwz_Nnchw6GHn1JAGO2/s16000/Screenshot_19.png" /></a></div><br /><br />1. <a href="#">Create and check SPF record online (spf-record.com)</a><br />2. <a href="#">Free SPF Record Checker - Check SPF Record - SPF Record Lookup - DMARCLY</a><br />3. <a href="#">SPF Query Tool (kitterman.com)</a><p><a href="https://www.kitterman.com/spf/validate.html"></a></p>IT SECURITY Teamhttp://www.blogger.com/profile/02524036709091620859noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-7126146706958529952020-06-16T16:14:00.000+05:302020-06-16T16:14:28.269+05:30How to see remote changes before doing Git PullBefore going through the steps, lets first understand what is the purpose of GIT Pull ?<div><br /></div><div>In simple terms, GIT PULL is a GIT Command which access the Remote repository and checks which all files were modified or created and is different from the local repository. Once it finds that info, it downloads those file to your local repository. </div><div><br /></div><div>Technically speaking, GIT Pull runs 2 commands i.e GIT Fetch and GIT Merge in background. GIT Fetch downloads the latest change to the local repository while GIT Merge merges the remote content refs and heads to new local merge commit.</div><h3 style="text-align: left;"><font color="#0e12e8">so you can say the below is same :</font></h3><div>GIT Pull <remote></div><div>-or-</div><div>GIT Fetch <remote></div><div>GIT Merge origin/master</div><div><br /></div><div>So lets begin with the steps on how to see the remote (origin/master) changes before doing Git Pull : </div><div><br /></div><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-XlX4jKlC4eI0hNjUk1FvuXRiaCAH1otqHglcGPd61aRQxR6FhtdOqM6LPO8d6cUAEQu-aC72v3ElUdrWQysjjfzJhJYrslTNH7jz8I-tkTc8fMFJ3GVe08ITvsgiaX8m15qtiQroMoM/s919/Screenshot_462.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="723" data-original-width="919" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-XlX4jKlC4eI0hNjUk1FvuXRiaCAH1otqHglcGPd61aRQxR6FhtdOqM6LPO8d6cUAEQu-aC72v3ElUdrWQysjjfzJhJYrslTNH7jz8I-tkTc8fMFJ3GVe08ITvsgiaX8m15qtiQroMoM/d/Screenshot_462.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;"><b><font color="#7b1fa2"><br /></font></b></div><div style="text-align: left;"><b><font color="#7b1fa2">Git fetch origin</font></b></div><div style="text-align: left;"><b><font color="#7b1fa2">Git log master..origin/master</font></b></div><div style="text-align: left;"><b><font color="#7b1fa2">Git diff master..origin/master</font></b></div><div style="text-align: left;"><b><font color="#7b1fa2">Git pull / Git merge origin/master</font></b></div></td></tr></tbody></table><div><div><br />Happy Leaning!</div><div><br /></div><div>How to get started with GIT in Windows : <b><a href="https://www.amarhelloween.com/2017/09/all-about-using-git-in-windows.html" target="_blank">Check out here</a></b></div></div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-75492709231181355232020-06-15T16:07:00.006+05:302020-06-15T16:22:04.882+05:30Powershell Tip : How to find the IP Address of a VM from a HyperVToday we are going to see how to fetch the IPv4 Address details of a VM from a HyperVisor console. We will be using Powershell to achieve the same with a One-Liner code. <div><br /></div><div>You can modify the Command as per your need. Our requirement is to check Only the Running VM's and get the VM Name and its corresponding IPv4 Address. So lets get started.</div><h2 style="text-align: left;"><b style="background-color: white;"><font color="#7b1fa2">CODE (Execute in HyperV ):</font></b></h2><div style="text-align: left;"><img border="0" data-original-height="260" data-original-width="1917" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkZT6A2DiuSum0hi62Gsae3MI1BkSFFaw_4J6ccsbUe19Xw1ENJZg4odzr1PWyJ8sJdRhzhv5xC7QCNTnNAGRT7CeZsxOiCXqk6-H6MEm8ZjFBSvLM5oP5K40MtRdo6GymGk_Nj4Vx2Nul/d/Screenshot_237.png" /></div><div class="separator" style="clear: both; text-align: center;"><pre style="text-align: left;">Get-VM | ? State -eq "Running" | select Name, @{l="IPv4Address";e={($_.NetworkAdapters.IPAddresses -match "(?<Address >((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))")} }</pre><h2 style="text-align: left;"><font color="#7b1fa2">CODE DETAILS :</font></h2></div><div class="separator" style="clear: both; text-align: center;"><pre style="text-align: left;"><font face="georgia">1. Get-VM : Fetches the VM List present on the HyperVisor<br />2. ? State -EQ "Running"<b> :</b> It is similar to Where-Object {$_.State -eq "Running"} , here we are using where-object to fetch only the Running VM list from the Pipeline.<br />3. NetworkAdapters properties of the VM Contains the IPAddresses information, we are using IPv4 address Regex to get the valid IPv4 address and ignore IPv6 address ( you can modify this as per your need)</font></pre></div><div class="separator" style="clear: both; text-align: left;">Hope you all liked this post. Do share and provide your comments below in case of any query.</div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0India20.593684 78.96288-7.7165498361788458 43.80663 48.903917836178849 114.11913tag:blogger.com,1999:blog-1899784301784281292.post-85015596799428274292020-06-08T14:29:00.001+05:302020-06-08T14:31:37.728+05:30Disposable Phone Number website list to receive OTP Messages<p style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; margin-bottom: 1.6em;">Here’s the List of website from where you can get several countries disposable phone numbers which you can use to retrieve messages like OTP and so on.</p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzdilMql77mQsCFol5I6oaa1apw7JT4FqVbdv45q6AREE2Jp_V_VNfW3mhzDttGH6MCxrqRU6_PG-JJQRLLECIdWQo_to2KQ43lzgciw7KSBvx3ry8jlB00bxTdbm_EwQJdDdU6KWOh9eR/s1501/Screenshot_201.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="856" data-original-width="1501" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzdilMql77mQsCFol5I6oaa1apw7JT4FqVbdv45q6AREE2Jp_V_VNfW3mhzDttGH6MCxrqRU6_PG-JJQRLLECIdWQo_to2KQ43lzgciw7KSBvx3ry8jlB00bxTdbm_EwQJdDdU6KWOh9eR/w640-h364/Screenshot_201.png" width="640" /></a></div><h2 style="text-align: left;"><font color="#3367d6">List of websites who provide Disposal Numbers :</font></h2><ol style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.6em 2.4em; padding: 0px;"><li style="box-sizing: inherit;"><a href="https://www.receivesmsonline.net/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receivesmsonline.net</a></li><li style="box-sizing: inherit;"><a href="http://receivefreesms.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receivefreesms.com</a></li><li style="box-sizing: inherit;"><a href="https://www.freeonlinephone.org/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">freeonlinephone.org</a></li><li style="box-sizing: inherit;"><a href="http://receive-sms-online.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receive-sms-online.com</a></li><li style="box-sizing: inherit;"><a href="http://sms-receive.net/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">sms-receive.net</a></li><li style="box-sizing: inherit;"><a href="http://sellaite.com/smsreceiver/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">sellaite.com</a></li><li style="box-sizing: inherit;"><a href="http://www.receive-sms-now.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receive-sms-now.com</a></li><li style="box-sizing: inherit;"><a href="http://www.receive-sms-online.info/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receive-sms-online.info</a></li><li style="box-sizing: inherit;"><a href="http://hs3x.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">hs3x.com</a></li><li style="box-sizing: inherit;"><a href="https://smsreceivefree.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">smsreceivefree.com</a></li><li style="box-sizing: inherit;"><a href="http://receivesmsonline.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receivesmsonline.com</a></li><li style="box-sizing: inherit;"><a href="http://freesmsverification.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">freesmsverification.com</a></li><li style="box-sizing: inherit;"><a href="https://www.receiveasms.com/" style="background-color: transparent; border-bottom: 2px solid transparent; box-sizing: inherit; color: #c7400e; font-weight: 700; overflow-wrap: break-word; text-decoration-line: none; transition: all 0.1s ease 0s;" target="_blank">receiveasms.com</a></li></ol><p style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; margin-bottom: 1.6em;">Note : Don’t use this websites for any kind of illegal activity, since logs are maintained everywhere.</p>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-72621574372615223282020-06-08T13:42:00.001+05:302020-06-08T13:42:27.560+05:30Powershell Tip : How to Change the Error Foreground Color in PowerShell<span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;">For one or the other reason we sometimes don’t like the "Red colored ERROR" which we used to get when we come across some error in powershell like below :</span><div><span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf51S3e9I52gEP4rNDqTyzMjn2d2MLz3u9896_bNfeGjlLh927kW57I_3iYSf4ptuI_wpGy9TZBWfNtRNW3xUkd7QpyrLdAaMKxFOjhOZ_omQVaLD_8c5omDRHiyvfZFwJA7keTtsxSqHn/s1919/Screenshot_198.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="317" data-original-width="1919" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf51S3e9I52gEP4rNDqTyzMjn2d2MLz3u9896_bNfeGjlLh927kW57I_3iYSf4ptuI_wpGy9TZBWfNtRNW3xUkd7QpyrLdAaMKxFOjhOZ_omQVaLD_8c5omDRHiyvfZFwJA7keTtsxSqHn/w640-h106/Screenshot_198.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><p style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; margin-bottom: 1.6em;">So lets change this red color shown in the console, although its of no use(i.e technically speaking, it will work in the same way) but still just for learning purpose lets do it.</p><p style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; margin-bottom: 1.6em;">In order to make this ERROR Foreground as any other color(over here green), write the below command in the Powershell console.</p><h2 style="background-color: white; box-sizing: inherit; clear: both; color: #495762; font-family: ubuntu, sans-serif; font-size: 31.2px; font-weight: 400; line-height: 1.3; text-align: left;"><span style="box-sizing: inherit; color: blue;">$Host.PrivateData.ErrorForegroundColor = "Green"</span></h2><div><span style="box-sizing: inherit; color: blue;"><h3 style="background-color: white; box-sizing: inherit; clear: both; color: #495762; font-family: ubuntu, sans-serif; font-size: 36.4px; font-weight: 400; line-height: 1.3;"><span style="box-sizing: inherit; color: maroon;">Output :</span></h3><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCHFA8wGVSsxKck5jN4XMq5vqFozFPpAFkQ75QQ0oTBKT3GW-L8h7iyNMr2WQ6aXLQZK-cVFIC15b4q84F7gmOl2Lec1ybglgABLSgqBgVQp_qhY9Gm1518E1DVVcjzOzLNTDv_v5djufR/s1148/Screenshot_199.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="352" data-original-width="1148" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCHFA8wGVSsxKck5jN4XMq5vqFozFPpAFkQ75QQ0oTBKT3GW-L8h7iyNMr2WQ6aXLQZK-cVFIC15b4q84F7gmOl2Lec1ybglgABLSgqBgVQp_qhY9Gm1518E1DVVcjzOzLNTDv_v5djufR/w640-h196/Screenshot_199.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;">Quite interesting right, Not only this you can change colors of several properties like Warning, Debug, Verbose etc.</span></div><div class="separator" style="clear: both; text-align: left;"><span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;">Just run</span><span style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; font-weight: 700;"><span style="box-sizing: inherit; color: blue;"> $Host.PrivateData | get-member</span></span></div><div class="separator" style="clear: both; text-align: left;"><span style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; font-weight: 700;"><span style="box-sizing: inherit; color: blue;"><br /></span></span></div><div class="separator" style="clear: both; text-align: left;"><span style="background-color: white; box-sizing: inherit; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px; font-weight: 700;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Imt2N6trDYoJN8f03fpC_jb5692QWbT_uTUoylLGeHlRZb1LES5zmUYW_trCKcWriUZyAL6Y6FtDSHgVKUiAeV0N20t1QCkyUDzUXwggp8ST1gMwBB8_imDOX8kZGIK1UWZRRttGQsNg/s1389/Screenshot_200.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="731" data-original-width="1389" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Imt2N6trDYoJN8f03fpC_jb5692QWbT_uTUoylLGeHlRZb1LES5zmUYW_trCKcWriUZyAL6Y6FtDSHgVKUiAeV0N20t1QCkyUDzUXwggp8ST1gMwBB8_imDOX8kZGIK1UWZRRttGQsNg/w640-h336/Screenshot_200.png" width="640" /></a></div><span style="box-sizing: inherit; color: blue;"><br /></span></span></div><span style="box-sizing: inherit; color: maroon;"><span style="background-color: white; color: #495762; font-family: karla, tahoma, sans-serif; font-size: 16px;">Hope you all enjoy this Post, Do Like, Share and Comment if you have any suggestion or queries.</span></span></div></span></div></div></div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-39873844011877442042020-06-07T18:33:00.009+05:302020-06-08T13:19:05.275+05:30Plesk Tip : How to Find cron or task scheduler details of a specific Customer<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ZDMgqhEqDoDboo9FElSzT-yUrpcFy41TAfXFqnnjVSRXUJXKBf0NMs1qxcCU7Y4SBWmuzxDIyPaOSKTey9a0S3HM9eW6js70VYQhrK5zU8OPwDIJgwTogaIC_qAwBF-unAvPSiYNxj9b/s560/a.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="560" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ZDMgqhEqDoDboo9FElSzT-yUrpcFy41TAfXFqnnjVSRXUJXKBf0NMs1qxcCU7Y4SBWmuzxDIyPaOSKTey9a0S3HM9eW6js70VYQhrK5zU8OPwDIJgwTogaIC_qAwBF-unAvPSiYNxj9b/w640-h360/a.png" width="640" /></a></div><h3 style="text-align: left;">Tested on : Plesk Obsidian, Windows 2012 R2</h3>Few days back i was looking into a way to find the cron details of a customer and once its fetched remove the crons created by that user.<br /><br />Through GUI, it can be done in 2 ways :<div><br /></div><div>1. Go to Tools & Settings > Scheduler Tasks -or- Domains > Schedule Tasks</div><div>2. Login to the server > Open Task scheduler (taskschd) and Look into the task with description. You will get the domain id there</div><div><br /></div><div>But the above mentioned process is quite cumbersome. So after digging a lot, I was able to figure it out using Powershell.<br /><h2 style="text-align: left;"><b style="background-color: white;"><font color="#7b1fa2" style="background-color: white;">To get all the cron details of a particular Customer :</font></b></h2></div><pre style="text-align: left;"><pre style="text-align: left;">& "$Env:Plesk_Bin\Crontabmng.exe" get "CustomerName"</pre></pre><h2 style="text-align: left;"><font color="#7b1fa2">To Remove all the crons of a particular Customer :</font></h2><pre style="text-align: left;">& "$Env:Plesk_Bin\Crontabmng.exe" remove "CustomerName"</pre>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-9726742811324120132020-06-07T17:47:00.002+05:302020-06-07T17:47:47.751+05:30Powershell Tip : How to find the disk type of your System ( HDD or SSD )Hi Friends😀<div><br /></div><div>Today we are going to learn how to find the disk type of your system i.e. whether it is SSD ( Solid State Drive ) or HDD ( Hard Disk Drive ).</div><div><br /></div><div>Powershell has a cmdlet which helps to achieve the same : <b><font color="#b51200">Get-PhysicalDisk</font></b></div><div><b><font color="#b51200"><br /></font></b></div><div><b><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41qrxlP3NbUjGeBsDXy-wbx3-wlgtnAPB3pf1Jr0hnm7Pfsgvlcduc38lGRoiNLnK-tibW0e4LZkhIme3sjkDOUW0WiTqfPQufQpTmhHQLRMR1U7r2PlasfXa_dlgyFsFUaELlIjb8LMX/s993/Screenshot_459.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="366" data-original-width="993" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41qrxlP3NbUjGeBsDXy-wbx3-wlgtnAPB3pf1Jr0hnm7Pfsgvlcduc38lGRoiNLnK-tibW0e4LZkhIme3sjkDOUW0WiTqfPQufQpTmhHQLRMR1U7r2PlasfXa_dlgyFsFUaELlIjb8LMX/d/Screenshot_459.png" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41qrxlP3NbUjGeBsDXy-wbx3-wlgtnAPB3pf1Jr0hnm7Pfsgvlcduc38lGRoiNLnK-tibW0e4LZkhIme3sjkDOUW0WiTqfPQufQpTmhHQLRMR1U7r2PlasfXa_dlgyFsFUaELlIjb8LMX/s993/Screenshot_459.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><div style="background-color: #0c0c0c; display: inline-block; font-family: Consolas, monospace; font-size: 15pt; padding: 4px; white-space: pre;"><span style="color: #f9f1a5;">Get-PhysicalDisk</span><span style="color: #cccccc;"> | </span><span style="color: #f9f1a5;">Select </span><span style="color: #cccccc;">FriendlyName</span><span style="color: #767676;">, </span><span style="color: #cccccc;">MediaType</span><span style="color: #767676;">, </span><span style="color: #cccccc;">Size</span></div></a></div><font color="#b51200"><br /></font></b></div><div><br /></div><div><b><font color="#b51200"><br /></font></b></div>Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-81490532432329383592020-05-06T14:19:00.000+05:302020-05-06T14:37:29.695+05:30How to Bypass execution policy in Powershell<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxgwhV57dAk2OlC_ZOlIkGkaxT44P5_k8BUO6V1kIASHf63UGutKgeyvCdXk5oSmVmPPN_rIcgmXSnMdy_q23VkUW0lKfxyKkli395eMp6bvIWz1cAQYFn809JHUwIhNP_YDSNwVDnbWtt/s1600/Bypass+Execution+Policy+in+Powershell.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="560" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxgwhV57dAk2OlC_ZOlIkGkaxT44P5_k8BUO6V1kIASHf63UGutKgeyvCdXk5oSmVmPPN_rIcgmXSnMdy_q23VkUW0lKfxyKkli395eMp6bvIWz1cAQYFn809JHUwIhNP_YDSNwVDnbWtt/s640/Bypass+Execution+Policy+in+Powershell.png" width="640" /></a></div>
<br />
Hi Geeks,<br />
<br />
<div style="text-align: left;">
Today we are going to learn the tips and tricks which can be used to bypass or run a Powershell script or command if its blocked using the below methods :</div>
<br />
1. RemoteSigned Execution Policy<br />
2. AllSigned Execution Policy<br />
3. Restricted Execution Policy<br />
<h2 style="text-align: left;">
</h2>
<h2 style="text-align: left;">
Steps :</h2>
<div>
<div>
<script src="https://gist.github.com/AmarJazzz/866664d099ad051666c8a57acf0358fe.js"></script>
</div>
Source : <a href="https://blog.netspi.com/15-ways-to-bypass-the-powershell-execution-policy/" target="_blank">Netspi Blog</a></div>
</div>
Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-43270641537292226832019-12-18T19:39:00.001+05:302022-07-31T11:28:17.749+05:30Unable to access Plesk Horde webmail (Windows), Table 'horde.horde_perfs' doesn't exist<div dir="ltr" trbidi="on"><span style="font-family: Poppins;">
I would like to share one of the incident which we faced recently on our production environment. Horde webmail stopped working for two Plesk servers with the below errors :<br /><br />
<b><span style="background-color: #cccccc; color: #2b00fe;">A fatal error has occurred<br /> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'horde.horde_prefs' doesn't exist<br /> Details have been logged for the administrator.</span></b></span><br />
<span style="font-family: Poppins;"><br />
</span><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjplOyxBWMCtezhlkuJCaUOVPM_C8Jf-Ka0IP9hD7WBC4OZ2D6oepGzA2yoCS90DnJ2WMMyhGqtW0OKqIDUWpkdYYgQrrUK-We8Os6ZAobMAF1twAh6iiQTe7rOYhoydrFfhosUaf1hjn5R/s1600/Screenshot_27.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Poppins;"><img border="0" data-original-height="253" data-original-width="840" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjplOyxBWMCtezhlkuJCaUOVPM_C8Jf-Ka0IP9hD7WBC4OZ2D6oepGzA2yoCS90DnJ2WMMyhGqtW0OKqIDUWpkdYYgQrrUK-We8Os6ZAobMAF1twAh6iiQTe7rOYhoydrFfhosUaf1hjn5R/s1600/Screenshot_27.png" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZ4zw37KteJJFgCeWbEVPYEbeOGsQp9gSKC6udEYndBJTnhyphenhyphenuOpykXEUvyejenj_JUj6zzAd4s5FQCy0XiDKdOmcpFp-uMylJITRZSmjabN77vFu-EOxyPUcaWCJ9rK2g056OPsavpxYB/s1600/Screenshot_28.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Poppins;"><img border="0" data-original-height="724" data-original-width="1317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZ4zw37KteJJFgCeWbEVPYEbeOGsQp9gSKC6udEYndBJTnhyphenhyphenuOpykXEUvyejenj_JUj6zzAd4s5FQCy0XiDKdOmcpFp-uMylJITRZSmjabN77vFu-EOxyPUcaWCJ9rK2g056OPsavpxYB/s1600/Screenshot_28.png" /></span></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Poppins;"><br /></span></div>
<h2>
<b><span style="color: blue; font-family: Poppins;">Server details :</span></b></h2><span style="font-family: Poppins;">
Windows 2012 R2<br />
Plesk Onyx 17.5.3<br />
Horde version 5.x<br />
</span><h2 style="text-align: left;">
<b><span style="color: blue; font-family: Poppins;">Steps to Fix it :</span></b></h2>
<span style="font-family: Poppins;"><b><span style="color: #6aa84f;">Step 1 :</span></b> This issue mostly happens if Horde database is missing or corrupt. In our case it was missing somehow ( may be deleted by some admin by mistake )<br />
<br />
<b><span style="color: #6aa84f;">Step 2 : </span></b>Once verified that database is missing from the MySQL, only option is to recreate the Database and Horde DB user by reinstalling it.<br />
<br />
<b><span style="color: #6aa84f;">Step 3 :</span></b> To reinstall Horde, execute the below command :<br />
<br />
#Take a backup of PSA Database before making any DB related changes.<br />
<b><span style="color: #800180;">plesk db dump PSA > C:\temp\PSA<Date>.sql</span></b><br />
<br />
#Removing the existing horde webmail setup ( In my case the horde site is webmail , it may differ in your case )<br />
<b><span style="color: #800180;">plesk installer --select-release-current --remove-component webmail
</span></b><br />
<br />
#Installing Horde again with the latest version<br />
<span style="color: #800180;"><b>plesk installer --select-release-current --install-component webmail</b><br /></span><br />
Post that it got Fixed.</span></div>
Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-66545713368527851792019-12-18T14:48:00.000+05:302019-12-18T21:19:50.655+05:30Powershell interview questions<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf1JZVGyNnl7s1Gyg2On8Bzo4eUUM8iukKztMsue-axzTE2u3wtq-P2yHGSTi4vQwO7w4lUQKvFhEe2WH7b5u5nWieuVuxUnIdrV8GQExMxUxrysxBBXCXZ_pRUKHrJyHyFmI0HzxSFv_3/s1600/powershel+interview+questions.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="900" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf1JZVGyNnl7s1Gyg2On8Bzo4eUUM8iukKztMsue-axzTE2u3wtq-P2yHGSTi4vQwO7w4lUQKvFhEe2WH7b5u5nWieuVuxUnIdrV8GQExMxUxrysxBBXCXZ_pRUKHrJyHyFmI0HzxSFv_3/s1600/powershel+interview+questions.jpg" /></a></div>
<br />
<b>1. Which is not a built-in variable out of this</b><br />
<span style="white-space: pre;">
</span> a) $Args<br />
<span style="white-space: pre;"> </span><span style="color: #6aa84f;"><b>b) $Hostname</b></span><br />
<span style="white-space: pre;"> </span>c) $Pid<br />
<span style="white-space: pre;"> </span>d) $?<br />
<br />
<b>2. Which one will override the default alias in Powershell</b><br />
<span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span>a) Set-Alias -Name ls -Value hostname -Scope Local -Force<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>b) Set-Alias -Name ls -Value hostname -Force<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">c) Set-Alias -Name ls -Value hostname -Option AllScope</span></b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>d) None of the above, we can't override the default aliases<br />
<br />
<b>3. Out of the below which command won't work ( Renaming directory )</b><br />
<span style="white-space: pre;"><br /></span>
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">a) Rename-Item "C:\`[Test File`]\" "Test"</span></b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>b) Rename-Item "C:\``[Test File``]\" "Test"<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>c) Rename-Item -LiteralPath "C:\`[Test File`]\" "Test"<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>d) Rename-Item -LiteralPath "C:\[Test File]\" "Test"<br />
<br />
<b>4. What is the default execution policy in Powershell</b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span>a) Bypass<br />
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">b) Restricted</span></b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>c) UnRestricted<br />
<span style="white-space: pre;"> </span>d) RemoteSigned<br />
<br />
<b>5. What will be the output of $Result</b><br />
<br />
$Result = Write-Host "This is my First script" ; $Result<br />
<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">a) Null</span></b><br />
<span style="white-space: pre;"> </span>b) This is my First script<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>c) 0<br />
<span style="white-space: pre;"> </span>d) None of the above<br />
<span style="white-space: pre;"> </span><br />
<b>6. What will be the Output :</b><br />
<br />
$value = "Apple.Orange.Pineapple"<br />
$Orange, $Pineapple = $value.Split(".")<br />
Write-Host "$Orange ; $Pineapple ; $Apple"<br />
<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">a) Apple ; Orange Pineapple ;</span></b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>b) Orange ; Pineapple ; Apple<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>c) Apple ; Orange ; Pineapple<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>d) None of the above<br />
<span style="white-space: pre;"> </span><br />
<b>7. What will be the Output :</b><br />
<br />
$Value = "Global-Scope"<br />
function abc {<br />
<span style="white-space: pre;"> </span> $Value = "Local-Scope"<br />
<span style="white-space: pre;"> </span> Write-Host $global:Value<br />
<span style="white-space: pre;"> </span> Write-Host $local:Value<br />
<span style="white-space: pre;"> </span> Write-Host $Value<br />
}<br />
<br />
abc<br />
Write-Host $local:Value<br />
Write-Host $Value<br />
<br />
<span style="white-space: pre;"> </span>a) Local-Scope Global-Scope Local-Scope Local-Scope Global-Scope<br />
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">b) Global-Scope Local-Scope Local-Scope Global-Scope Global-Scope</span></b><br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>c) Global-Scope Local-Scope Global-Scope Local-Scope Global-Scope<br />
<span style="white-space: pre;"> </span><span style="white-space: pre;"> </span>d) Global-Scope Local-Scope Local-Scope Local-Scope Global-Scope<br />
<span style="white-space: pre;"> </span><br />
<b>8. Which below cmdlet is wrong, To Remove a variable ($Var) from Memory</b><br />
<span style="white-space: pre;"> </span><br />
a) Remove-Variable -Name var<br />
<span style="white-space: pre;"> </span>b) rv var<br />
<span style="white-space: pre;"> </span>c) Remove-Item Variable:\Var<br />
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">d) rv $var</span></b><br />
<br />
<b>9. What will be the Output :</b><br />
<br />
$output1 = 4 + "2" ;<br />
$output2 = "4" + 2 ;<br />
Write-Output $output1 , $output2<br />
<br />
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">a) 6 42</span></b><br />
<span style="white-space: pre;"> </span>b) 42 42<br />
<span style="white-space: pre;"> </span>c) 6 6<br />
<span style="white-space: pre;"> </span>d) None of the above<br />
<span style="white-space: pre;"> </span><br />
<b>10. Which port is used by default for Powershell remoting ( HTTP Listener )</b><br />
<span style="white-space: pre;"> </span><br />
a) 5986<br />
<span style="white-space: pre;"> </span><b><span style="color: #6aa84f;">b) 5985</span></b><br />
<span style="white-space: pre;"> </span>c) 5984<br />
<span style="white-space: pre;"> </span>d) 5987<br />
<br />
<b>11. Print your name 10 times, Example :</b><br />
<b><br /></b>
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
John Doe<br />
<br />
<b><span style="color: #6aa84f;">Solution :</span></b> PS C:\> 1..10 | %{write-host "John Doe"}<br />
<br />
<b>12. Create a Function to accept a parameter and then reverse it</b><br />
<b><br /><span style="color: purple;">
Example :</span></b> Reverse-String -Phrase "Powershell"<br />
<b><span style="color: purple;">Output : </span></b>llehsrewoP<br />
<b><br /></b>
<b>Solution :</b><br />
<script src="https://gist.github.com/AmarJazzz/cc0a80cb8607d98eaa72deb859905a38.js"></script>
</div>
Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com0tag:blogger.com,1999:blog-1899784301784281292.post-50161450225999822802018-04-03T16:33:00.000+05:302018-04-03T16:40:49.865+05:30How to fix Filezilla DELE 500 command not allowed issue<div dir="ltr" style="text-align: left;" trbidi="on">
Hey how's going? Today i am going to discuss regarding an issue which i faced recently while connecting to a FTP Server using FileZilla. I tried to delete a file and it gave me the below error :<br />
<br />
<b><span style="color: purple;">Command: DELE testing123.txt</span></b><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<b><span style="color: purple;">Response: 500 Command not allowed.</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1pAirr5p7HSZph3HXghTt-wuECJG10HR0VEkZ-Ag4AnnHlgnN6VO6Lmtq_e7poH-yX_z7Lz4M11U-DccXT14yNwGoLMZgt9gFXZA9w6nqEsZ2U0c_6K8_YnHI5_iqY4U6xe1ZvR4XpQ9x/s1600/Capture-min.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="221" data-original-width="663" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1pAirr5p7HSZph3HXghTt-wuECJG10HR0VEkZ-Ag4AnnHlgnN6VO6Lmtq_e7poH-yX_z7Lz4M11U-DccXT14yNwGoLMZgt9gFXZA9w6nqEsZ2U0c_6K8_YnHI5_iqY4U6xe1ZvR4XpQ9x/s1600/Capture-min.JPG" /></a></div>
<br />
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;">I tried to troubleshoot it as below :</span></b><br />
<br />
1. Checked permission of the ftp user on the server's directory path and it was all good. User was having <b>Read and Write</b> permission.<br />
2. Was able to create a new file and edit it.<br />
3. Checked for any FTP Error logs but in vain.<br />
4. Restarted the FTP Service as i was clueless.<br />
5. Error clearly defines that DELE Command was requested for the file testing123.txt but the Server responded with 500 i.e command not allowed. That means the Server doesn't accept the DELE Command which was quite clear. <b><span style="color: #e06666;">But where this command is getting blocked ??</span></b><br />
<br />
<h3 style="text-align: left;">
<span style="color: #38761d;"><b>Voila !! Got it</b></span></h3>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
After making strenuous efforts, finally i figured it out by looking into the web server i.e IIS FTP Settings. IIS > Sites > Your_FTP_Site > FTP Request Filtering > Commands , DELE Command was not allowed.<br />
<span style="text-align: center;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZqEqSJNOrIQDwJVYic-laWURiHMEsxpMrLkwfSxe-DtgphVUWLeFCGfIC2UjveOSIVm3bgJvaaaVERroT9Tu-a2iAdKST-4z_rIP-XePe8m1OjsjsWNoGxHTC42GRVOx1xwLIfcuJczoL/s1600/InkedScreenshot_2_LI.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="202" data-original-width="697" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZqEqSJNOrIQDwJVYic-laWURiHMEsxpMrLkwfSxe-DtgphVUWLeFCGfIC2UjveOSIVm3bgJvaaaVERroT9Tu-a2iAdKST-4z_rIP-XePe8m1OjsjsWNoGxHTC42GRVOx1xwLIfcuJczoL/s1600/InkedScreenshot_2_LI.jpg" /></a></div>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<br />
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;"><br /></span>
<span style="text-align: center;">Hence removed the command by doing Right click on the command > Remove ( No need to restart any FTP or IIS Service after doing it ) , post which it was fixed. Hope you learned something new today, do like and share for more.</span></div>
Amarhttp://www.blogger.com/profile/07862725922969812035noreply@blogger.com06720 Ring Rd, Portage, MI 49024, USA42.219792 -85.59544599999998116.697757499999998 -126.90403999999998 67.7418265 -44.286851999999982