From c1f90e1ce22de0af52559b29950692dc3cd64f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20M=C3=B6llers?= Date: Tue, 9 Jun 2015 01:04:18 +0200 Subject: New Crypter plugin: sh.st sh.st is a URL shortener service with ads (much like adf.ly and others). The crypter uses deadlockers.com to bypass the ads/waiting times. It keeps the package name and folder and just inserts the target URL. --- module/plugins/crypter/ShSt.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 module/plugins/crypter/ShSt.py (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py new file mode 100644 index 000000000..c50a437db --- /dev/null +++ b/module/plugins/crypter/ShSt.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.Crypter import Crypter + +import re + + +class ShSt(Crypter): + __name__ = "ShSt" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'http://sh\.st/\w+' + + __description__ = """Sh.St decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Frederik Möllers", "fred-public@posteo.de")] + + + NAME_PATTERN = r'(?P<N>.+?) - .+' + + + def decrypt(self, pyfile): + package = pyfile.package() + package_name = package.name + package_folder = package.folder + html = self.load("http://deadlockers.com/submit.php", post = { "deadlock" : self.pyfile.url }, decode = True) + self.packages.append((package_name, [html], package_folder)) -- cgit v1.2.3 From 74070e8194cd84e16fb33afbed23758469d211c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20M=C3=B6llers?= Date: Tue, 23 Jun 2015 00:33:49 +0200 Subject: Update ShSt crypter plugin The plugin doesn't rely on a third party website anymore for the actual decrypting. Instead it uses a different user agent which makes sh.st serve an HTTP redirect. This speeds up the decrypting process and fixes errors related to the third party web site (in particular the latest outage and API change). Also, self.urls is now used instead of self.packages for the decrypted URL. --- module/plugins/crypter/ShSt.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index c50a437db..f8733ac2b 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -1,14 +1,15 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.SimpleCrypter import SimpleCrypter +import pycurl import re -class ShSt(Crypter): +class ShSt(SimpleCrypter): __name__ = "ShSt" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://sh\.st/\w+' @@ -21,8 +22,9 @@ class ShSt(Crypter): def decrypt(self, pyfile): - package = pyfile.package() - package_name = package.name - package_folder = package.folder - html = self.load("http://deadlockers.com/submit.php", post = { "deadlock" : self.pyfile.url }, decode = True) - self.packages.append((package_name, [html], package_folder)) + # if we use curl as a user agent, we will get a straight redirect (no waiting!) + self.req.http.c.setopt(pycurl.USERAGENT, "curl/7.42.1") + # fetch the target URL + header = self.load(self.pyfile.url, just_header = True, decode = False) + target_url = header["location"] + self.urls.append(target_url) -- cgit v1.2.3 From a6a4855f8dbca9a93607ed398e943c80bb678ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20M=C3=B6llers?= Date: Tue, 23 Jun 2015 00:39:30 +0200 Subject: Update ShSt crypter plugin Revert to using the "regular" Crypter abstract class instead of SimpleCrypter. Before the last commit, Crypter was used and the last commit didn't actually make use of any SimpleCrypter functionality. So in order to be consistent, Crypter is now used again. --- module/plugins/crypter/ShSt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index f8733ac2b..4dc5b1e2d 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleCrypter import SimpleCrypter +from module.plugins.internal.Crypter import Crypter import pycurl import re -class ShSt(SimpleCrypter): +class ShSt(Crypter): __name__ = "ShSt" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://sh\.st/\w+' -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/crypter/ShSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index 4dc5b1e2d..a65522aea 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -9,7 +9,7 @@ import re class ShSt(Crypter): __name__ = "ShSt" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://sh\.st/\w+' -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/crypter/ShSt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index a65522aea..05a5518d3 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -22,9 +22,9 @@ class ShSt(Crypter): def decrypt(self, pyfile): - # if we use curl as a user agent, we will get a straight redirect (no waiting!) + #: If we use curl as a user agent, we will get a straight redirect (no waiting!) self.req.http.c.setopt(pycurl.USERAGENT, "curl/7.42.1") - # fetch the target URL + #: Fetch the target URL header = self.load(self.pyfile.url, just_header = True, decode = False) target_url = header["location"] self.urls.append(target_url) -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/crypter/ShSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index 05a5518d3..2c6681adf 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -26,5 +26,5 @@ class ShSt(Crypter): self.req.http.c.setopt(pycurl.USERAGENT, "curl/7.42.1") #: Fetch the target URL header = self.load(self.pyfile.url, just_header = True, decode = False) - target_url = header["location"] + target_url = header['location'] self.urls.append(target_url) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/crypter/ShSt.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index 2c6681adf..ad14df02d 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -10,6 +10,7 @@ class ShSt(Crypter): __name__ = "ShSt" __type__ = "crypter" __version__ = "0.04" + __status__ = "stable" __pattern__ = r'http://sh\.st/\w+' -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/crypter/ShSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShSt.py') diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index ad14df02d..754bc542c 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -10,7 +10,7 @@ class ShSt(Crypter): __name__ = "ShSt" __type__ = "crypter" __version__ = "0.04" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://sh\.st/\w+' -- cgit v1.2.3