Windows DNS CNAME resolve problem

Your Browser can’t find an address?nslookup returns the address, but ping also can’t get the numerical address? Your Windows machine has no gateway to the internet (0.0.0.0/0)? You have your own local on premise DNS resolver?Maybe it’s a CNAME DNS entry. WINDOWS NEEDS DIRECT ACCESS TO THE INTERNET TO RESOLVE CNAMEs. LOL. Workaround: Use your […]

Remotely move a computer from one domain to another with powershell

# Define the target computer name$computerName = “COMPUTERTOMOVE”# Create a PSCredential object for Old Domain$usernameOld = “THISOLDDOMAIN\THISDOMAINADMINUSER”$passwordOld = ConvertTo-SecureString “THISPASSWORD” -AsPlainText -Force$credentialOld = New-Object System.Management.Automation.PSCredential($usernameOld, $passwordOld)# Create a PSCredential object for New Domain$usernameNew = “THATNEWDOMAIN\THATDOMAINADMINUSER”$passwordNew = ConvertTo-SecureString “THATPASSWORD” -AsPlainText -Force$credentialNew = New-Object System.Management.Automation.PSCredential($usernameNew, $passwordNew)# Test WS-Man connectivityTest-WsMan -ComputerName $computerName# DO ITInvoke-Command -ComputerName $computerName -Credential $credentialOld […]

Scraping a page

#!/usr/bin/pythonimport sysfrom selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsfrom selenium.webdriver.chrome.service import Servicefrom webdriver_manager.chrome import ChromeDriverManagerfrom selenium.webdriver.common.by import Bydef main(url): options = Options() options.add_argument(‘–headless’) options.add_argument(‘–no-sandbox’) options.add_argument(‘–disable-dev-shm-usage’) driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) driver.get(url) # BBC COOKIES driver.add_cookie({“name”: “ckns_explicit”, “value”: “2”}) driver.add_cookie({“name”: “ckns_policy”, “value”: “111”}) driver.add_cookie({“name”: “ckns_policy_exp”, “value”: “9747300802117”}) body = driver.find_element(By.TAG_NAME, ‘body’) print(body.text) driver.close()if __name__ == “__main__”: if len(sys.argv) […]