Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #9 - Ensure that domain works #20

Open
wants to merge 9 commits into
base: master
from

Fix spacing

  • Loading branch information...
alexander-ponomaroff committed Dec 3, 2018
commit e6afd1536ebe15ce78dc4039a4757e5a48eae032
@@ -52,27 +52,28 @@ def openBrowser(self):
webbrowser.open_new_tab(self.url)
#end of openBrowser()

def ping(self):

popularDomains = ["ca", "com", "de", "cn", "net", "uk", "org", "info",
"nl", "eu", "ru"]

if platform.system().lower() == "windows":
command = ["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", "Invoke-RestMethod", "-Uri", self.url]
else:
command = ["curl", "-X", "POST", self.url]
if subprocess.call(command, shell = True) != 0:
for dom in popularDomains:
def ping(self):

self.url = "http://www." + self.engine + "." + dom + self.searchString + self.searchQuery
self.domain = dom
command[3]= self.url
popularDomains = ["ca", "com", "de", "cn", "net", "uk", "org", "info",
"nl", "eu", "ru"]

if subprocess.call(command) == 0:
return "domain found"
return "invalid"
else:
return "valid"
if platform.system().lower() == "windows":
command = ["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", "Invoke RestMethod", "-Uri", self.url]
else:
command = ["curl", "-X", "POST", self.url]

if subprocess.call(command, shell = True) != 0:
for dom in popularDomains:

self.url = "http://www." + self.engine + "." + dom + self.searchString + self.searchQuery
self.domain = dom
command[3]= self.url
This conversation was marked as resolved by alexander-ponomaroff

This comment has been minimized.

Copy link
@jrkong

jrkong Dec 18, 2018

Owner

Missing whitespace around this operator (Flake8 E225)


if subprocess.call(command) == 0:
return "domain found"
return "invalid"
else:
return "valid"

def handleArgs(self, args):
if args.engine is not None:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.