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
| package main | |
| import ( | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "strconv" | |
| ) |
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
| package main | |
| import ( | |
| "time" | |
| "archive/tar" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "encoding/csv" | |
| "database/sql" |
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
| #!/usr/bin/python | |
| import subprocess | |
| import urllib2, urllib | |
| import os | |
| f = subprocess.Popen(['tail','-F','/etc/nginx/logs/log.log'], stdout=subprocess.PIPE,stderr=subprocess.PIPE) | |
| while True: | |
| line = f.stdout.readline() | |
| key = 'QueryOrders' |
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
| #!/usr/bin/env python | |
| fl = open('/etc/sudoers', 'r') | |
| line = fl.readline() | |
| flg = 0 | |
| word1 = 'Defaults env_keep = "SSH_CLIENT SSH_TTY SSH_AUTH_SOCK SSH_CONNECTION"\n' | |
| word2 = 'Defaults env_keep += "HOME EDITOR"\n' | |
| key = "%sudo" | |
| mass = [] | |
| while line: |
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
| #!/usr/bin/env python | |
| fl = open('/etc/ssh/sshd_config', 'r') | |
| line = fl.readline() | |
| flg = 0 | |
| key = "PermitRootLogin" | |
| mass = [] | |
| while line: | |
| if line.find(key)!=-1: | |
| line = line.replace('yes','no') |
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
| #!/usr/bin/env python | |
| import sys | |
| #print "Ip-address(like 192.168.21.21, 192.168.20.55)", sys.argv[0] | |
| #print str(sys.argv[0]) | |
| #print sys.argv[1] | |
| ip_adr = sys.argv[1] | |
| set_adr = sys.argv[1] | |
| i = 0 | |
| ip = '' | |
| while i<2: |
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
| #!/usr/bin/env python | |
| fl = open('/etc/aliases', 'r+') | |
| flag = 0 | |
| allies = "\nmailer-daemon: postmaster\npostmaster: root\nnobody: root\nhostmaster: root\nusenet: root\nnews: root\nweb | |
| master: root\nwww: root\nftp: root\nabuse: root\nnoc: root\nsecurity: root\nroot: sysadmins@blabla.ru" | |
| mass = [] | |
| line = fl.readline() | |
| while line: | |
| if line == "#####\n": |
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
| #!/bin/bash | |
| echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/00norecommends | |
| apt-get install -f -y dmsetup mtr-tiny parted lvm2 vim-nox | |
| apt-get install -f ntp ntpdate | |
| apt-get install exim4 exim4-config | |
| cat << EOF > /etc/exim4/update-exim4.conf.conf | |
| dc_eximconfig_configtype='satellite' | |
| dc_other_hostnames='' | |
| dc_local_interfaces='127.0.0.1 ; ::1' |
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 Tkinter import * | |
| import random | |
| root = Tk() | |
| orient = "ver" | |
| x = 200 | |
| y = 50 | |
| #creating modules |
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
| #copy configs site | |
| cd c:\Windows\System32\inetsrv | |
| appcmd list site "testmain1" /config /xml > c:\testmain1.xml #copy site | |
| appcmd list apppool /config /xml > c:\tempfile.xml #copy apppools | |
| #restore site | |
| cd c:\Windows\System32\inetsrv | |
| appcmd add apppool /config /in < c:\tempfile.xml | |
| appcmd add site /in < c:\testmain1.xml |
NewerOlder