Posted by admin on January 30, 2010 – 1:12 pm
Author: slac3dork
Site: http://snippet.c0de.me
Summary: Python script to get total subscriber from Feedburner. Before run this script, Feedburner awareness API must be activated. This is script is inspired by Eric Wendelin.
Usage: python filename.py
#!/usr/bin/python
#
# _________ .__ .____ _______
# / _____/ ____ |__|_____ | | \ _ \ ____
# \_____ \ / \| \____ \| | / /_\ \ / ___\
# / \ | \ | |_> > |__\ \_/ \/ /_/ >
#/_______ /___| /__| __/|_______ \_____ /\___ /
# \/ \/ |__| \/ \//_____/
# http://snippet.c0de.me
# slac3dork[at]gmail[dot]com
#!/usr/bin/env python
# IMPORTANT: Feedburner awareness API must be activated
# Replace with your own name
feedburner_name = "c0deme"
import urllib
from xml.dom import minidom
try:
dom = minidom.parse(urllib.urlopen('https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri='+feedburner_name))
entry = dom.getElementsByTagName('entry')[0]
count = entry.getAttribute('circulation')
print "total subscriber:",count
except:
print "Oops! Something went wrong. Check your feedburner's name or your internet connection."

Posted by admin on December 29, 2009 – 1:01 am
Author: slac3dork
Site: http://snippet.c0de.me
Summary: Host checker using Ping command. Tested on Linux.
Usage: python muhcot.py <ipaddress> <common-netmask>
#!/usr/bin/python
#
# _________ .__ .____ _______
# / _____/ ____ |__|_____ | | \ _ \ ____
# \_____ \ / \| \____ \| | / /_\ \ / ___\
# / \ | \ | |_> > |__\ \_/ \/ /_/ >
#/_______ /___| /__| __/|_______ \_____ /\___ /
# \/ \/ |__| \/ \//_____/
# http://snippet.c0de.me
# slac3dork[at]gmail[dot]com
import threading
import commands
import sys
from time import sleep
class Checker(threading.Thread):
def __init__(self, host, count=1):
threading.Thread.__init__(self)
self.host = host
self.count = count
self.output = -1
def run(self):
cmd = "ping %s -c%d" %(self.host, self.count)
self.output = commands.getstatusoutput(cmd)
class Address:
def __init__(self, ip, netmask):
self.ip = ip
self.netmask = netmask
def getNetworkAddress(self):
netmask_range = self.netmask.split(".",4)
totalZero = 0
for octet in netmask_range:
if octet == "0":
totalZero += 1
networkAddress = self.ip.rsplit(".",totalZero)
return networkAddress[0]
def welcomeBro():
print "--------------------------"
print "[+] muhcot.py"
print "[+] Multiple host checker tool"
print "[+] by slac3dork"
print "--------------------------\n"
sleep(2)
def errorMessage(netmaskStatus):
print "------------------------------------------------------------"
print "[-]your netmask:",netmaskStatus
print "[-]common netmask class A: 255.0.0.0"
print "[-]common netmask class B: 255.255.0.0"
print "[-]common netmask class C: 255.255.255.0"
print "\n[-]Usage: python muhcot.py <ipaddress> <common-netmask>\n"
print "------------------------------------------------------------"
sys.exit(1)
def checkNetmask(nm):
if (nm == "255.0.0.0") or (nm == "255.255.0.0") or (nm == "255.255.255.0"):
status = 1
if (__name__ == "__main__"):
try:
netmaskStatus = 1
checkNetmask(sys.argv[2])
except:
netmaskStatus = 0
if (len(sys.argv) != 3) or (netmaskStatus == 0):
errorMessage(netmaskStatus)
welcomeBro()
threads = []
ip = sys.argv[1]
netmask = sys.argv[2]
net = Address(ip,netmask)
print "[+]Checking..."
if (netmask == "255.0.0.0"):
for octet2 in range(1,254):
for octet3 in range(1,254):
for octet4 in range(1,254):
host = "%s.%d.%d.%d" %(net.getNetworkAddress(), octet2, octet3, octet4)
thread = Checker(host)
threads.append(thread)
thread.start()
elif (netmask == "255.255.0.0"):
for octet3 in range(1,254):
for octet4 in range(1,254):
host = "%s.%d.%d" %(net.getNetworkAddress(), octet3, octet4)
thread = Checker(host)
threads.append(thread)
thread.start()
elif (netmask == "255.255.255.0"):
for octet4 in range(1,254):
host = "%s.%d" %(net.getNetworkAddress(), octet4)
thread = Checker(host)
threads.append(thread)
thread.start()
for thread in threads:
thread.join()
if (thread.output[0] == 0):
status = "connected"
print "[-]ping %s: %s" %(thread.host, status)
print "[+]done"

Posted by admin on November 4, 2009 – 5:17 pm
Author: slac3dork
Site: http://snippet.c0de.me
Summary: Python script to search file. Tested on Linux.
Usage: python filesearcher.py <TARGET_DIR>
#!/usr/bin/python
#
# _________ .__ .____ _______
# / _____/ ____ |__|_____ | | \ _ \ ____
# \_____ \ / \| \____ \| | / /_\ \ / ___\
# / \ | \ | |_> > |__\ \_/ \/ /_/ >
#/_______ /___| /__| __/|_______ \_____ /\___ /
# \/ \/ |__| \/ \//_____/
# http://snippet.c0de.me
# slac3dork[at]gmail[dot]com
from os import walk
from sys import argv
def searching(dir, target):
status = False
for rootdir, dirs, files in walk(dir):
for file in files:
if file == target:
status = True
path = rootdir+"/"
if status:
print target, "was found at:", path
else:
print target, "not found"
if __name__ == "__main__":
if len(argv) != 2:
print "Usage: python filesearcher.py <TARGET_DIR>"
exit()
filename = raw_input("target file: ")
dir_name = argv[1]
searching(dir_name, filename)
