Jump to content

Get Python Script in WebSpace


Recommended Posts

  • Active Member

Hi devs, I created simple trick recently

 

i hope it is useful

 

 

http://www.youtube.com/watch?v=Gs3YkMtDjik

 

Python Script

import app,dbg
import urllib2,base64,md5,httplib,os

############################# -- SERVER CONTROL -- ##################################
gecis = 0

conn = httplib.HTTPConnection("www.koray.zz.mu") #page statu check
conn.request("HEAD","/index.html")
res = conn.getresponse()
conn.close()

durum = res.status
durum = int(durum) #statu code

"""
#HTTP STATU CODES WIKI
> http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
> 1xx Informational
> 2xx Success
> 3XX Redirection
> 4XX Client Error
> 5xx Server Error
"""

if durum == 200: # 200 = statu code or if not durum[0] == "2"
	gecis = 1 #pass
else:
	gecis = 0
	
if not gecis == 1: #if not access in webpage
	f=open("syserr.txt", "w")
	f.write("COULD NOT CONNECTING GAME SERVER " + "Error Type: " + str(durum)) #statu code
	f.close()
	os.system("@echo off && color 0c && echo ############################################################################### # # # WARNING !!!! # # # ############################################################################### && echo  # COULD NOT CONNECTING GAME SERVER! && echo  # CLOSING GAME &&  echo  # PLEASE CONTACT WITH GAME ADMINS && echo  # DETAILED INFORMATION: SYSERR.TXT && pause")
	app.Exit()
#############################//////////////////////##################################

####Hash func###
def getMd5(data):
	m = md5.new()
	m.update(data)
	return m.hexdigest()

#dosyaadi
fil = 'dWkucHk=' #file name, e.g(constInfo.py, ui.py or introLogin.py etc.)
file = base64.decodestring(fil) #decoding filename for base64

hashli = getMd5(file) #get filename md5 hash
	
#Url
coded_string = 'aHR0cDovL2tvcmF5Lnp6Lm11L2ltdG4yL2NsaWVudC9jbGllbnRmaWxlcy9pY2VyaWsucGhwP2Rvc3lhPQ==' #php script address print(e.g) http://koray.zz.mu/imtn2/client/clientfiles/icerik.php?dosya=
k = base64.decodestring(coded_string) #decoding base64
	
#agent
coded_string2 = 'S29yYXlDbGllbnQ=' #http user agent name
r = base64.decodestring(coded_string2) #decoding base64


opener = urllib2.build_opener() 
opener.addheaders = [('User-agent', r)] 
response = opener.open(k + file)
af = response.read()

#print af
exec(af)

Php Script

<?php 

error_reporting(O); 

$agent = $_SERVER['HTTP_USER_AGENT'];  
 
//user agent name
if($agent == "KorayClient") {  
//dosya = filename veriable
$file = md5($_GET['dosya']);  
//koray = python file included folder
include 'koray/'.$file; 

}else{ 


header('Location: http://error.hostinger.eu/?'); 
//if not connect with true user agent redirect 404 page

} 
?>

Example server script introLogin.py > 2e3249498981e44873308ee0e5faa752

import dbg
dbg.LogBox("Hello World")
First change url address and included folder for you
Now changed useragent for you
Open same name python script and paste getter script(for client)
Now open server and convert script name > md5 and create new file and write orignal codes

 

Some useful pages:

https://www.base64decode.org/

http://www.md5.cz/

 

Sorry my bad english 

 

Regads

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.