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 puller(request): | |
| action = request.GET.get('action', -1) | |
| case = request.GET.get('case', -1) | |
| timestamperbefore = request.GET.get('before', -1) | |
| timestamperafter = request.GET.get('after', -1) | |
| print(timestamperbefore) | |
| print(timestamperafter) | |
| tr_endpoint = "https://" | |
| client = tr.APIClient(tr_endpoint) |
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
| import requests | |
| url = "DOMAIN/jira/rest/atm/1.0/testrun/CYCLE-ID/attachments" | |
| payload={} | |
| files=[ | |
| ('file', ('test.jpg', open('C://test.jpg', 'rb'), 'image/jpeg')) |
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
| import mysql.connector | |
| from random import random | |
| from random import randrange | |
| from random import choice | |
| import json | |
| class Database(object): | |
| def __init__(self, username, dbhost, database, password, databaseport): | |
| self.username = username |
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 updateTest(self, testID, runID, tr_status_summary, statuss, ss): | |
| result = self.client.send_post( | |
| 'add_result/{}'.format(testID), | |
| {'status_id': int(statuss), | |
| 'comment': "{}".format(tr_status_summary)}) | |
| attachment = self.client.send_post( | |
| 'add_attachment_to_result/{}'.format(result['id']), ss) | |
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
| /etc/rsyslog.conf | |
| $ModLoad imudp | |
| $UDPServerRun 514 | |
| $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" | |
| . ?RemoteLogs & ~ | |
| firewall-cmd --permanent --add-port=514/tcp | |
| firewall-cmd --permanent --add-port=514/udp |
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
| Notes during installation and setup of freeradius for centOS: | |
| yum install freeradius | |
| yum install freeradius-utils (for radtest etc...) | |
| chmod o+x on files inaccessible (no ex bit) | |
| start server: radiusd -X | |
| test auth: radtest testing password 127.0.0.1 0 testing123 |
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
| import json | |
| config = { | |
| # inputs: | |
| 'platform': 'Firefox', | |
| 'url': 'https://yahoo.com', | |
| 'title': 'Testing', | |
| 'engineer': '', |
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
| import mysql.connector | |
| class Database(object): | |
| def __init__(self, username, dbhost, database, password, databaseport): | |
| self.username = username | |
| self.database = database | |
| self.password = password | |
| self.dbhost = dbhost | |
| self.databaseport = databaseport |
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
| inline specials: | |
| typewrite > (['tab', ]) | |
| press > keyDown > keyUp > hotKey::: | |
| ['\t', '\n', '\r', ' ', '!', '"', '#', '$', '%', '&', "'", '(', | |
| ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', | |
| '8', '9', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', | |
| 'a', 'b', 'c', 'd', 'e','f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', | |
| 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', | |
| 'accept', 'add', 'alt', 'altleft', 'altright', 'apps', 'backspace', |
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
| from win32api import GetSystemMetrics | |
| pyautogui.click(x=GetSystemMetrics(0) / 2, y=GetSystemMetrics(1) / 2) | |
| PSG: | |
| saveXY = values_screenshot_window | |
| print(saveXY["ss"][0], saveXY["ss"][1]) | |
| print(screenshotWindow.CurrentLocation()) | |
| ss_win_loc = screenshotWindow.CurrentLocation() |
NewerOlder