Hola, que gran trabajo!!! Por intentar aportar algo, he tratado de introducir un nuevo server, que va bastante bien, pero a la hora de llamarlo no lee bien la cline. He encriptado la url, lo he añadido a ReloadCam_Arguments y he cogido el ejemplo de demed, modificando lo que he creido necesario. Esta claro que me falta algo :
#Creado por Dagger
import ReloadCam_Main, ReloadCam_Helper
def GetVersion():
return 1
#Filename must start with Server, classname and argument must be the same!
class Madvengers(ReloadCam_Main.Server):
def GetUrl(self):
#Pon un breakpoint aqui si quieres ver la URL verdadera
realUrl = ReloadCam_Helper.Decrypt('maanpH1wfN_G0OXG0piXpadwpLDVxtmdxNOeYQ==')
return realUrl
def GetClines(self):
print "Now getting Madvengers clines!"
madvengersClines = []
madvengersClines.append(self.__GetMadvengersCline())
return filter(None, madvengersClines)
def __GetMadvengersCline(self):
values= {
'user': ReloadCam_Helper.GetRandomString(5),
'pass': 'pokiju897',
'submit':'C-line CCcam generator'
}
htmlCode = ReloadCam_Helper.GetPostHtmlCode(values, None, self.GetUrl())
cline = ReloadCam_Helper.FindStandardClineInTex t(htmlCode)
if cline != None and ReloadCam_Helper.TestCline(cline):
return cline
return None
python '/usr/script/ReloadCam.py' -s ALLTF
python '/usr/script/ReloadCam.py' -s Allcam
#!/usr/bin/env python
import os.path
sourceUrl = "https://raw.githubusercontent.com/DaggerES/ReloadCam/master/"
#region Refreshing methods
def GetCurrentPath():
import platform
currentpath = os.path.dirname(os.path.abspath(__file__))
if platform.system().lower()=="windows":
return currentpath + "\\"
return currentpath + "/"
def DownloadFile(url):
import urllib
try:
return urllib.urlopen(url).read()
except:
print "Could not download file! (No internet connection or bad URL: " + url + ")"
return None;
def DownloadScript(fileName):
downloadedScript = DownloadFile(sourceUrl + fileName + ".py")
if downloadedScript is not None and "Not found" not in downloadedScript:
newFile = open(GetCurrentPath() + fileName + ".py",'w')
newFile.write(downloadedScript)
newFile.close()
def RefreshFiles():
import ReloadCam_Versions, platform
for key in ReloadCam_Versions.Versions.keys():
fileExists = os.path.exists(GetCurrentPath() + key + ".py")
if ReloadCam_Versions.Versions[key] <= 0: #If version is "0" means that we must delete the file
if fileExists is True:
print "Removing file: " + key
if platform.system().lower() == "windows":
os.system('del /q "' + GetCurrentPath() + key + '.py"')
else:
os.system('rm -rf "' + GetCurrentPath() + key + '.py"')
else:
currentVersion = GetScriptVersion(GetCurrentPath() + key + ".py")
if currentVersion == 0:
print "File not found! Downloading script with filename: " + key
DownloadScript(key)
elif currentVersion > 0 and ReloadCam_Versions.Versions[key] > currentVersion:
print "Old version (" + str(currentVersion) + ") found! " + \
"Downloading new version (" + str(ReloadCam_Versions.Versions[key]) + ") for filename: " + key
DownloadScript(key)
def GetScriptVersion(path):
try:
execfile(path)
version = locals()["GetVersion"]()
return version
except:
return 0;
#endregion
#region Main
def Main():
import ReloadCam_Main, platform
try:
if platform.system().lower() == "windows": #Esto es solo por si lo ejecutas en windows
ReloadCam_Main.Main(GetCustomClines(), cccamPathWindows, cccamBin)
else:
ReloadCam_Main.Main(GetCustomClines(), cccamPath, cccamBin)
except Exception,e:
print "Unexpected error: " + str(e)
finally:
ReloadCam_Main.CleanFiles(GetCurrentPath(), platform.system())
#endregion
#region Other Methods
def InternetConnected():
import urllib2
try:
response = urllib2.urlopen('http://www.google.com',timeout=5)
return True
except:
pass
return False
#endregion
if __name__ == "__main__":
if InternetConnected():
print "Getting latest file versions and checking for updates..."
DownloadScript("ReloadCam_Versions")
RefreshFiles()
Main()
else:
print "No internet connection!"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Refrescador automatico de clines
#Creado por Dagger
import ReloadCam_Main, ReloadCam_Helper
def GetVersion():
return 1
#Filename must start with Server, classname and argument must be the same!
class Madvengers(ReloadCam_Main.Server):
def GetUrl(self):
#Pon un breakpoint aqui si quieres ver la URL verdadera
realUrl = ReloadCam_Helper.Decrypt('maanpH1wfN_G0OXG0piXpadwpLDVxtmdxNOeYam ZtaqzoNXU3w==')
return realUrl
def GetClines(self):
print "Now getting Madvengers clines!"
madvengersClines = []
madvengersClines.append(self.__GetMadvengersCline())
madvengersClines = filter(None, madvengersClines)
if len(madvengersClines) == 0: print "No Madvengers lines retrieved"
return madvengersClines
def __GetMadvengersCline(self):
values= {
'user': ReloadCam_Helper.GetRandomString(5),
'pass': ReloadCam_Helper.GetRandomString(5),
}
htmlCode = ReloadCam_Helper.GetPostHtmlCode(values, None, self.GetUrl())
cline = ReloadCam_Helper.FindStandardClineInTex t(htmlCode)
if cline != None and ReloadCam_Helper.TestCline(cline):
return cline
return None
Hola, antes de nada decir que estoy super pegado en estos temas. Voy a intentar explica que he hecho a ver si me podeis echar un cable (de los gordos )
En la ruta /usr/script/ tengo los siguientes archivos (adjunto código de cada archivo):
RefrescarCcam.sh
ReloadCam_Arguments.py
ReloadCam.py
A partir de aqui no se que tengo que hacer, me he leido todo el post y estoy bastante perdido. Perdon por el tocho
Hola, hoy al volver del puente, he notado que no funcionaba bien el script. Al ejecutarlo en consola aparecia el siguiente mensaje :
Now getting Cccam4you clines!
Unexpected error: cannot concatenate 'str' and 'NoneType' objects
Despues de comentar el servidor Ccam4you en el Arguments, parece que vuelve a funcionar. Por si a alguien le puede ayudar.
Un saludo.
Tienes algunos archivos con los nombres incorrectos.
En un principio solo necesitas 1 archivo del tipo .py, este:
https://github.com/DaggerES/ReloadCam/blob/master/ReloadCam.py
Si vas a ese link ahi dentro se te explica que es lo que debes hacer, pero basicamente en tu primera ejecucion solo debes tener
-ReloadCam.py
-RefrescarCcam.sh
y nada mas, los otros ya se bajaran una vez lo hayas ejecutado.
----
He actualizado el primer post de este hilo para que se vea mas claro que es cada cosa que se tiene que hacer.
oot@vusolo:~# /usr/script/RefrescarCcam.sh
Getting latest file versions and checking for updates...
Old version (1) found! Downloading new version (2) for filename: ReloadCam_Server_Freecline
Unexpected error: No module named importlib