This file contains 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
function logger() { | |
//MASKS | |
this.ADMIN = this.permissions.CAN_SEE_ERRORS | this.permissions.CAN_SEE_DEBUGS | this.permissions.CAN_SEE_INFOS; | |
this.SUPERUSER = this.permissions.CAN_SEE_DEBUGS | this.permissions.CAN_SEE_INFOS; | |
this.USER = this.permissions.CAN_SEE_INFOS; | |
} | |
// FLAGS | |
logger.prototype.permissions = { | |
CAN_SEE_ERRORS: 1, // 0001 |
This file contains 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
BROWSER_PROFILE_PATH = '/Users/rinat/Library/Application Support/Firefox/Profiles/4yu1sfet.rinat' | |
TIMESHEET_URL = 'http://url.to.pwa' | |
def set_up_firefox(self): | |
print "Configuring Firefox web-browser..." | |
profile = webdriver.FirefoxProfile(self.BROWSER_PROFILE_PATH) | |
self.driver = webdriver.Firefox(firefox_profile=profile) | |
self.driver.get(self.TIMESHEET_URL) | |
print "Done." |
This file contains 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
from selenium import webdriver | |
from selenium.webdriver.common.action_chains import ActionChains | |
def enter_hours(self, cell, amount): | |
#Double-click | |
actions = ActionChains(self.driver) | |
actions.move_to_element(cell) | |
actions.double_click(cell) | |
actions.perform() | |
This file contains 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
from selenium import webdriver | |
import os | |
class ScreenCapture: | |
STAGING_URL = 'http://www.yahoo.com' | |
PRODUCTION_URL = 'http://www.yahoo.com' | |
driver = None | |
def __init__(self): |
This file contains 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
from PIL import Image, ImageDraw | |
class Grid: | |
def __init__(self): | |
self.capture_image() | |
def capture_image(self): | |
screenshot = Image.open("screenshots/screen_staging.png") | |
columns = 60 |
This file contains 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 process_region(self, image, x, y, width, height): | |
region_total = 0 | |
# This is the sensitivity factor, the larger it is the less sensitive the comparison | |
factor = 10 | |
for coordinateY in range(y, y+height): | |
for coordinateX in range(x, x+width): | |
try: | |
pixel = image.getpixel((coordinateX, coordinateY)) |
This file contains 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
from PIL import Image, ImageDraw | |
from selenium import webdriver | |
import os | |
import sys | |
class ScreenAnalysis: | |
STAGING_URL = 'http://www.yahoo.com' | |
PRODUCTION_URL = 'http://www.yahoo.com' | |
driver = None |
This file contains 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
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from urlparse import parse_qs | |
PASSWORD = "abba" | |
class Handler(BaseHTTPRequestHandler): | |
def _set_headers(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() |
This file contains 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
from datetime import datetime | |
startTime = datetime.now() | |
password = "abba" | |
character_list = 'abcdefghijklmnopqrstuvwxyz' | |
a = [] | |
for current in xrange(len(password)): | |
a = [i for i in character_list] | |
for y in xrange(current): |
This file contains 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
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from datetime import datetime | |
class BruteForce: | |
URL = 'http://localhost:3333' | |
character_list = 'abcdefghijklmnopqrstuvwxyz' |
OlderNewer