Register for your free account! | Forgot your password?

You last visited: Today at 12:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Project]Python Server Tool

Discussion on [Project]Python Server Tool within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2014
Posts: 16
Received Thanks: 6
Lightbulb [Project]Python Server Tool

Hi.
Today I want to show you my script, which i write while ago, and which help me with FreeBSD and Metin2 server.
It's a script/system which execute our commands like normal command line but, it also contains useful stuff e.g:
You can create safe backup of our files through simple command "create backup of mysql", you can also upload this backup to another web hosting.
You can run our server just writing "run ch 1" or "run 5 channels"
You can install e.g apache22 just through write command "install apache22"
And there are no differences when you write Run or run or RUN
There are also no differences when you write e.g 'delete logs' or 'Delete all of the LoGs '
The possibilities are many but I don't know if you'll like it
In this topic i give you a simple script which will install this system
Installation script:
Code:
http://pastebin.com/XQTRgpMj
or
Code:
#!/usr/local/bin python3.3
#-*- coding" utf-8 -*-
#-------------------------------------------------
#Made by Deucalion
#Hello, it's installation script to Russell system
#This script will:
#	-python3.3 ~ Install one of the newest python versions
#	-pymysql ~ Install library to connecting mysql with python
#	-Russell ~ Download all system
#	-----------MySQL---------------
#	create database Russell;
#	Use Russell;
#	DROP TABLE IF EXISTS `lang`;
#	CREATE TABLE `lang` (
#		`Language` varchar(20) NOT NULL,
#		PRIMARY KEY (`Language`)
#	) ENGINE=InnoDB DEFAULT CHARSET=latin1;
#	DROP TABLE IF EXISTS `privilages`;
#	CREATE TABLE `privilages` (
#		`id` varchar(20) NOT NULL DEFAULT '0',
#		`login` varchar(20) NOT NULL,
#		`password` varchar(20) NOT NULL,
#		`name` varchar(20) NOT NULL,
#		PRIMARY KEY (`id`)
#	) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
import os
def install():
	print ("Do you want to update your ports?")
	choice= input("write y/n: ")
	if choice == 'n':
		pass
	elif choice == 'y':
		os.system("portsnap fetch update")
	print ("Do you want to install this system?")
	choice= input("write y/n: ")
	if choice == 'n':
		return
	elif choice == 'y':
		print ("Do you have already installed python3.3?")
		choice_python=input("write y/n: ")
		if choice_python == 'y':
			pass
		else:
			os.system("cd /usr/ports/lang/python33 && make all install clean -DBATCH")
			os.system("sleep 2")
			print ("I installed python 3.3")
		print ("Do you have already installed pymysql for python3.3?")
		choice_pymysql=input("write y/n: ")
		if choice_pymysql == 'y':
			pass
		else:
			os.system("sleep 2")
			os.system("cd / && fetch http://sysforum.tk/system/Makefile")
			os.system("mv /Makefile /usr/ports/databases/py-pymysql")
			os.system("cd /usr/ports/databases/py-pymysql/ && make all install clean -DBATCH")
			os.system("sleep 2")
			print ("I installed pymysql")
		os.system("sleep 2")
		os.system("cd / && fetch http://sysforum.tk/system/Russell.tar.gz")
		os.system("cd / && tar zxvf Russell.tar.gz")
		print ("I extracted system")
		os.system("cd /bin && echo /usr/local/bin/python3.3 /Russell/Russell.pyc >> russell")
		os.system("chmod -r 0555 /bin/russell")
		print ("Done, now you can run it by write 'russell' in commandline but")
		print ("first you must write into Russel.lang in MySQL your language")
		print ("for now are 2 language available English or Polish")
		print ("")
		print ("Regards")
		return "Deucalion"
 
print (install())
--------------------------------------------------------------------------
Basics
--------------------------------------------------------------------------
You run it by "russell" in our commandline

