Scripts
IP Uploader (.py)
This is my first python script I ever wrote. This script connects to whatismyip.com, fetches the external IP address of the network you are on, puts it into a text file and uploads it via FTP to any server you want.
After running this script, you can then use PHP (or any similar language) to include this file into any page you desire.
#! /usr/bin/env python
import httplib
import sys
import os
import ftplib
file="ip.txt"
conn = httplib.HTTPConnection("www.whatismyip.com")
conn.request("GET","/automation/n09230945.asp")
response = conn.getresponse()
data = response.read()
filename = str(os.path.abspath(os.path.dirname(sys.argv[0])) + "\\"+file) #Create file
FILE = open(filename,"w") #Open file ready for writing
FILE.writelines(data) #Write 'data' to file
FILE.close() #Close file
#Replace [server], [user], and [pass] with your information.
s = ftplib.FTP('[server]','[user]','[pass]') #Connect
f = open(file,'rb') #File to send
s.storbinary('STOR '+file, f) #Send the file
f.close() #Close file and FTP
s.quit() #Quit FTP
sys.exit(0)
Uptime (.bat)
This extremely basic script pipes the 'systeminfo' command into the 'find' command to locate and disply your systems up time.
@ECHO OFF
TITLE System Uptime
COLOR 0A
systeminfo | find "System Up Time:"
pause
[ Download Uptime ]
Number Files (.bat)
Coming Soon...
Coming Soon...
