From 16af85004c84d0d6c626b4f8424ce9647669a0c1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 9 Jun 2013 18:10:22 +0200 Subject: moved everything from module to pyload --- module/plugins/Account.py | 295 ---------------- module/plugins/Addon.py | 205 ----------- module/plugins/Base.py | 343 ------------------- module/plugins/Crypter.py | 271 --------------- module/plugins/Hoster.py | 400 ---------------------- module/plugins/MultiHoster.py | 73 ---- module/plugins/ReCaptcha.py | 22 -- module/plugins/__init__.py | 0 module/plugins/accounts/AlldebridCom.py | 49 --- module/plugins/accounts/BayfilesCom.py | 51 --- module/plugins/accounts/BitshareCom.py | 44 --- module/plugins/accounts/BoltsharingCom.py | 12 - module/plugins/accounts/CramitIn.py | 12 - module/plugins/accounts/CyberlockerCh.py | 31 -- module/plugins/accounts/CzshareCom.py | 57 ---- module/plugins/accounts/DdlstorageCom.py | 12 - module/plugins/accounts/DebridItaliaCom.py | 50 --- module/plugins/accounts/DepositfilesCom.py | 47 --- module/plugins/accounts/EasybytezCom.py | 73 ---- module/plugins/accounts/EgoFilesCom.py | 40 --- module/plugins/accounts/EuroshareEu.py | 55 --- module/plugins/accounts/FastshareCz.py | 54 --- module/plugins/accounts/FilebeerInfo.py | 57 ---- module/plugins/accounts/FilecloudIo.py | 49 --- module/plugins/accounts/FilefactoryCom.py | 54 --- module/plugins/accounts/FilejungleCom.py | 60 ---- module/plugins/accounts/FilerioCom.py | 12 - module/plugins/accounts/FilesMailRu.py | 41 --- module/plugins/accounts/FileserveCom.py | 58 ---- module/plugins/accounts/FourSharedCom.py | 48 --- module/plugins/accounts/FreakshareCom.py | 51 --- module/plugins/accounts/FshareVn.py | 62 ---- module/plugins/accounts/Ftp.py | 13 - module/plugins/accounts/HellshareCz.py | 87 ----- module/plugins/accounts/HellspyCz.py | 70 ---- module/plugins/accounts/HotfileCom.py | 86 ----- module/plugins/accounts/Http.py | 13 - module/plugins/accounts/MegasharesCom.py | 42 --- module/plugins/accounts/MultiDebridCom.py | 47 --- module/plugins/accounts/MultishareCz.py | 58 ---- module/plugins/accounts/NetloadIn.py | 49 --- module/plugins/accounts/Premium4Me.py | 27 -- module/plugins/accounts/PremiumizeMe.py | 44 --- module/plugins/accounts/QuickshareCz.py | 53 --- module/plugins/accounts/RapidgatorNet.py | 74 ---- module/plugins/accounts/RapidshareCom.py | 68 ---- module/plugins/accounts/RarefileNet.py | 12 - module/plugins/accounts/RealdebridCom.py | 35 -- module/plugins/accounts/RehostTo.py | 37 -- module/plugins/accounts/ReloadCc.py | 73 ---- module/plugins/accounts/RyushareCom.py | 18 - module/plugins/accounts/Share76Com.py | 11 - module/plugins/accounts/ShareFilesCo.py | 12 - module/plugins/accounts/ShareRapidCom.py | 47 --- module/plugins/accounts/ShareonlineBiz.py | 56 --- module/plugins/accounts/SpeedLoadOrg.py | 12 - module/plugins/accounts/StahnuTo.py | 49 --- module/plugins/accounts/TurbobitNet.py | 56 --- module/plugins/accounts/UlozTo.py | 36 -- module/plugins/accounts/UploadedTo.py | 65 ---- module/plugins/accounts/UploadheroCom.py | 35 -- module/plugins/accounts/UploadingCom.py | 52 --- module/plugins/accounts/UploadstationCom.py | 13 - module/plugins/accounts/UptoboxCom.py | 12 - module/plugins/accounts/WarserverCz.py | 70 ---- module/plugins/accounts/WuploadCom.py | 47 --- module/plugins/accounts/X7To.py | 66 ---- module/plugins/accounts/YibaishiwuCom.py | 51 --- module/plugins/accounts/ZeveraCom.py | 49 --- module/plugins/accounts/__init__.py | 0 module/plugins/addons/AlldebridCom.py | 28 -- module/plugins/addons/BypassCaptcha.py | 143 -------- module/plugins/addons/CaptchaBrotherhood.py | 169 ---------- module/plugins/addons/CaptchaTrader.py | 159 --------- module/plugins/addons/Checksum.py | 169 ---------- module/plugins/addons/ClickAndLoad.py | 89 ----- module/plugins/addons/DeathByCaptcha.py | 210 ------------ module/plugins/addons/DebridItaliaCom.py | 41 --- module/plugins/addons/DeleteFinished.py | 86 ----- module/plugins/addons/DownloadScheduler.py | 86 ----- module/plugins/addons/EasybytezCom.py | 31 -- module/plugins/addons/Ev0InFetcher.py | 87 ----- module/plugins/addons/ExpertDecoders.py | 112 ------ module/plugins/addons/ExternalScripts.py | 118 ------- module/plugins/addons/ExtractArchive.py | 312 ----------------- module/plugins/addons/HotFolder.py | 85 ----- module/plugins/addons/IRCInterface.py | 431 ------------------------ module/plugins/addons/ImageTyperz.py | 160 --------- module/plugins/addons/LinkdecrypterCom.py | 59 ---- module/plugins/addons/MergeFiles.py | 94 ------ module/plugins/addons/MultiDebridCom.py | 42 --- module/plugins/addons/MultiHome.py | 82 ----- module/plugins/addons/MultiHoster.py | 102 ------ module/plugins/addons/MultishareCz.py | 23 -- module/plugins/addons/Premium4Me.py | 33 -- module/plugins/addons/PremiumizeMe.py | 50 --- module/plugins/addons/RealdebridCom.py | 25 -- module/plugins/addons/RehostTo.py | 41 --- module/plugins/addons/RestartFailed.py | 124 ------- module/plugins/addons/UnSkipOnFail.py | 97 ------ module/plugins/addons/UpdateManager.py | 201 ----------- module/plugins/addons/XFileSharingPro.py | 70 ---- module/plugins/addons/XMPPInterface.py | 276 --------------- module/plugins/addons/ZeveraCom.py | 19 -- module/plugins/addons/__init__.py | 0 module/plugins/crypter/C1neonCom.py | 133 -------- module/plugins/crypter/CCF.py | 42 --- module/plugins/crypter/CrockoComFolder.py | 14 - module/plugins/crypter/CryptItCom.py | 38 --- module/plugins/crypter/CzshareComFolder.py | 30 -- module/plugins/crypter/DDLMusicOrg.py | 42 --- module/plugins/crypter/DataHuFolder.py | 55 --- module/plugins/crypter/DdlstorageComFolder.py | 32 -- module/plugins/crypter/DepositfilesComFolder.py | 14 - module/plugins/crypter/Dereferer.py | 34 -- module/plugins/crypter/DontKnowMe.py | 21 -- module/plugins/crypter/DownloadVimeoCom.py | 30 -- module/plugins/crypter/DuckCryptInfo.py | 58 ---- module/plugins/crypter/EasybytezComFolder.py | 60 ---- module/plugins/crypter/EmbeduploadCom.py | 54 --- module/plugins/crypter/FilebeerInfoFolder.py | 35 -- module/plugins/crypter/FilefactoryComFolder.py | 44 --- module/plugins/crypter/FileserveComFolder.py | 32 -- module/plugins/crypter/FourChanOrg.py | 25 -- module/plugins/crypter/FshareVnFolder.py | 14 - module/plugins/crypter/GooGl.py | 41 --- module/plugins/crypter/HoerbuchIn.py | 55 --- module/plugins/crypter/HotfileFolderCom.py | 29 -- module/plugins/crypter/ILoadTo.py | 62 ---- module/plugins/crypter/LetitbitNetFolder.py | 33 -- module/plugins/crypter/LinkList.py | 55 --- module/plugins/crypter/LinkSaveIn.py | 227 ------------- module/plugins/crypter/LinkdecrypterCom.py | 100 ------ module/plugins/crypter/LixIn.py | 60 ---- module/plugins/crypter/LofCc.py | 49 --- module/plugins/crypter/MBLinkInfo.py | 27 -- module/plugins/crypter/MediafireComFolder.py | 55 --- module/plugins/crypter/Movie2kTo.py | 151 --------- module/plugins/crypter/MultiloadCz.py | 41 --- module/plugins/crypter/MultiuploadCom.py | 58 ---- module/plugins/crypter/NCryptIn.py | 251 -------------- module/plugins/crypter/NetfolderIn.py | 71 ---- module/plugins/crypter/OneKhDe.py | 36 -- module/plugins/crypter/OronComFolder.py | 46 --- module/plugins/crypter/QuickshareCzFolder.py | 30 -- module/plugins/crypter/RSDF.py | 49 --- module/plugins/crypter/RSLayerCom.py | 49 --- module/plugins/crypter/RelinkUs.py | 264 --------------- module/plugins/crypter/SecuredIn.py | 334 ------------------ module/plugins/crypter/SerienjunkiesOrg.py | 321 ------------------ module/plugins/crypter/ShareLinksBiz.py | 269 --------------- module/plugins/crypter/ShareRapidComFolder.py | 14 - module/plugins/crypter/SpeedLoadOrgFolder.py | 30 -- module/plugins/crypter/StealthTo.py | 45 --- module/plugins/crypter/TrailerzoneInfo.py | 45 --- module/plugins/crypter/UlozToFolder.py | 40 --- module/plugins/crypter/UploadedToFolder.py | 50 --- module/plugins/crypter/WiiReloadedOrg.py | 52 --- module/plugins/crypter/XfilesharingProFolder.py | 34 -- module/plugins/crypter/YoutubeBatch.py | 42 --- module/plugins/crypter/__init__.py | 0 module/plugins/hooks/Captcha9kw.py | 162 --------- module/plugins/hooks/ReloadCc.py | 65 ---- module/plugins/hoster/ARD.py | 80 ----- module/plugins/hoster/AlldebridCom.py | 84 ----- module/plugins/hoster/BasePlugin.py | 104 ------ module/plugins/hoster/BayfilesCom.py | 93 ----- module/plugins/hoster/BezvadataCz.py | 94 ------ module/plugins/hoster/BillionuploadsCom.py | 17 - module/plugins/hoster/BitshareCom.py | 179 ---------- module/plugins/hoster/BoltsharingCom.py | 15 - module/plugins/hoster/CatShareNet.py | 38 --- module/plugins/hoster/ChipDe.py | 24 -- module/plugins/hoster/CloudzerNet.py | 65 ---- module/plugins/hoster/CramitIn.py | 20 -- module/plugins/hoster/CrockoCom.py | 71 ---- module/plugins/hoster/CyberlockerCh.py | 15 - module/plugins/hoster/CzshareCom.py | 160 --------- module/plugins/hoster/DailymotionCom.py | 47 --- module/plugins/hoster/DataHu.py | 53 --- module/plugins/hoster/DataportCz.py | 68 ---- module/plugins/hoster/DateiTo.py | 94 ------ module/plugins/hoster/DdlstorageCom.py | 20 -- module/plugins/hoster/DebridItaliaCom.py | 61 ---- module/plugins/hoster/DepositfilesCom.py | 112 ------ module/plugins/hoster/DlFreeFr.py | 183 ---------- module/plugins/hoster/EasybytezCom.py | 47 --- module/plugins/hoster/EdiskCz.py | 62 ---- module/plugins/hoster/EgoFilesCom.py | 103 ------ module/plugins/hoster/EuroshareEu.py | 74 ---- module/plugins/hoster/ExtabitCom.py | 87 ----- module/plugins/hoster/FastshareCz.py | 96 ------ module/plugins/hoster/FileApeCom.py | 62 ---- module/plugins/hoster/FilebeerInfo.py | 15 - module/plugins/hoster/FilecloudIo.py | 112 ------ module/plugins/hoster/FilefactoryCom.py | 133 -------- module/plugins/hoster/FilejungleCom.py | 38 --- module/plugins/hoster/FilepostCom.py | 135 -------- module/plugins/hoster/FilerNet.py | 103 ------ module/plugins/hoster/FilerioCom.py | 20 -- module/plugins/hoster/FilesMailRu.py | 99 ------ module/plugins/hoster/FileserveCom.py | 211 ------------ module/plugins/hoster/FileshareInUa.py | 78 ----- module/plugins/hoster/FlyFilesNet.py | 41 --- module/plugins/hoster/FourSharedCom.py | 53 --- module/plugins/hoster/FreakshareCom.py | 167 --------- module/plugins/hoster/FreevideoCz.py | 64 ---- module/plugins/hoster/FshareVn.py | 111 ------ module/plugins/hoster/Ftp.py | 91 ----- module/plugins/hoster/GamefrontCom.py | 80 ----- module/plugins/hoster/GigapetaCom.py | 73 ---- module/plugins/hoster/HellshareCz.py | 56 --- module/plugins/hoster/HellspyCz.py | 70 ---- module/plugins/hoster/HotfileCom.py | 137 -------- module/plugins/hoster/IFileWs.py | 20 -- module/plugins/hoster/IcyFilesCom.py | 112 ------ module/plugins/hoster/IfileIt.py | 74 ---- module/plugins/hoster/IfolderRu.py | 90 ----- module/plugins/hoster/JumbofilesCom.py | 31 -- module/plugins/hoster/LetitbitNet.py | 125 ------- module/plugins/hoster/LoadTo.py | 83 ----- module/plugins/hoster/LuckyShareNet.py | 72 ---- module/plugins/hoster/MediafireCom.py | 135 -------- module/plugins/hoster/MegaNz.py | 125 ------- module/plugins/hoster/MegasharesCom.py | 108 ------ module/plugins/hoster/MovReelCom.py | 106 ------ module/plugins/hoster/MultiDebridCom.py | 57 ---- module/plugins/hoster/MultishareCz.py | 76 ----- module/plugins/hoster/MyvideoDe.py | 43 --- module/plugins/hoster/NarodRu.py | 66 ---- module/plugins/hoster/NetloadIn.py | 252 -------------- module/plugins/hoster/NovafileCom.py | 24 -- module/plugins/hoster/NowDownloadEu.py | 66 ---- module/plugins/hoster/OneFichierCom.py | 58 ---- module/plugins/hoster/PornhostCom.py | 76 ----- module/plugins/hoster/PornhubCom.py | 83 ----- module/plugins/hoster/Premium4Me.py | 70 ---- module/plugins/hoster/PremiumizeMe.py | 50 --- module/plugins/hoster/PutlockerCom.py | 78 ----- module/plugins/hoster/QuickshareCz.py | 99 ------ module/plugins/hoster/RapidgatorNet.py | 192 ----------- module/plugins/hoster/RapidshareCom.py | 225 ------------- module/plugins/hoster/RarefileNet.py | 34 -- module/plugins/hoster/RealdebridCom.py | 88 ----- module/plugins/hoster/RedtubeCom.py | 56 --- module/plugins/hoster/RehostTo.py | 37 -- module/plugins/hoster/ReloadCc.py | 103 ------ module/plugins/hoster/RyushareCom.py | 55 --- module/plugins/hoster/SecureUploadEu.py | 18 - module/plugins/hoster/SendmywayCom.py | 18 - module/plugins/hoster/SendspaceCom.py | 67 ---- module/plugins/hoster/Share4webCom.py | 16 - module/plugins/hoster/Share76Com.py | 19 -- module/plugins/hoster/ShareFilesCo.py | 24 -- module/plugins/hoster/ShareRapidCom.py | 104 ------ module/plugins/hoster/SharebeesCom.py | 19 -- module/plugins/hoster/ShareonlineBiz.py | 203 ----------- module/plugins/hoster/ShareplaceCom.py | 84 ----- module/plugins/hoster/ShragleCom.py | 106 ------ module/plugins/hoster/SpeedLoadOrg.py | 21 -- module/plugins/hoster/SpeedfileCz.py | 65 ---- module/plugins/hoster/StreamCz.py | 76 ----- module/plugins/hoster/TurbobitNet.py | 170 ---------- module/plugins/hoster/TurbouploadCom.py | 45 --- module/plugins/hoster/TusfilesNet.py | 18 - module/plugins/hoster/TwoSharedCom.py | 33 -- module/plugins/hoster/UlozTo.py | 156 --------- module/plugins/hoster/UloziskoSk.py | 75 ----- module/plugins/hoster/UnibytesCom.py | 80 ----- module/plugins/hoster/UploadStationCom.py | 21 -- module/plugins/hoster/UploadedTo.py | 238 ------------- module/plugins/hoster/UploadheroCom.py | 84 ----- module/plugins/hoster/UploadingCom.py | 110 ------ module/plugins/hoster/UptoboxCom.py | 21 -- module/plugins/hoster/VeehdCom.py | 80 ----- module/plugins/hoster/WarserverCz.py | 70 ---- module/plugins/hoster/WebshareCz.py | 48 --- module/plugins/hoster/WrzucTo.py | 58 ---- module/plugins/hoster/WuploadCom.py | 241 ------------- module/plugins/hoster/X7To.py | 93 ----- module/plugins/hoster/XFileSharingPro.py | 314 ----------------- module/plugins/hoster/XHamsterCom.py | 120 ------- module/plugins/hoster/XVideosCom.py | 19 -- module/plugins/hoster/Xdcc.py | 229 ------------- module/plugins/hoster/XvidstageCom.py | 114 ------- module/plugins/hoster/YibaishiwuCom.py | 54 --- module/plugins/hoster/YoupornCom.py | 56 --- module/plugins/hoster/YourfilesTo.py | 83 ----- module/plugins/hoster/YoutubeCom.py | 164 --------- module/plugins/hoster/ZDF.py | 46 --- module/plugins/hoster/ZeveraCom.py | 108 ------ module/plugins/hoster/ZippyshareCom.py | 187 ---------- module/plugins/hoster/__init__.py | 0 module/plugins/internal/AbstractExtractor.py | 93 ----- module/plugins/internal/CaptchaService.py | 77 ----- module/plugins/internal/DeadHoster.py | 18 - module/plugins/internal/NetloadInOCR.py | 27 -- module/plugins/internal/OCR.py | 314 ----------------- module/plugins/internal/ShareonlineBizOCR.py | 53 --- module/plugins/internal/SimpleCrypter.py | 68 ---- module/plugins/internal/SimpleHoster.py | 251 -------------- module/plugins/internal/UnRar.py | 212 ------------ module/plugins/internal/UnZip.py | 49 --- module/plugins/internal/XFSPAccount.py | 79 ----- module/plugins/internal/__init__.py | 0 305 files changed, 24636 deletions(-) delete mode 100644 module/plugins/Account.py delete mode 100644 module/plugins/Addon.py delete mode 100644 module/plugins/Base.py delete mode 100644 module/plugins/Crypter.py delete mode 100644 module/plugins/Hoster.py delete mode 100644 module/plugins/MultiHoster.py delete mode 100644 module/plugins/ReCaptcha.py delete mode 100644 module/plugins/__init__.py delete mode 100644 module/plugins/accounts/AlldebridCom.py delete mode 100644 module/plugins/accounts/BayfilesCom.py delete mode 100644 module/plugins/accounts/BitshareCom.py delete mode 100644 module/plugins/accounts/BoltsharingCom.py delete mode 100644 module/plugins/accounts/CramitIn.py delete mode 100644 module/plugins/accounts/CyberlockerCh.py delete mode 100644 module/plugins/accounts/CzshareCom.py delete mode 100644 module/plugins/accounts/DdlstorageCom.py delete mode 100644 module/plugins/accounts/DebridItaliaCom.py delete mode 100644 module/plugins/accounts/DepositfilesCom.py delete mode 100644 module/plugins/accounts/EasybytezCom.py delete mode 100644 module/plugins/accounts/EgoFilesCom.py delete mode 100644 module/plugins/accounts/EuroshareEu.py delete mode 100644 module/plugins/accounts/FastshareCz.py delete mode 100644 module/plugins/accounts/FilebeerInfo.py delete mode 100644 module/plugins/accounts/FilecloudIo.py delete mode 100644 module/plugins/accounts/FilefactoryCom.py delete mode 100644 module/plugins/accounts/FilejungleCom.py delete mode 100644 module/plugins/accounts/FilerioCom.py delete mode 100644 module/plugins/accounts/FilesMailRu.py delete mode 100644 module/plugins/accounts/FileserveCom.py delete mode 100644 module/plugins/accounts/FourSharedCom.py delete mode 100644 module/plugins/accounts/FreakshareCom.py delete mode 100644 module/plugins/accounts/FshareVn.py delete mode 100644 module/plugins/accounts/Ftp.py delete mode 100644 module/plugins/accounts/HellshareCz.py delete mode 100644 module/plugins/accounts/HellspyCz.py delete mode 100644 module/plugins/accounts/HotfileCom.py delete mode 100644 module/plugins/accounts/Http.py delete mode 100644 module/plugins/accounts/MegasharesCom.py delete mode 100644 module/plugins/accounts/MultiDebridCom.py delete mode 100644 module/plugins/accounts/MultishareCz.py delete mode 100755 module/plugins/accounts/NetloadIn.py delete mode 100644 module/plugins/accounts/Premium4Me.py delete mode 100644 module/plugins/accounts/PremiumizeMe.py delete mode 100644 module/plugins/accounts/QuickshareCz.py delete mode 100644 module/plugins/accounts/RapidgatorNet.py delete mode 100644 module/plugins/accounts/RapidshareCom.py delete mode 100644 module/plugins/accounts/RarefileNet.py delete mode 100644 module/plugins/accounts/RealdebridCom.py delete mode 100644 module/plugins/accounts/RehostTo.py delete mode 100644 module/plugins/accounts/ReloadCc.py delete mode 100644 module/plugins/accounts/RyushareCom.py delete mode 100644 module/plugins/accounts/Share76Com.py delete mode 100644 module/plugins/accounts/ShareFilesCo.py delete mode 100644 module/plugins/accounts/ShareRapidCom.py delete mode 100644 module/plugins/accounts/ShareonlineBiz.py delete mode 100644 module/plugins/accounts/SpeedLoadOrg.py delete mode 100644 module/plugins/accounts/StahnuTo.py delete mode 100644 module/plugins/accounts/TurbobitNet.py delete mode 100644 module/plugins/accounts/UlozTo.py delete mode 100644 module/plugins/accounts/UploadedTo.py delete mode 100644 module/plugins/accounts/UploadheroCom.py delete mode 100644 module/plugins/accounts/UploadingCom.py delete mode 100644 module/plugins/accounts/UploadstationCom.py delete mode 100644 module/plugins/accounts/UptoboxCom.py delete mode 100644 module/plugins/accounts/WarserverCz.py delete mode 100644 module/plugins/accounts/WuploadCom.py delete mode 100644 module/plugins/accounts/X7To.py delete mode 100644 module/plugins/accounts/YibaishiwuCom.py delete mode 100644 module/plugins/accounts/ZeveraCom.py delete mode 100644 module/plugins/accounts/__init__.py delete mode 100644 module/plugins/addons/AlldebridCom.py delete mode 100644 module/plugins/addons/BypassCaptcha.py delete mode 100644 module/plugins/addons/CaptchaBrotherhood.py delete mode 100644 module/plugins/addons/CaptchaTrader.py delete mode 100644 module/plugins/addons/Checksum.py delete mode 100644 module/plugins/addons/ClickAndLoad.py delete mode 100644 module/plugins/addons/DeathByCaptcha.py delete mode 100644 module/plugins/addons/DebridItaliaCom.py delete mode 100644 module/plugins/addons/DeleteFinished.py delete mode 100644 module/plugins/addons/DownloadScheduler.py delete mode 100644 module/plugins/addons/EasybytezCom.py delete mode 100644 module/plugins/addons/Ev0InFetcher.py delete mode 100644 module/plugins/addons/ExpertDecoders.py delete mode 100644 module/plugins/addons/ExternalScripts.py delete mode 100644 module/plugins/addons/ExtractArchive.py delete mode 100644 module/plugins/addons/HotFolder.py delete mode 100644 module/plugins/addons/IRCInterface.py delete mode 100644 module/plugins/addons/ImageTyperz.py delete mode 100644 module/plugins/addons/LinkdecrypterCom.py delete mode 100644 module/plugins/addons/MergeFiles.py delete mode 100644 module/plugins/addons/MultiDebridCom.py delete mode 100644 module/plugins/addons/MultiHome.py delete mode 100644 module/plugins/addons/MultiHoster.py delete mode 100644 module/plugins/addons/MultishareCz.py delete mode 100644 module/plugins/addons/Premium4Me.py delete mode 100644 module/plugins/addons/PremiumizeMe.py delete mode 100644 module/plugins/addons/RealdebridCom.py delete mode 100644 module/plugins/addons/RehostTo.py delete mode 100644 module/plugins/addons/RestartFailed.py delete mode 100644 module/plugins/addons/UnSkipOnFail.py delete mode 100644 module/plugins/addons/UpdateManager.py delete mode 100644 module/plugins/addons/XFileSharingPro.py delete mode 100644 module/plugins/addons/XMPPInterface.py delete mode 100644 module/plugins/addons/ZeveraCom.py delete mode 100644 module/plugins/addons/__init__.py delete mode 100644 module/plugins/crypter/C1neonCom.py delete mode 100644 module/plugins/crypter/CCF.py delete mode 100644 module/plugins/crypter/CrockoComFolder.py delete mode 100644 module/plugins/crypter/CryptItCom.py delete mode 100644 module/plugins/crypter/CzshareComFolder.py delete mode 100644 module/plugins/crypter/DDLMusicOrg.py delete mode 100644 module/plugins/crypter/DataHuFolder.py delete mode 100644 module/plugins/crypter/DdlstorageComFolder.py delete mode 100644 module/plugins/crypter/DepositfilesComFolder.py delete mode 100644 module/plugins/crypter/Dereferer.py delete mode 100644 module/plugins/crypter/DontKnowMe.py delete mode 100644 module/plugins/crypter/DownloadVimeoCom.py delete mode 100644 module/plugins/crypter/DuckCryptInfo.py delete mode 100644 module/plugins/crypter/EasybytezComFolder.py delete mode 100644 module/plugins/crypter/EmbeduploadCom.py delete mode 100644 module/plugins/crypter/FilebeerInfoFolder.py delete mode 100644 module/plugins/crypter/FilefactoryComFolder.py delete mode 100644 module/plugins/crypter/FileserveComFolder.py delete mode 100644 module/plugins/crypter/FourChanOrg.py delete mode 100644 module/plugins/crypter/FshareVnFolder.py delete mode 100644 module/plugins/crypter/GooGl.py delete mode 100644 module/plugins/crypter/HoerbuchIn.py delete mode 100644 module/plugins/crypter/HotfileFolderCom.py delete mode 100644 module/plugins/crypter/ILoadTo.py delete mode 100644 module/plugins/crypter/LetitbitNetFolder.py delete mode 100644 module/plugins/crypter/LinkList.py delete mode 100644 module/plugins/crypter/LinkSaveIn.py delete mode 100644 module/plugins/crypter/LinkdecrypterCom.py delete mode 100644 module/plugins/crypter/LixIn.py delete mode 100644 module/plugins/crypter/LofCc.py delete mode 100644 module/plugins/crypter/MBLinkInfo.py delete mode 100644 module/plugins/crypter/MediafireComFolder.py delete mode 100644 module/plugins/crypter/Movie2kTo.py delete mode 100644 module/plugins/crypter/MultiloadCz.py delete mode 100644 module/plugins/crypter/MultiuploadCom.py delete mode 100644 module/plugins/crypter/NCryptIn.py delete mode 100644 module/plugins/crypter/NetfolderIn.py delete mode 100644 module/plugins/crypter/OneKhDe.py delete mode 100755 module/plugins/crypter/OronComFolder.py delete mode 100644 module/plugins/crypter/QuickshareCzFolder.py delete mode 100644 module/plugins/crypter/RSDF.py delete mode 100644 module/plugins/crypter/RSLayerCom.py delete mode 100644 module/plugins/crypter/RelinkUs.py delete mode 100644 module/plugins/crypter/SecuredIn.py delete mode 100644 module/plugins/crypter/SerienjunkiesOrg.py delete mode 100644 module/plugins/crypter/ShareLinksBiz.py delete mode 100644 module/plugins/crypter/ShareRapidComFolder.py delete mode 100644 module/plugins/crypter/SpeedLoadOrgFolder.py delete mode 100644 module/plugins/crypter/StealthTo.py delete mode 100644 module/plugins/crypter/TrailerzoneInfo.py delete mode 100644 module/plugins/crypter/UlozToFolder.py delete mode 100644 module/plugins/crypter/UploadedToFolder.py delete mode 100644 module/plugins/crypter/WiiReloadedOrg.py delete mode 100644 module/plugins/crypter/XfilesharingProFolder.py delete mode 100644 module/plugins/crypter/YoutubeBatch.py delete mode 100644 module/plugins/crypter/__init__.py delete mode 100755 module/plugins/hooks/Captcha9kw.py delete mode 100644 module/plugins/hooks/ReloadCc.py delete mode 100644 module/plugins/hoster/ARD.py delete mode 100644 module/plugins/hoster/AlldebridCom.py delete mode 100644 module/plugins/hoster/BasePlugin.py delete mode 100644 module/plugins/hoster/BayfilesCom.py delete mode 100644 module/plugins/hoster/BezvadataCz.py delete mode 100644 module/plugins/hoster/BillionuploadsCom.py delete mode 100644 module/plugins/hoster/BitshareCom.py delete mode 100644 module/plugins/hoster/BoltsharingCom.py delete mode 100644 module/plugins/hoster/CatShareNet.py delete mode 100644 module/plugins/hoster/ChipDe.py delete mode 100644 module/plugins/hoster/CloudzerNet.py delete mode 100644 module/plugins/hoster/CramitIn.py delete mode 100644 module/plugins/hoster/CrockoCom.py delete mode 100644 module/plugins/hoster/CyberlockerCh.py delete mode 100644 module/plugins/hoster/CzshareCom.py delete mode 100644 module/plugins/hoster/DailymotionCom.py delete mode 100644 module/plugins/hoster/DataHu.py delete mode 100644 module/plugins/hoster/DataportCz.py delete mode 100644 module/plugins/hoster/DateiTo.py delete mode 100644 module/plugins/hoster/DdlstorageCom.py delete mode 100644 module/plugins/hoster/DebridItaliaCom.py delete mode 100644 module/plugins/hoster/DepositfilesCom.py delete mode 100644 module/plugins/hoster/DlFreeFr.py delete mode 100644 module/plugins/hoster/EasybytezCom.py delete mode 100644 module/plugins/hoster/EdiskCz.py delete mode 100644 module/plugins/hoster/EgoFilesCom.py delete mode 100644 module/plugins/hoster/EuroshareEu.py delete mode 100644 module/plugins/hoster/ExtabitCom.py delete mode 100644 module/plugins/hoster/FastshareCz.py delete mode 100644 module/plugins/hoster/FileApeCom.py delete mode 100644 module/plugins/hoster/FilebeerInfo.py delete mode 100644 module/plugins/hoster/FilecloudIo.py delete mode 100644 module/plugins/hoster/FilefactoryCom.py delete mode 100644 module/plugins/hoster/FilejungleCom.py delete mode 100644 module/plugins/hoster/FilepostCom.py delete mode 100644 module/plugins/hoster/FilerNet.py delete mode 100644 module/plugins/hoster/FilerioCom.py delete mode 100644 module/plugins/hoster/FilesMailRu.py delete mode 100644 module/plugins/hoster/FileserveCom.py delete mode 100644 module/plugins/hoster/FileshareInUa.py delete mode 100644 module/plugins/hoster/FlyFilesNet.py delete mode 100644 module/plugins/hoster/FourSharedCom.py delete mode 100644 module/plugins/hoster/FreakshareCom.py delete mode 100644 module/plugins/hoster/FreevideoCz.py delete mode 100644 module/plugins/hoster/FshareVn.py delete mode 100644 module/plugins/hoster/Ftp.py delete mode 100644 module/plugins/hoster/GamefrontCom.py delete mode 100644 module/plugins/hoster/GigapetaCom.py delete mode 100644 module/plugins/hoster/HellshareCz.py delete mode 100644 module/plugins/hoster/HellspyCz.py delete mode 100644 module/plugins/hoster/HotfileCom.py delete mode 100644 module/plugins/hoster/IFileWs.py delete mode 100644 module/plugins/hoster/IcyFilesCom.py delete mode 100644 module/plugins/hoster/IfileIt.py delete mode 100644 module/plugins/hoster/IfolderRu.py delete mode 100644 module/plugins/hoster/JumbofilesCom.py delete mode 100644 module/plugins/hoster/LetitbitNet.py delete mode 100644 module/plugins/hoster/LoadTo.py delete mode 100644 module/plugins/hoster/LuckyShareNet.py delete mode 100644 module/plugins/hoster/MediafireCom.py delete mode 100644 module/plugins/hoster/MegaNz.py delete mode 100644 module/plugins/hoster/MegasharesCom.py delete mode 100644 module/plugins/hoster/MovReelCom.py delete mode 100644 module/plugins/hoster/MultiDebridCom.py delete mode 100644 module/plugins/hoster/MultishareCz.py delete mode 100644 module/plugins/hoster/MyvideoDe.py delete mode 100644 module/plugins/hoster/NarodRu.py delete mode 100644 module/plugins/hoster/NetloadIn.py delete mode 100644 module/plugins/hoster/NovafileCom.py delete mode 100644 module/plugins/hoster/NowDownloadEu.py delete mode 100644 module/plugins/hoster/OneFichierCom.py delete mode 100644 module/plugins/hoster/PornhostCom.py delete mode 100644 module/plugins/hoster/PornhubCom.py delete mode 100644 module/plugins/hoster/Premium4Me.py delete mode 100644 module/plugins/hoster/PremiumizeMe.py delete mode 100644 module/plugins/hoster/PutlockerCom.py delete mode 100644 module/plugins/hoster/QuickshareCz.py delete mode 100644 module/plugins/hoster/RapidgatorNet.py delete mode 100644 module/plugins/hoster/RapidshareCom.py delete mode 100644 module/plugins/hoster/RarefileNet.py delete mode 100644 module/plugins/hoster/RealdebridCom.py delete mode 100644 module/plugins/hoster/RedtubeCom.py delete mode 100644 module/plugins/hoster/RehostTo.py delete mode 100644 module/plugins/hoster/ReloadCc.py delete mode 100644 module/plugins/hoster/RyushareCom.py delete mode 100644 module/plugins/hoster/SecureUploadEu.py delete mode 100644 module/plugins/hoster/SendmywayCom.py delete mode 100644 module/plugins/hoster/SendspaceCom.py delete mode 100644 module/plugins/hoster/Share4webCom.py delete mode 100644 module/plugins/hoster/Share76Com.py delete mode 100644 module/plugins/hoster/ShareFilesCo.py delete mode 100644 module/plugins/hoster/ShareRapidCom.py delete mode 100644 module/plugins/hoster/SharebeesCom.py delete mode 100644 module/plugins/hoster/ShareonlineBiz.py delete mode 100644 module/plugins/hoster/ShareplaceCom.py delete mode 100644 module/plugins/hoster/ShragleCom.py delete mode 100644 module/plugins/hoster/SpeedLoadOrg.py delete mode 100644 module/plugins/hoster/SpeedfileCz.py delete mode 100644 module/plugins/hoster/StreamCz.py delete mode 100644 module/plugins/hoster/TurbobitNet.py delete mode 100644 module/plugins/hoster/TurbouploadCom.py delete mode 100644 module/plugins/hoster/TusfilesNet.py delete mode 100644 module/plugins/hoster/TwoSharedCom.py delete mode 100644 module/plugins/hoster/UlozTo.py delete mode 100644 module/plugins/hoster/UloziskoSk.py delete mode 100644 module/plugins/hoster/UnibytesCom.py delete mode 100644 module/plugins/hoster/UploadStationCom.py delete mode 100644 module/plugins/hoster/UploadedTo.py delete mode 100644 module/plugins/hoster/UploadheroCom.py delete mode 100644 module/plugins/hoster/UploadingCom.py delete mode 100644 module/plugins/hoster/UptoboxCom.py delete mode 100644 module/plugins/hoster/VeehdCom.py delete mode 100644 module/plugins/hoster/WarserverCz.py delete mode 100644 module/plugins/hoster/WebshareCz.py delete mode 100644 module/plugins/hoster/WrzucTo.py delete mode 100644 module/plugins/hoster/WuploadCom.py delete mode 100644 module/plugins/hoster/X7To.py delete mode 100644 module/plugins/hoster/XFileSharingPro.py delete mode 100644 module/plugins/hoster/XHamsterCom.py delete mode 100644 module/plugins/hoster/XVideosCom.py delete mode 100644 module/plugins/hoster/Xdcc.py delete mode 100644 module/plugins/hoster/XvidstageCom.py delete mode 100644 module/plugins/hoster/YibaishiwuCom.py delete mode 100644 module/plugins/hoster/YoupornCom.py delete mode 100644 module/plugins/hoster/YourfilesTo.py delete mode 100644 module/plugins/hoster/YoutubeCom.py delete mode 100644 module/plugins/hoster/ZDF.py delete mode 100644 module/plugins/hoster/ZeveraCom.py delete mode 100644 module/plugins/hoster/ZippyshareCom.py delete mode 100644 module/plugins/hoster/__init__.py delete mode 100644 module/plugins/internal/AbstractExtractor.py delete mode 100644 module/plugins/internal/CaptchaService.py delete mode 100644 module/plugins/internal/DeadHoster.py delete mode 100644 module/plugins/internal/NetloadInOCR.py delete mode 100644 module/plugins/internal/OCR.py delete mode 100644 module/plugins/internal/ShareonlineBizOCR.py delete mode 100644 module/plugins/internal/SimpleCrypter.py delete mode 100644 module/plugins/internal/SimpleHoster.py delete mode 100644 module/plugins/internal/UnRar.py delete mode 100644 module/plugins/internal/UnZip.py delete mode 100644 module/plugins/internal/XFSPAccount.py delete mode 100644 module/plugins/internal/__init__.py (limited to 'module/plugins') diff --git a/module/plugins/Account.py b/module/plugins/Account.py deleted file mode 100644 index 3ba819a6f..000000000 --- a/module/plugins/Account.py +++ /dev/null @@ -1,295 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time -from traceback import print_exc -from threading import RLock - -from module.utils import compare_time, format_size, parseFileSize, lock, from_string -from module.Api import AccountInfo -from module.network.CookieJar import CookieJar - -from Base import Base - - -class WrongPassword(Exception): - pass - -#noinspection PyUnresolvedReferences -class Account(Base): - """ - Base class for every account plugin. - Just overwrite `login` and cookies will be stored and the account becomes accessible in\ - associated hoster plugin. Plugin should also provide `loadAccountInfo`. \ - An instance of this class is created for every entered account, it holds all \ - fields of AccountInfo ttype, and can be set easily at runtime. - """ - - # constants for special values - UNKNOWN = -1 - UNLIMITED = -2 - - # Default values - owner = None - valid = True - validuntil = -1 - trafficleft = -1 - maxtraffic = -1 - premium = True - activated = True - shared = False - - #: after that time [in minutes] pyload will relogin the account - login_timeout = 600 - #: account data will be reloaded after this time - info_threshold = 600 - - # known options - known_opt = ("time", "limitDL") - - def __init__(self, manager, loginname, password, options): - Base.__init__(self, manager.core) - - if "activated" in options: - self.activated = from_string(options["activated"], "bool") - else: - self.activated = Account.activated - - for opt in self.known_opt: - if opt not in options: - options[opt] = "" - - for opt in options.keys(): - if opt not in self.known_opt: - del options[opt] - - self.loginname = loginname - self.options = options - - self.manager = manager - - self.lock = RLock() - self.timestamp = 0 - self.login_ts = 0 # timestamp for login - self.cj = CookieJar(self.__name__) - self.password = password - self.error = None - - self.init() - - def toInfoData(self): - return AccountInfo(self.__name__, self.loginname, self.owner, self.valid, self.validuntil, self.trafficleft, - self.maxtraffic, - self.premium, self.activated, self.shared, self.options) - - def init(self): - pass - - def login(self, req): - """login into account, the cookies will be saved so the user can be recognized - - :param req: `Request` instance - """ - raise NotImplemented - - def relogin(self): - """ Force a login. """ - req = self.getAccountRequest() - try: - return self._login(req) - finally: - req.close() - - @lock - def _login(self, req): - # set timestamp for login - self.login_ts = time() - - try: - try: - self.login(req) - except TypeError: #TODO: temporary - self.logDebug("Deprecated .login(...) signature omit user, data") - self.login(self.loginname, {"password": self.password}, req) - - self.valid = True - except WrongPassword: - self.logWarning( - _("Could not login with account %(user)s | %(msg)s") % {"user": self.loginname - , "msg": _("Wrong Password")}) - self.valid = False - - except Exception, e: - self.logWarning( - _("Could not login with account %(user)s | %(msg)s") % {"user": self.loginname - , "msg": e}) - self.valid = False - if self.core.debug: - print_exc() - - return self.valid - - def restoreDefaults(self): - self.validuntil = Account.validuntil - self.trafficleft = Account.trafficleft - self.maxtraffic = Account.maxtraffic - self.premium = Account.premium - - def update(self, password=None, options=None): - """ updates the account and returns true if anything changed """ - - self.login_ts = 0 - self.valid = True #set valid, so the login will be retried - - if "activated" in options: - self.activated = from_string(options["avtivated"], "bool") - - if password: - self.password = password - self.relogin() - return True - if options: - # remove unknown options - for opt in options.keys(): - if opt not in self.known_opt: - del options[opt] - - before = self.options - self.options.update(options) - return self.options != before - - def getAccountRequest(self): - return self.core.requestFactory.getRequest(self.__name__, self.cj) - - def getDownloadSettings(self): - """ Can be overwritten to change download settings. Default is no chunkLimit, max dl limit, resumeDownload - - :return: (chunkLimit, limitDL, resumeDownload) / (int, int ,bool) - """ - return -1, 0, True - - @lock - def getAccountInfo(self, force=False): - """retrieve account info's for an user, do **not** overwrite this method!\\ - just use it to retrieve info's in hoster plugins. see `loadAccountInfo` - - :param name: username - :param force: reloads cached account information - :return: dictionary with information - """ - if force or self.timestamp + self.info_threshold * 60 < time(): - - # make sure to login - req = self.getAccountRequest() - self.checkLogin(req) - self.logInfo(_("Get Account Info for %s") % self.loginname) - try: - try: - infos = self.loadAccountInfo(req) - except TypeError: #TODO: temporary - self.logDebug("Deprecated .loadAccountInfo(...) signature, omit user argument.") - infos = self.loadAccountInfo(self.loginname, req) - except Exception, e: - infos = {"error": str(e)} - self.logError(_("Error: %s") % e) - finally: - req.close() - - self.logDebug("Account Info: %s" % str(infos)) - self.timestamp = time() - - self.restoreDefaults() # reset to initial state - if type(infos) == dict: # copy result from dict to class - for k, v in infos.iteritems(): - if hasattr(self, k): - setattr(self, k, v) - else: - self.logDebug("Unknown attribute %s=%s" % (k, v)) - - #TODO: remove user - def loadAccountInfo(self, req): - """ Overwrite this method and set account attributes within this method. - - :param user: Deprecated - :param req: Request instance - :return: - """ - pass - - def getAccountCookies(self, user): - self.logDebug("Deprecated method .getAccountCookies -> use account.cj") - return self.cj - - def getAccountData(self, user): - self.logDebug("Deprecated method .getAccountData -> use fields directly") - return {"password": self.password} - - def isPremium(self, user=None): - if user: self.logDebug("Deprecated Argument user for .isPremium()", user) - return self.premium - - def isUsable(self): - """Check several constraints to determine if account should be used""" - if not self.valid or not self.activated: return False - - if self.options["time"]: - time_data = "" - try: - time_data = self.options["time"] - start, end = time_data.split("-") - if not compare_time(start.split(":"), end.split(":")): - return False - except: - self.logWarning(_("Your Time %s has a wrong format, use: 1:22-3:44") % time_data) - - if 0 <= self.validuntil < time(): - return False - if self.trafficleft is 0: # test explicitly for 0 - return False - - return True - - def parseTraffic(self, string): #returns kbyte - return parseFileSize(string) / 1024 - - def formatTrafficleft(self): - if self.trafficleft is None: - self.getAccountInfo(force=True) - return format_size(self.trafficleft * 1024) - - def wrongPassword(self): - raise WrongPassword - - def empty(self, user=None): - if user: self.logDebug("Deprecated argument user for .empty()", user) - - self.logWarning(_("Account %s has not enough traffic, checking again in 30min") % self.login) - - self.trafficleft = 0 - self.scheduleRefresh(30 * 60) - - def expired(self, user=None): - if user: self.logDebug("Deprecated argument user for .expired()", user) - - self.logWarning(_("Account %s is expired, checking again in 1h") % user) - - self.validuntil = time() - 1 - self.scheduleRefresh(60 * 60) - - def scheduleRefresh(self, time=0, force=True): - """ add a task for refreshing the account info to the scheduler """ - self.logDebug("Scheduled Account refresh for %s in %s seconds." % (self.loginname, time)) - self.core.scheduler.addJob(time, self.getAccountInfo, [force]) - - @lock - def checkLogin(self, req): - """ checks if the user is still logged in """ - if self.login_ts + self.login_timeout * 60 < time(): - if self.login_ts: # separate from fresh login to have better debug logs - self.logDebug("Reached login timeout for %s" % self.loginname) - else: - self.logInfo(_("Login with %s") % self.loginname) - - self._login(req) - return False - - return True diff --git a/module/plugins/Addon.py b/module/plugins/Addon.py deleted file mode 100644 index ff9c57bef..000000000 --- a/module/plugins/Addon.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: RaNaN -""" - -from traceback import print_exc - -#from functools import wraps -from module.utils import has_method, to_list - -from Base import Base - -def class_name(p): - return p.rpartition(".")[2] - - -def AddEventListener(event): - """ Used to register method for events. Arguments needs to match parameter of event - - :param event: Name of event or list of them. - """ - class _klass(object): - def __new__(cls, f, *args, **kwargs): - for ev in to_list(event): - addonManager.addEventListener(class_name(f.__module__), f.func_name, ev) - return f - return _klass - -class ConfigHandler(object): - """ Register method as config handler. - - Your method signature has to be: - def foo(value=None): - - value will be passed to use your method to set the config. - When value is None your method needs to return an interaction task for configuration. - """ - - def __new__(cls, f, *args, **kwargs): - addonManager.addConfigHandler(class_name(f.__module__), f.func_name) - return f - -def AddonHandler(desc, media=None): - """ Register Handler for files, packages, or arbitrary callable methods. - To let the method work on packages/files, media must be set and the argument named pid or fid. - - :param desc: verbose description - :param media: if True or bits of media type - """ - pass - -def AddonInfo(desc): - """ Called to retrieve information about the current state. - Decorated method must return anything convertable into string. - - :param desc: verbose description - """ - pass - -def threaded(f): - """ Decorator to run method in a thread. """ - - #@wraps(f) - def run(*args,**kwargs): - addonManager.startThread(f, *args, **kwargs) - return run - -class Addon(Base): - """ - Base class for addon plugins. Use @threaded decorator for all longer running tasks. - - Decorate methods with @Expose, @AddEventListener, @ConfigHandler - - """ - - #: automatically register event listeners for functions, attribute will be deleted don't use it yourself - event_map = None - - # Alternative to event_map - #: List of events the plugin can handle, name the functions exactly like eventname. - event_list = None # dont make duplicate entries in event_map - - #: periodic call interval in seconds - interval = 60 - - def __init__(self, core, manager, user=None): - Base.__init__(self, core, user) - - #: Provide information in dict here, usable by API `getInfo` - self.info = None - - #: Callback of periodical job task, used by addonmanager - self.cb = None - - #: `AddonManager` - self.manager = manager - - #register events - if self.event_map: - for event, funcs in self.event_map.iteritems(): - if type(funcs) in (list, tuple): - for f in funcs: - self.evm.addEvent(event, getattr(self,f)) - else: - self.evm.addEvent(event, getattr(self,funcs)) - - #delete for various reasons - self.event_map = None - - if self.event_list: - for f in self.event_list: - self.evm.addEvent(f, getattr(self,f)) - - self.event_list = None - - self.initPeriodical() - self.init() - self.setup() - - def initPeriodical(self): - if self.interval >=1: - self.cb = self.core.scheduler.addJob(0, self._periodical, threaded=False) - - def _periodical(self): - try: - if self.isActivated(): self.periodical() - except Exception, e: - self.core.log.error(_("Error executing addons: %s") % str(e)) - if self.core.debug: - print_exc() - - self.cb = self.core.scheduler.addJob(self.interval, self._periodical, threaded=False) - - def __repr__(self): - return "" % self.__name__ - - def isActivated(self): - """ checks if addon is activated""" - return True if self.__internal__ else self.getConfig("activated") - - def getCategory(self): - return self.core.pluginManager.getCategory(self.__name__) - - def init(self): - pass - - def setup(self): - """ more init stuff if needed """ - pass - - def activate(self): - """ Used to activate the addon """ - if has_method(self.__class__, "coreReady"): - self.logDebug("Deprecated method .coreReady() use activate() instead") - self.coreReady() - - def deactivate(self): - """ Used to deactivate the addon. """ - pass - - def periodical(self): - pass - - def newInteractionTask(self, task): - """ new interaction task for the plugin, it MUST set the handler and timeout or will be ignored """ - pass - - def taskCorrect(self, task): - pass - - def taskInvalid(self, task): - pass - - # public events starts from here - def downloadPreparing(self, pyfile): - pass - - def downloadFinished(self, pyfile): - pass - - def downloadFailed(self, pyfile): - pass - - def packageFinished(self, pypack): - pass - - def beforeReconnecting(self, ip): - pass - - def afterReconnecting(self, ip): - pass \ No newline at end of file diff --git a/module/plugins/Base.py b/module/plugins/Base.py deleted file mode 100644 index 7825e1c49..000000000 --- a/module/plugins/Base.py +++ /dev/null @@ -1,343 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: RaNaN -""" - -import sys -from time import time, sleep -from random import randint - -from module.utils import decode -from module.utils.fs import exists, makedirs, join, remove - -# TODO -# more attributes if needed -# get rid of catpcha & container plugins ?! (move to crypter & internals) -# adapt old plugins as needed - -class Fail(Exception): - """ raised when failed """ - -class Retry(Exception): - """ raised when start again from beginning """ - -class Abort(Exception): - """ raised when aborted """ - -class Base(object): - """ - The Base plugin class with all shared methods and every possible attribute for plugin definition. - """ - __version__ = "0.1" - #: Regexp pattern which will be matched for download/crypter plugins - __pattern__ = r"" - #: Internal addon plugin which is always loaded - __internal__ = False - #: When True this addon can be enabled by every user - __user_context__ = False - #: Config definition: list of (name, type, label, default_value) or - #: (name, type, label, short_description, default_value) - __config__ = list() - #: Short description, one liner - __label__ = "" - #: More detailed text - __description__ = """""" - #: List of needed modules - __dependencies__ = tuple() - #: Used to assign a category for addon plugins - __category__ = "" - #: Tags to categorize the plugin, see documentation for further info - __tags__ = tuple() - #: Base64 encoded .png icon, should be 32x32, please don't use sizes above ~2KB, for bigger icons use url. - __icon__ = "" - #: Alternative, link to png icon - __icon_url__ = "" - #: Url with general information/support/discussion - __url__ = "" - #: Url to term of content, user is accepting these when using the plugin - __toc_url__ = "" - #: Url to service (to buy premium) for accounts - __ref_url__ = "" - - __author_name__ = tuple() - __author_mail__ = tuple() - - - def __init__(self, core, user=None): - self.__name__ = self.__class__.__name__ - - #: Core instance - self.core = core - #: logging instance - self.log = core.log - #: core config - self.config = core.config - #: :class:`EventManager` - self.evm = core.eventManager - #: :class:`InteractionManager` - self.im = core.interactionManager - if user: - #: :class:`Api`, user api when user is set - self.api = self.core.api.withUserContext(user) - if self.api: - #: :class:`User`, user related to this plugin - self.user = self.api.user - else: - self.api = self.core.api - self.user = None - else: - self.api = self.core.api - self.user = None - - #: last interaction task - self.task = None - - def logInfo(self, *args, **kwargs): - """ Print args to log at specific level - - :param args: Arbitrary object which should be logged - :param kwargs: sep=(how to separate arguments), default = " | " - """ - self._log("info", *args, **kwargs) - - def logWarning(self, *args, **kwargs): - self._log("warning", *args, **kwargs) - - def logError(self, *args, **kwargs): - self._log("error", *args, **kwargs) - - def logDebug(self, *args, **kwargs): - self._log("debug", *args, **kwargs) - - def _log(self, level, *args, **kwargs): - if "sep" in kwargs: - sep = "%s" % kwargs["sep"] - else: - sep = " | " - - strings = [] - for obj in args: - if type(obj) == unicode: - strings.append(obj) - elif type(obj) == str: - strings.append(decode(obj)) - else: - strings.append(str(obj)) - - getattr(self.log, level)("%s: %s" % (self.__name__, sep.join(strings))) - - def getName(self): - """ Name of the plugin class """ - return self.__name__ - - def setConfig(self, option, value): - """ Set config value for current plugin """ - self.core.config.set(self.__name__, option, value) - - def getConf(self, option): - """ see `getConfig` """ - return self.getConfig(option) - - def getConfig(self, option): - """ Returns config value for current plugin """ - return self.core.config.get(self.__name__, option) - - def setStorage(self, key, value): - """ Saves a value persistently to the database """ - self.core.db.setStorage(self.__name__, key, value) - - def store(self, key, value): - """ same as `setStorage` """ - self.core.db.setStorage(self.__name__, key, value) - - def getStorage(self, key=None, default=None): - """ Retrieves saved value or dict of all saved entries if key is None """ - if key is not None: - return self.core.db.getStorage(self.__name__, key) or default - return self.core.db.getStorage(self.__name__, key) - - def retrieve(self, *args, **kwargs): - """ same as `getStorage` """ - return self.getStorage(*args, **kwargs) - - def delStorage(self, key): - """ Delete entry in db """ - self.core.db.delStorage(self.__name__, key) - - def shell(self): - """ open ipython shell """ - if self.core.debug: - from IPython import embed - #noinspection PyUnresolvedReferences - sys.stdout = sys._stdout - embed() - - def abort(self): - """ Check if plugin is in an abort state, is overwritten by subtypes""" - return False - - def checkAbort(self): - """ Will be overwritten to determine if control flow should be aborted """ - if self.abort(): raise Abort() - - def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=False): - """Load content at url and returns it - - :param url: url as string - :param get: GET as dict - :param post: POST as dict, list or string - :param ref: Set HTTP_REFERER header - :param cookies: use saved cookies - :param just_header: if True only the header will be retrieved and returned as dict - :param decode: Whether to decode the output according to http header, should be True in most cases - :return: Loaded content - """ - if not hasattr(self, "req"): raise Exception("Plugin type does not have Request attribute.") - self.checkAbort() - - res = self.req.load(url, get, post, ref, cookies, just_header, decode=decode) - - if self.core.debug: - from inspect import currentframe - - frame = currentframe() - if not exists(join("tmp", self.__name__)): - makedirs(join("tmp", self.__name__)) - - f = open( - join("tmp", self.__name__, "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno)) - , "wb") - del frame # delete the frame or it wont be cleaned - - try: - tmp = res.encode("utf8") - except: - tmp = res - - f.write(tmp) - f.close() - - if just_header: - #parse header - header = {"code": self.req.code} - for line in res.splitlines(): - line = line.strip() - if not line or ":" not in line: continue - - key, none, value = line.partition(":") - key = key.lower().strip() - value = value.strip() - - if key in header: - if type(header[key]) == list: - header[key].append(value) - else: - header[key] = [header[key], value] - else: - header[key] = value - res = header - - return res - - def invalidTask(self): - if self.task: - self.task.invalid() - - def invalidCaptcha(self): - self.logDebug("Deprecated method .invalidCaptcha, use .invalidTask") - self.invalidTask() - - def correctTask(self): - if self.task: - self.task.correct() - - def correctCaptcha(self): - self.logDebug("Deprecated method .correctCaptcha, use .correctTask") - self.correctTask() - - def decryptCaptcha(self, url, get={}, post={}, cookies=False, forceUser=False, imgtype='jpg', - result_type='textual'): - """ Loads a captcha and decrypts it with ocr, plugin, user input - - :param url: url of captcha image - :param get: get part for request - :param post: post part for request - :param cookies: True if cookies should be enabled - :param forceUser: if True, ocr is not used - :param imgtype: Type of the Image - :param result_type: 'textual' if text is written on the captcha\ - or 'positional' for captcha where the user have to click\ - on a specific region on the captcha - - :return: result of decrypting - """ - - img = self.load(url, get=get, post=post, cookies=cookies) - - id = ("%.2f" % time())[-6:].replace(".", "") - temp_file = open(join("tmp", "tmpCaptcha_%s_%s.%s" % (self.__name__, id, imgtype)), "wb") - temp_file.write(img) - temp_file.close() - - name = "%sOCR" % self.__name__ - has_plugin = name in self.core.pluginManager.getPlugins("internal") - - if self.core.captcha: - OCR = self.core.pluginManager.loadClass("internal", name) - else: - OCR = None - - if OCR and not forceUser: - sleep(randint(3000, 5000) / 1000.0) - self.checkAbort() - - ocr = OCR() - result = ocr.get_captcha(temp_file.name) - else: - task = self.im.createCaptchaTask(img, imgtype, temp_file.name, self.__name__, result_type) - self.task = task - - while task.isWaiting(): - if self.abort(): - self.im.removeTask(task) - raise Abort() - sleep(1) - - #TODO task handling - self.im.removeTask(task) - - if task.error and has_plugin: #ignore default error message since the user could use OCR - self.fail(_("Pil and tesseract not installed and no Client connected for captcha decrypting")) - elif task.error: - self.fail(task.error) - elif not task.result: - self.fail(_("No captcha result obtained in appropriate time.")) - - result = task.result - self.log.debug("Received captcha result: %s" % str(result)) - - if not self.core.debug: - try: - remove(temp_file.name) - except: - pass - - return result - - def fail(self, reason): - """ fail and give reason """ - raise Fail(reason) \ No newline at end of file diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py deleted file mode 100644 index c665888ad..000000000 --- a/module/plugins/Crypter.py +++ /dev/null @@ -1,271 +0,0 @@ -# -*- coding: utf-8 -*- - -from traceback import print_exc - -from module.utils import to_list, has_method, uniqify -from module.utils.fs import exists, remove, fs_encode -from module.utils.packagetools import parseNames - -from Base import Base, Retry - -class Package: - """ Container that indicates that a new package should be created """ - def __init__(self, name, urls=None, folder=None): - self.name = name - self.urls = urls if urls else [] - self.folder = folder - - # nested packages - self.packs = [] - - def addURL(self, url): - self.urls.append(url) - - def addPackage(self, pack): - self.packs.append(pack) - - def getAllURLs(self): - urls = self.urls - for p in self.packs: - urls.extend(p.getAllURLs()) - return urls - - # same name and urls is enough to be equal for packages - def __eq__(self, other): - return self.name == other.name and self.urls == other.urls - - def __repr__(self): - return u". - - @author: RaNaN, spoob, mkaay -""" - -import os -from time import time - -if os.name != "nt": - from module.utils.fs import chown - from pwd import getpwnam - from grp import getgrnam - -from Base import Base, Fail, Retry -from module.utils import chunks as _chunks -from module.utils.fs import save_join, save_filename, fs_encode, fs_decode,\ - remove, makedirs, chmod, stat, exists, join - -# Import for Hoster Plugins -chunks = _chunks - -class Reconnect(Exception): - """ raised when reconnected """ - -class SkipDownload(Exception): - """ raised when download should be skipped """ - -class Hoster(Base): - """ - Base plugin for hoster plugin. Overwrite getInfo for online status retrieval, process for downloading. - """ - - @staticmethod - def getInfo(urls): - """This method is used to retrieve the online status of files for hoster plugins. - It has to *yield* list of tuples with the result in this format (name, size, status, url), - where status is one of API pyfile statuses. - - :param urls: List of urls - :return: yield list of tuple with results (name, size, status, url) - """ - pass - - def __init__(self, pyfile): - Base.__init__(self, pyfile.m.core) - - self.wantReconnect = False - #: enables simultaneous processing of multiple downloads - self.limitDL = 0 - #: chunk limit - self.chunkLimit = 1 - #: enables resume (will be ignored if server dont accept chunks) - self.resumeDownload = False - - #: plugin is waiting - self.waiting = False - - self.ocr = None #captcha reader instance - #: account handler instance, see :py:class:`Account` - self.account = self.core.accountManager.getAccountForPlugin(self.__name__) - - #: premium status - self.premium = False - #: username/login - self.user = None - - if self.account and not self.account.isUsable(): self.account = None - if self.account: - self.user = self.account.loginname - #: Browser instance, see `network.Browser` - self.req = self.account.getAccountRequest() - # Default: -1, True, True - self.chunkLimit, self.limitDL, self.resumeDownload = self.account.getDownloadSettings() - self.premium = self.account.isPremium() - else: - self.req = self.core.requestFactory.getRequest(self.__name__) - - #: associated pyfile instance, see `PyFile` - self.pyfile = pyfile - self.thread = None # holds thread in future - - #: location where the last call to download was saved - self.lastDownload = "" - #: re match of the last call to `checkDownload` - self.lastCheck = None - #: js engine, see `JsEngine` - self.js = self.core.js - - self.retries = 0 # amount of retries already made - self.html = None # some plugins store html code here - - self.init() - - def getMultiDL(self): - return self.limitDL <= 0 - - def setMultiDL(self, val): - self.limitDL = 0 if val else 1 - - #: virtual attribute using self.limitDL on behind - multiDL = property(getMultiDL, setMultiDL) - - def getChunkCount(self): - if self.chunkLimit <= 0: - return self.config["download"]["chunks"] - return min(self.config["download"]["chunks"], self.chunkLimit) - - def getDownloadLimit(self): - if self.account: - limit = self.account.options.get("limitDL", 0) - if limit == "": limit = 0 - if self.limitDL > 0: # a limit is already set, we use the minimum - return min(int(limit), self.limitDL) - else: - return int(limit) - else: - return self.limitDL - - - def __call__(self): - return self.__name__ - - def init(self): - """initialize the plugin (in addition to `__init__`)""" - pass - - def setup(self): - """ setup for environment and other things, called before downloading (possibly more than one time)""" - pass - - def preprocessing(self, thread): - """ handles important things to do before starting """ - self.thread = thread - - if self.account: - # will force a re-login or reload of account info if necessary - self.account.getAccountInfo() - else: - self.req.clearCookies() - - self.setup() - - self.pyfile.setStatus("starting") - - return self.process(self.pyfile) - - def process(self, pyfile): - """the 'main' method of every plugin, you **have to** overwrite it""" - raise NotImplementedError - - def abort(self): - return self.pyfile.abort - - def resetAccount(self): - """ don't use account and retry download """ - self.account = None - self.req = self.core.requestFactory.getRequest(self.__name__) - self.retry() - - def checksum(self, local_file=None): - """ - return codes: - 0 - checksum ok - 1 - checksum wrong - 5 - can't get checksum - 10 - not implemented - 20 - unknown error - """ - #@TODO checksum check addon - - return True, 10 - - - def setWait(self, seconds, reconnect=False): - """Set a specific wait time later used with `wait` - - :param seconds: wait time in seconds - :param reconnect: True if a reconnect would avoid wait time - """ - if reconnect: - self.wantReconnect = True - self.pyfile.waitUntil = time() + int(seconds) - - def wait(self): - """ waits the time previously set """ - self.waiting = True - self.pyfile.setStatus("waiting") - - while self.pyfile.waitUntil > time(): - self.thread.m.reconnecting.wait(2) - - self.checkAbort() - if self.thread.m.reconnecting.isSet(): - self.waiting = False - self.wantReconnect = False - raise Reconnect - - self.waiting = False - self.pyfile.setStatus("starting") - - def offline(self): - """ fail and indicate file is offline """ - raise Fail("offline") - - def tempOffline(self): - """ fail and indicates file ist temporary offline, the core may take consequences """ - raise Fail("temp. offline") - - def retry(self, max_tries=3, wait_time=1, reason=""): - """Retries and begin again from the beginning - - :param max_tries: number of maximum retries - :param wait_time: time to wait in seconds - :param reason: reason for retrying, will be passed to fail if max_tries reached - """ - if 0 < max_tries <= self.retries: - if not reason: reason = "Max retries reached" - raise Fail(reason) - - self.wantReconnect = False - self.setWait(wait_time) - self.wait() - - self.retries += 1 - raise Retry(reason) - - - def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=False): - """Downloads the content at url to download folder - - :param url: - :param get: - :param post: - :param ref: - :param cookies: - :param disposition: if True and server provides content-disposition header\ - the filename will be changed if needed - :return: The location where the file was saved - """ - self.checkForSameFiles() - self.checkAbort() - - self.pyfile.setStatus("downloading") - - download_folder = self.config['general']['download_folder'] - - location = save_join(download_folder, self.pyfile.package().folder) - - if not exists(location): - makedirs(location, int(self.core.config["permission"]["folder"], 8)) - - if self.core.config["permission"]["change_dl"] and os.name != "nt": - try: - uid = getpwnam(self.config["permission"]["user"])[2] - gid = getgrnam(self.config["permission"]["group"])[2] - - chown(location, uid, gid) - except Exception, e: - self.log.warning(_("Setting User and Group failed: %s") % str(e)) - - # convert back to unicode - location = fs_decode(location) - name = save_filename(self.pyfile.name) - - filename = join(location, name) - - self.core.addonManager.dispatchEvent("download:start", self.pyfile, url, filename) - - try: - newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, cookies=cookies, - chunks=self.getChunkCount(), resume=self.resumeDownload, - disposition=disposition) - finally: - self.pyfile.size = self.req.size - - if disposition and newname and newname != name: #triple check, just to be sure - self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname}) - self.pyfile.name = newname - filename = join(location, newname) - - fs_filename = fs_encode(filename) - - if self.core.config["permission"]["change_file"]: - chmod(fs_filename, int(self.core.config["permission"]["file"], 8)) - - if self.core.config["permission"]["change_dl"] and os.name != "nt": - try: - uid = getpwnam(self.config["permission"]["user"])[2] - gid = getgrnam(self.config["permission"]["group"])[2] - - chown(fs_filename, uid, gid) - except Exception, e: - self.log.warning(_("Setting User and Group failed: %s") % str(e)) - - self.lastDownload = filename - return self.lastDownload - - def checkDownload(self, rules, api_size=0, max_size=50000, delete=True, read_size=0): - """ checks the content of the last downloaded file, re match is saved to `lastCheck` - - :param rules: dict with names and rules to match (compiled regexp or strings) - :param api_size: expected file size - :param max_size: if the file is larger then it wont be checked - :param delete: delete if matched - :param read_size: amount of bytes to read from files larger then max_size - :return: dictionary key of the first rule that matched - """ - lastDownload = fs_encode(self.lastDownload) - if not exists(lastDownload): return None - - size = stat(lastDownload) - size = size.st_size - - if api_size and api_size <= size: return None - elif size > max_size and not read_size: return None - self.log.debug("Download Check triggered") - f = open(lastDownload, "rb") - content = f.read(read_size if read_size else -1) - f.close() - #produces encoding errors, better log to other file in the future? - #self.log.debug("Content: %s" % content) - for name, rule in rules.iteritems(): - if type(rule) in (str, unicode): - if rule in content: - if delete: - remove(lastDownload) - return name - elif hasattr(rule, "search"): - m = rule.search(content) - if m: - if delete: - remove(lastDownload) - self.lastCheck = m - return name - - - def getPassword(self): - """ get the password the user provided in the package""" - password = self.pyfile.package().password - if not password: return "" - return password - - - def checkForSameFiles(self, starting=False): - """ checks if same file was/is downloaded within same package - - :param starting: indicates that the current download is going to start - :raises SkipDownload: - """ - - pack = self.pyfile.package() - - for pyfile in self.core.files.cachedFiles(): - if pyfile != self.pyfile and pyfile.name == self.pyfile.name and pyfile.package().folder == pack.folder: - if pyfile.status in (0, 12): #finished or downloading - raise SkipDownload(pyfile.pluginname) - elif pyfile.status in ( - 5, 7) and starting: #a download is waiting/starting and was apparently started before - raise SkipDownload(pyfile.pluginname) - - download_folder = self.config['general']['download_folder'] - location = save_join(download_folder, pack.folder, self.pyfile.name) - - if starting and self.core.config['download']['skip_existing'] and exists(location): - size = os.stat(location).st_size - if size >= self.pyfile.size: - raise SkipDownload("File exists.") - - pyfile = self.core.db.findDuplicates(self.pyfile.id, self.pyfile.package().folder, self.pyfile.name) - if pyfile: - if exists(location): - raise SkipDownload(pyfile[0]) - - self.log.debug("File %s not skipped, because it does not exists." % self.pyfile.name) - - def clean(self): - """ clean everything and remove references """ - if hasattr(self, "pyfile"): - del self.pyfile - if hasattr(self, "req"): - self.req.close() - del self.req - if hasattr(self, "thread"): - del self.thread - if hasattr(self, "html"): - del self.html diff --git a/module/plugins/MultiHoster.py b/module/plugins/MultiHoster.py deleted file mode 100644 index 1936478b4..000000000 --- a/module/plugins/MultiHoster.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time - -from module.utils import remove_chars - -from Account import Account - -def normalize(domain): - """ Normalize domain/plugin name, so they are comparable """ - return remove_chars(domain.strip().lower(), "-.") - -#noinspection PyUnresolvedReferences -class MultiHoster(Account): - """ - Base class for MultiHoster services. - This is also an Account instance so you should see :class:`Account` and overwrite necessary methods. - Multihoster becomes only active when an Account was entered and the MultiHoster addon was activated. - You need to overwrite `loadHosterList` and a corresponding :class:`Hoster` plugin with the same name should - be available to make your service working. - """ - - #: List of hoster names that will be replaced so pyLoad will recognize them: (orig_name, pyload_name) - replacements = [("freakshare.net", "freakshare.com")] - - #: Load new hoster list every x seconds - hoster_timeout = 300 - - def __init__(self, *args, **kwargs): - - # Hoster list - self.hoster = [] - # Timestamp - self.ts = 0 - - Account.__init__(self, *args, **kwargs) - - def loadHosterList(self, req): - """Load list of supported hoster - - :return: List of domain names - """ - raise NotImplementedError - - - def isHosterUsuable(self, domain): - """ Determine before downloading if hoster should be used. - - :param domain: domain name - :return: True to let the MultiHoster download, False to fallback to default plugin - """ - return True - - def getHosterList(self, force=False): - if self.ts + self.hoster_timeout < time() or force: - req = self.getAccountRequest() - try: - self.hoster = self.loadHosterList(req) - except Exception, e: - self.logError(e) - return [] - finally: - req.close() - - for rep in self.replacements: - if rep[0] in self.hoster: - self.hoster.remove(rep[0]) - if rep[1] not in self.hoster: - self.hoster.append(rep[1]) - - self.ts = time() - - return self.hoster \ No newline at end of file diff --git a/module/plugins/ReCaptcha.py b/module/plugins/ReCaptcha.py deleted file mode 100644 index e47522b4a..000000000 --- a/module/plugins/ReCaptcha.py +++ /dev/null @@ -1,22 +0,0 @@ -import re - -class ReCaptcha(): - def __init__(self, plugin): - self.plugin = plugin - self.plugin.logDebug("Deprecated usage of ReCaptcha: Use CaptchaService instead") - - def challenge(self, id): - js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={"k":id}, cookies=True) - - try: - challenge = re.search("challenge : '(.*?)',", js).group(1) - server = re.search("server : '(.*?)',", js).group(1) - except: - self.plugin.fail("recaptcha error") - result = self.result(server,challenge) - - return challenge, result - - def result(self, server, challenge): - return self.plugin.decryptCaptcha("%simage"%server, get={"c":challenge}, cookies=True, imgtype="jpg") - diff --git a/module/plugins/__init__.py b/module/plugins/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py deleted file mode 100644 index beaddeac9..000000000 --- a/module/plugins/accounts/AlldebridCom.py +++ /dev/null @@ -1,49 +0,0 @@ -from module.plugins.Account import Account -import xml.dom.minidom as dom -from BeautifulSoup import BeautifulSoup -from time import time -import re -import urllib - -class AlldebridCom(Account): - __name__ = "AlldebridCom" - __version__ = "0.21" - __type__ = "account" - __description__ = """AllDebrid.com account plugin""" - __author_name__ = ("Andy, Voigt") - __author_mail__ = ("spamsales@online.de") - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - page = req.load("http://www.alldebrid.com/account/") - soup=BeautifulSoup(page) - #Try to parse expiration date directly from the control panel page (better accuracy) - try: - time_text=soup.find('div',attrs={'class':'remaining_time_text'}).strong.string - self.log.debug("Account expires in: %s" % time_text) - p = re.compile('\d+') - exp_data=p.findall(time_text) - exp_time=time()+int(exp_data[0])*24*60*60+int(exp_data[1])*60*60+(int(exp_data[2])-1)*60 - #Get expiration date from API - except: - data = self.getAccountData(user) - page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user, data["password"])) - self.log.debug(page) - xml = dom.parseString(page) - exp_time=time()+int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue)*86400 - account_info = {"validuntil": exp_time, "trafficleft": -1} - return account_info - - def login(self, user, data, req): - - urlparams = urllib.urlencode({'action':'login','login_login':user,'login_password':data["password"]}) - page = req.load("http://www.alldebrid.com/register/?%s" % (urlparams)) - - if "This login doesn't exist" in page: - self.wrongPassword() - - if "The password is not valid" in page: - self.wrongPassword() - - if "Invalid captcha" in page: - self.wrongPassword() diff --git a/module/plugins/accounts/BayfilesCom.py b/module/plugins/accounts/BayfilesCom.py deleted file mode 100644 index 0d036488b..000000000 --- a/module/plugins/accounts/BayfilesCom.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -from module.plugins.Account import Account -from module.common.json_layer import json_loads -import re -from time import time, mktime, strptime - -class BayfilesCom(Account): - __name__ = "BayfilesCom" - __version__ = "0.02" - __type__ = "account" - __description__ = """bayfiles.com account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - def loadAccountInfo(self, user, req): - for i in range(2): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) - self.logDebug(response) - if not response["error"]: - break - self.logWarning(response["error"]) - self.relogin() - - return {"premium": bool(response['premium']), \ - "trafficleft": -1, \ - "validuntil": response['expires'] if response['expires'] >= int(time()) else -1} - - def login(self, user, data, req): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/login/%s/%s" % (user, data["password"]))) - self.logDebug(response) - if response["error"]: - self.logError(response["error"]) - self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py deleted file mode 100644 index a4f56e31c..000000000 --- a/module/plugins/accounts/BitshareCom.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: pking -""" - -from module.plugins.Account import Account - -class BitshareCom(Account): - __name__ = "BitshareCom" - __version__ = "0.11" - __type__ = "account" - __description__ = """Bitshare account plugin""" - __author_name__ = ("Paul King") - - def loadAccountInfo(self, user, req): - page = req.load("http://bitshare.com/mysettings.html") - - if "\"http://bitshare.com/myupgrade.html\">Free" in page: - return {"validuntil": -1, "trafficleft":-1, "premium": False} - - if not '' in page: - self.core.log.warning(_("Activate direct Download in your Bitshare Account")) - - return {"validuntil": -1, "trafficleft": -1, "premium": True} - - - def login(self, user, data, req): - page = req.load("http://bitshare.com/login.html", post={ "user" : user, "password" : data["password"], "submit" :"Login"}, cookies=True) - if "login" in req.lastEffectiveURL: - self.wrongPassword() diff --git a/module/plugins/accounts/BoltsharingCom.py b/module/plugins/accounts/BoltsharingCom.py deleted file mode 100644 index 678591d1d..000000000 --- a/module/plugins/accounts/BoltsharingCom.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -from module.plugins.internal.XFSPAccount import XFSPAccount - -class BoltsharingCom(XFSPAccount): - __name__ = "BoltsharingCom" - __version__ = "0.01" - __type__ = "account" - __description__ = """Boltsharing.com account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - MAIN_PAGE = "http://boltsharing.com/" diff --git a/module/plugins/accounts/CramitIn.py b/module/plugins/accounts/CramitIn.py deleted file mode 100644 index 182c9d647..000000000 --- a/module/plugins/accounts/CramitIn.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -from module.plugins.internal.XFSPAccount import XFSPAccount - -class CramitIn(XFSPAccount): - __name__ = "CramitIn" - __version__ = "0.01" - __type__ = "account" - __description__ = """cramit.in account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - MAIN_PAGE = "http://cramit.in/" \ No newline at end of file diff --git a/module/plugins/accounts/CyberlockerCh.py b/module/plugins/accounts/CyberlockerCh.py deleted file mode 100644 index 31e0c3e24..000000000 --- a/module/plugins/accounts/CyberlockerCh.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -from module.plugins.internal.XFSPAccount import XFSPAccount -from module.plugins.internal.SimpleHoster import parseHtmlForm - -class CyberlockerCh(XFSPAccount): - __name__ = "CyberlockerCh" - __version__ = "0.01" - __type__ = "account" - __description__ = """CyberlockerCh account plugin""" - __author_name__ = ("stickell") - __author_mail__ = ("l.stickell@yahoo.it") - - MAIN_PAGE = "http://cyberlocker.ch/" - - def login(self, user, data, req): - html = req.load(self.MAIN_PAGE + 'login.html', decode = True) - - action, inputs = parseHtmlForm('name="FL"', html) - if not inputs: - inputs = {"op": "login", - "redirect": self.MAIN_PAGE} - - inputs.update({"login": user, - "password": data['password']}) - - # Without this a 403 Forbidden is returned - req.http.lastURL = self.MAIN_PAGE + 'login.html' - html = req.load(self.MAIN_PAGE, post = inputs, decode = True) - - if 'Incorrect Login or Password' in html or '>Error<' in html: - self.wrongPassword() diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py deleted file mode 100644 index 7b1a8edc5..000000000 --- a/module/plugins/accounts/CzshareCom.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -from time import mktime, strptime -import re - -from module.plugins.Account import Account - - -class CzshareCom(Account): - __name__ = "CzshareCom" - __version__ = "0.13" - __type__ = "account" - __description__ = """czshare.com account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - CREDIT_LEFT_PATTERN = r'\s*([0-9 ,]+) (KiB|MiB|GiB)\s*([^<]*)\s*' - - def loadAccountInfo(self, user, req): - html = req.load("http://czshare.com/prehled_kreditu/") - - found = re.search(self.CREDIT_LEFT_PATTERN, html) - if not found: - return {"validuntil": 0, "trafficleft": 0} - else: - credits = float(found.group(1).replace(' ', '').replace(',', '.')) - credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[found.group(2)] - validuntil = mktime(strptime(found.group(3), '%d.%m.%y %H:%M')) - return {"validuntil": validuntil, "trafficleft": credits} - - def login(self, user, data, req): - - html = req.load('https://czshare.com/index.php', post={ - "Prihlasit": "Prihlasit", - "login-password": data["password"], - "login-name": user - }) - - if '
. # -############################################################################ - -import re -import _strptime -import time - -from module.plugins.Account import Account - - -class DebridItaliaCom(Account): - __name__ = "DebridItaliaCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """debriditalia.com account plugin""" - __author_name__ = ("stickell") - __author_mail__ = ("l.stickell@yahoo.it") - - WALID_UNTIL_PATTERN = r"Premium valid till: (?P[^|]+) \|" - - def loadAccountInfo(self, user, req): - if 'Account premium not activated' in self.html: - return {"premium": False, "validuntil": None, "trafficleft": None} - - m = re.search(self.WALID_UNTIL_PATTERN, self.html) - if m: - validuntil = int(time.mktime(time.strptime(m.group('D'), "%d/%m/%Y %H:%M"))) - return {"premium": True, "validuntil": validuntil, "trafficleft": -1} - else: - self.logError('Unable to retrieve account information - Plugin may be out of date') - - def login(self, user, data, req): - self.html = req.load("http://debriditalia.com/login.php", - get={"u": user, "p": data["password"]}) - if 'NO' in self.html: - self.wrongPassword() diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py deleted file mode 100644 index b0730de8e..000000000 --- a/module/plugins/accounts/DepositfilesCom.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: mkaay -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime - -class DepositfilesCom(Account): - __name__ = "DepositfilesCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """depositfiles.com account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def loadAccountInfo(self, user, req): - - src = req.load("http://depositfiles.com/de/gold/") - validuntil = re.search("noch den Gold-Zugriff: (.*?)
", src).group(1) - - validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S"))) - - tmp = {"validuntil":validuntil, "trafficleft":-1} - return tmp - - def login(self, user, data, req): - - req.load("http://depositfiles.com/de/gold/payment.php") - src = req.load("http://depositfiles.com/de/login.php", get={"return": "/de/gold/payment.php"}, post={"login": user, "password": data["password"]}) - if r'
Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.
' in src: - self.wrongPassword() diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py deleted file mode 100644 index ba7829b83..000000000 --- a/module/plugins/accounts/EasybytezCom.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -from module.plugins.Account import Account -from module.plugins.internal.SimpleHoster import parseHtmlForm -import re -from module.utils import parseFileSize -from time import mktime, strptime - -class EasybytezCom(Account): - __name__ = "EasybytezCom" - __version__ = "0.02" - __type__ = "account" - __description__ = """EasyBytez.com account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - VALID_UNTIL_PATTERN = r'Premium account expire:([^<]+)' - TRAFFIC_LEFT_PATTERN = r'Traffic available today:(?P[^<]+)' - - def loadAccountInfo(self, user, req): - html = req.load("http://www.easybytez.com/?op=my_account", decode = True) - - validuntil = trafficleft = None - premium = False - - found = re.search(self.VALID_UNTIL_PATTERN, html) - if found: - premium = True - trafficleft = -1 - try: - self.logDebug(found.group(1)) - validuntil = mktime(strptime(found.group(1), "%d %B %Y")) - except Exception, e: - self.logError(e) - else: - found = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if found: - trafficleft = found.group(1) - if "Unlimited" in trafficleft: - premium = True - else: - trafficleft = parseFileSize(trafficleft) / 1024 - - return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) - - def login(self, user, data, req): - html = req.load('http://www.easybytez.com/login.html', decode = True) - action, inputs = parseHtmlForm('name="FL"', html) - inputs.update({"login": user, - "password": data['password'], - "redirect": "http://www.easybytez.com/"}) - - html = req.load(action, post = inputs, decode = True) - - if 'Incorrect Login or Password' in html or '>Error<' in html: - self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/accounts/EgoFilesCom.py b/module/plugins/accounts/EgoFilesCom.py deleted file mode 100644 index da1ed03ad..000000000 --- a/module/plugins/accounts/EgoFilesCom.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.Account import Account -import re -import time -from module.utils import parseFileSize - -class EgoFilesCom(Account): - __name__ = "EgoFilesCom" - __version__ = "0.2" - __type__ = "account" - __description__ = """egofiles.com account plugin""" - __author_name__ = ("stickell") - __author_mail__ = ("l.stickell@yahoo.it") - - PREMIUM_ACCOUNT_PATTERN = '
\s*Premium: (?P

[^/]*) / Traffic left: (?P[\d.]*) (?P\w*)\s*\\n\s*
' - - def loadAccountInfo(self, user, req): - html = req.load("http://egofiles.com") - if 'You are logged as a Free User' in html: - return {"premium": False, "validuntil": None, "trafficleft": None} - - m = re.search(self.PREMIUM_ACCOUNT_PATTERN, html) - if m: - validuntil = int(time.mktime(time.strptime(m.group('P'), "%Y-%m-%d %H:%M:%S"))) - trafficleft = parseFileSize(m.group('T'), m.group('U')) / 1024 - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - else: - self.logError('Unable to retrieve account information - Plugin may be out of date') - - def login(self, user, data, req): - # Set English language - req.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True) - - html = req.load("http://egofiles.com/ajax/register.php", - post={"log": 1, - "loginV": user, - "passV": data["password"]}) - if 'Login successful' not in html: - self.wrongPassword() diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py deleted file mode 100644 index 42967d975..000000000 --- a/module/plugins/accounts/EuroshareEu.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -from module.plugins.Account import Account -from time import mktime, strptime -from string import replace -import re - -class EuroshareEu(Account): - __name__ = "EuroshareEu" - __version__ = "0.01" - __type__ = "account" - __description__ = """euroshare.eu account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - def loadAccountInfo(self, user, req): - self.relogin(user) - html = req.load("http://euroshare.eu/customer-zone/settings/") - - found = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) - if found is None: - premium, validuntil = False, -1 - else: - premium = True - validuntil = mktime(strptime(found.group(1), "%d.%m.%Y %H:%M")) - - return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} - - def login(self, user, data, req): - - html = req.load('http://euroshare.eu/customer-zone/login/', post={ - "trvale": "1", - "login": user, - "password": data["password"] - }, decode=True) - - if u">Nesprávne prihlasovacie meno alebo heslo" in html: - self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py deleted file mode 100644 index 69bbb0827..000000000 --- a/module/plugins/accounts/FastshareCz.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -import re -from module.plugins.Account import Account -from module.utils import parseFileSize - - -class FastshareCz(Account): - __name__ = "FastshareCz" - __version__ = "0.02" - __type__ = "account" - __description__ = """fastshare.cz account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - def loadAccountInfo(self, user, req): - html = req.load("http://www.fastshare.cz/user", decode=True) - - found = re.search(r'(?:Kredit|Credit)\s*: (.+?) ', html) - if found: - trafficleft = parseFileSize(found.group(1)) / 1024 - premium = True if trafficleft else False - else: - trafficleft = None - premium = False - - return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium} - - def login(self, user, data, req): - req.load('http://www.fastshare.cz/login') # Do not remove or it will not login - html = req.load('http://www.fastshare.cz/sql.php', post={ - "heslo": data['password'], - "login": user - }, decode=True) - - if u'>Špatné uživatelské jméno nebo heslo.<' in html: - self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/accounts/FilebeerInfo.py b/module/plugins/accounts/FilebeerInfo.py deleted file mode 100644 index 40ab70519..000000000 --- a/module/plugins/accounts/FilebeerInfo.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -import re -from time import mktime, strptime -from module.plugins.Account import Account -from module.utils import parseFileSize - -class FilebeerInfo(Account): - __name__ = "FilebeerInfo" - __version__ = "0.02" - __type__ = "account" - __description__ = """filebeer.info account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - - VALID_UNTIL_PATTERN = r'Reverts To Free Account:\s\s*\s*(.*?)\s*' - - def loadAccountInfo(self, user, req): - html = req.load("http://filebeer.info/upgrade.php", decode = True) - premium = not 'Free User ' in html - - validuntil = None - if premium: - try: - validuntil = mktime(strptime(re.search(self.VALID_UNTIL_PATTERN, html).group(1), "%d/%m/%Y %H:%M:%S")) - except Exception, e: - self.logError("Unable to parse account info", e) - - return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} - - def login(self, user, data, req): - html = req.load('http://filebeer.info/login.php', post = { - "submit": 'Login', - "loginPassword": data['password'], - "loginUsername": user, - "submitme": '1' - }, decode = True) - - if "