This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string ActiveDirectoryPath() | |
{ | |
DirectoryEntry root = new DirectoryEntry("LDAP://RootDSE"); | |
using (root) | |
{ | |
string dnc = root.Properties["defaultNamingContext"][0].ToString(); | |
string server = root.Properties["dnsHostName"][0].ToString(); | |
string adsPath = String.Format("LDAP://{0}/{1}", server, dnc); | |
return adsPath; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import argparse | |
parser = argparse.ArgumentParser(description='Run Load', | |
epilog="Thanks for using PF dataloads.") | |
parser.add_argument('-u', '--url', | |
help='Base URL') | |
parser.add_argument('-l', '--logon', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def SetBrowserObj(self): | |
try: | |
if self.browserdriver.strip().upper() == "CHROME": | |
options = webdriver.chrome.options.Options() | |
options.add_argument("-incognito") | |
browser = webdriver.Chrome(chrome_options=options) | |
if self.browserdriver.strip().upper() == "FIREFOX": | |
browser = webdriver.Firefox() | |
self.driver = browser |