Some example commands:
Convert item_proto from xml to sql/txt- It will be convert our item_proto from xml to sql or txt (item_proto_dump.xml must be in /Russell/input)
Convert mob_proto - It will be convert our mob_proto from sql to txt
Delete logs - It will be delete logs from our channels
Run server - It will be run all cores and channels
Run auth - It will be run auth/DB
Run 5 channels - It will be run all cores for 5 channels
Reset 2 channel - It will be reset only second channel and his all cores
Run/stop/reset ch1 / channel 1/ - It will be run/stop/reset our first channel and this is exception becouse he will always run/stop/reset also db and auth
Add/show/delete notes - you can write some notes , view them or delete them
Update system/freebsd - It will be upgrade our system
Restart/reboot system - It will be reset our FreeBSD
Create backup of mysql, create backup of all files contains(mysql,files of Metin2 and Russells files) - Create backup and next he will ask us, if you want upload to our second hosting. He create backup with actually datetime (Later you can download this backup by command "download backup")
you can also create backup e.g only account or player database by e.g 'create backup of player'
!!Now you can connect comands by 'and'!! e.g:
"delete logs and turn ch 1 on" or "turn 2 channels and ps"
Some examples screens



--------------------------------------------------------------------------
Installation
--------------------------------------------------------------------------
You must run installation script by command
Code:
python russell_instalation.py
After installation you must create database in MySQL by this query
Code:
create database Russell;
Use Russell;
DROP TABLE IF EXISTS `lang`;
CREATE TABLE `lang` (
`Language` varchar(20) NOT NULL,
PRIMARY KEY (`Language`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `privilages`;
CREATE TABLE `privilages` (
`id` varchar(20) NOT NULL DEFAULT '0',
`login` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
In Russell.lang (MySQL) you must write English or Polish it depends on your language
and in the end you must configure Config.py you must edit your ftp account and if you have another user or password to local user, you must also edit it I mean.. you don't have to do that, but then not everything functions will be available

If you want i will be grateful for a help with translate, you can help me by correct my mistakes in EnglishTable.py and English.py or translate this files into your languages

I think that it's all, sorry for my english, i know that it's bad but if you have any question just ask

Regards
Deucalion
Deucalion21 is offline  
Thanks
6 Users
Old 08/02/2014, 20:29   #2
 
elite*gold: 0
Join Date: Jul 2014
Posts: 305
Received Thanks: 95
HAMMER GEIL!!!
Weiter so echt NICE
.Err0xR` is offline  
Old 08/02/2014, 22:23   #3



 
Castiel''s Avatar
 
elite*gold: 0
The Black Market: 329/0/0
Join Date: Aug 2014
Posts: 8,226
Received Thanks: 2,494
Nice!
Thanks for share, good to use!
Castiel' is offline  
Reply

Tags
freebsd, metin2, python, script, tool


Similar Threads Similar Threads
[Tool]Python Module Loader
06/27/2018 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 252 Replies
Hi, ich habe euch ein Tool programmiert, welches euch erlaubt, eure eigenen Python-Module von der Binary ausführen zu lassen, ohne dass ihr die Archive modifizieren müsst. Man braucht dafür auch keinen Archive-Encryption-Key. Screenshot: http://img94.imageshack.us/img94/2189/pyloader.pn g Bei meinem Teleporthack ist der Client manchmal abgestürzt, aber jetzt habe ich eine kompliziertere Methode entwickelt, die keine Abstürze hervorruft. Jedoch ist das Tool dafür nicht mehr mit allen...
[Rls]Python - Xml Writer Tool By DEMONKING.
08/20/2013 - Metin2 PServer Guides & Strategies - 13 Replies
Hi there every body I've programmed a simple tool that creating the xml file i programmed it with python and converted it to (exe file ) here is screen from the tool : http://im31.gulfup.com/Ns3bO.jpg
Metin2 - Python - Wie Python Hacks verschlüsseln und Server überprüfen (GF/PServe)
09/23/2012 - Metin2 - 2 Replies
Ich wollte fragen, wie man Python Hacks am besten Verschlüsselt ? und wie man feststellen kann ob man auf einem GF / Pserver spielt. ?
[Tool] Project LoL v0.1[ZoomPatcher]
03/12/2012 - League of Legends - 7 Replies
Changelog: 10.03.12 Version 0.1 released Download:Hier Virustotal:Hier How2: Press Thanks ;) Download PerX Injector (Google ftw)



All times are GMT +1. The time now is 12:56.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.