куча херни

This commit is contained in:
Andron666
2021-10-19 23:28:51 +05:00
parent 4a0fbc3452
commit d10728e6bf
90 changed files with 367 additions and 119 deletions
+2 -2
View File
@@ -27,10 +27,10 @@ PakFileCompressionFormats=
PakFileAdditionalCompressionOptions=
HttpChunkInstallDataVersion=
IncludePrerequisites=True
IncludeAppLocalPrerequisites=False
IncludeAppLocalPrerequisites=True
bShareMaterialShaderCode=True
bSharedMaterialNativeLibraries=True
ApplocalPrerequisitesDirectory=(Path="")
ApplocalPrerequisitesDirectory=(Path="$(ProjectDir)/prereq")
IncludeCrashReporter=False
InternationalizationPreset=English
-CulturesToStage=en
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+96
View File
@@ -0,0 +1,96 @@
import smtplib # Импортируем библиотеку по работе с SMTP
import os # Функции для работы с операционной системой, не зависящие от используемой операционной системы
# Добавляем необходимые подклассы - MIME-типы
import mimetypes # Импорт класса для обработки неизвестных MIME-типов, базирующихся на расширении файла
from email import encoders # Импортируем энкодер
from email.mime.base import MIMEBase # Общий тип
from email.mime.text import MIMEText # Текст/HTML
from email.mime.image import MIMEImage # Изображения
from email.mime.audio import MIMEAudio # Аудио
from email.mime.multipart import MIMEMultipart # Многокомпонентный объект
import sys # для чтения аргументов
#импорт аргументов
if len(sys.argv)==3:
addr_to = sys.argv[1]
filefold = sys.argv[2]
print(addr_to)
print(filefold)
else:
sys.exit()
def send_email(addr_to, msg_subj, msg_text, files):
addr_from = "sales@atlasgroup.su" # Отправитель
#addr_from = sys.argv[1]
password = "iTower163a" # Пароль
msg = MIMEMultipart() # Создаем сообщение
msg['From'] = addr_from # Адресат
msg['To'] = addr_to # Получатель
msg['Subject'] = msg_subj # Тема сообщения
body = msg_text # Текст сообщения
msg.attach(MIMEText(body, 'plain')) # Добавляем в сообщение текст
process_attachement(msg, files)
#======== Этот блок настраивается для каждого почтового провайдера отдельно ===============================================
server = smtplib.SMTP_SSL('mail.atlasgroup.su',465) # Создаем объект SMTP
#server.ehlo(addr_from)
server.set_debuglevel(1)
#server.starttls() # Начинаем шифрованный обмен по TLS
server.login(addr_from, password) # Получаем доступ
# server.auth_plain()
server.send_message(msg) # Отправляем сообщение
server.quit() # Выходим
#==========================================================================================================================
def process_attachement(msg, files): # Функция по обработке списка, добавляемых к сообщению файлов
for f in files:
if os.path.isfile(f): # Если файл существует
attach_file(msg,f) # Добавляем файл к сообщению
elif os.path.exists(f): # Если путь не файл и существует, значит - папка
dir = os.listdir(f) # Получаем список файлов в папке
for file in dir: # Перебираем все файлы и...
print(f+"/"+file)
attach_file(msg,f+"/"+file) # ...добавляем каждый файл к сообщению
def attach_file(msg, filepath): # Функция по добавлению конкретного файла к сообщению
filename = os.path.basename(filepath) # Получаем только имя файла
ctype, encoding = mimetypes.guess_type(filepath) # Определяем тип файла на основе его расширения
if ctype is None or encoding is not None: # Если тип файла не определяется
ctype = 'application/octet-stream' # Будем использовать общий тип
maintype, subtype = ctype.split('/', 1) # Получаем тип и подтип
if maintype == 'text': # Если текстовый файл
with open(filepath) as fp: # Открываем файл для чтения
file = MIMEText(fp.read(), _subtype=subtype) # Используем тип MIMEText
fp.close() # После использования файл обязательно нужно закрыть
elif maintype == 'image': # Если изображение
with open(filepath, 'rb') as fp:
file = MIMEImage(fp.read(), _subtype=subtype)
fp.close()
elif maintype == 'audio': # Если аудио
with open(filepath, 'rb') as fp:
file = MIMEAudio(fp.read(), _subtype=subtype)
fp.close()
else: # Неизвестный тип файла
with open(filepath, 'rb') as fp:
file = MIMEBase(maintype, subtype) # Используем общий MIME-тип
file.set_payload(fp.read()) # Добавляем содержимое общего типа (полезную нагрузку)
fp.close()
encoders.encode_base64(file) # Содержимое должно кодироваться как Base64
file.add_header('Content-Disposition', 'attachment', filename=filename) # Добавляем заголовки
msg.attach(file) # Присоединяем файл к сообщению
# Использование функции send_email()
addr_to = "andronchik92@gmail.com" # Получатель
files = []
files = [filefold] # Список файлов, если вложений нет, то files=[]
# Если нужно отправить все файлы из заданной папки, нужно указать её
print("here i send mail")
send_email(addr_to, "Жилая экосистема 4YOU", "Благодарим за проявленный интерес к нашему объекту ЖК 4YOU. Мы подобрали для Вас наиболее удобные и выгодные варианты квартир в нашем комплексе. Они будут во вложении ниже.", files)
+22
View File
@@ -0,0 +1,22 @@
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Util {
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
}
"@
$wshell = New-Object -ComObject wscript.shell;
foreach($i in $args){
$app = Start-Process -FilePath $i -passThru -Verb Print
start-sleep -m 200
$wshell.AppActivate($app.Id)
#start-sleep -m 200
$wshell.SendKeys('{ENTER}')
#Wait-Process -InputObject $app
#start-sleep -m 200
}
sleep 10
exit
+5
View File
@@ -286,6 +286,11 @@
"Name": "VaRest",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/e47be161e7a24e928560290abd5dcc4f"
},
{
"Name": "CompactEmailService",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/03a3cb2d7be4479085c8529fb2613887"
}
]
}
@@ -2,7 +2,7 @@
"BuildId": "13144385",
"Modules":
{
"HoudiniEngineEditor": "UE4Editor-HoudiniEngineEditor.dll",
"HoudiniEngineRuntime": "UE4Editor-HoudiniEngineRuntime.dll"
"HoudiniEngineEditor": "UE4Editor-HoudiniEngineEditor-0016.dll",
"HoudiniEngineRuntime": "UE4Editor-HoudiniEngineRuntime-0016.dll"
}
}
@@ -132,6 +132,38 @@ void AOnejsky4UGameModeBase::GetExcelData(FString Command)
book->release();*/
}
void AOnejsky4UGameModeBase::createProc(FString FullPathOfProgramToRun, TArray<FString> CommandlineArgs, bool Detach, bool Hidden, int32 Priority, FString OptionalWorkingDirectory)
{ //Please note ProcessId should really be uint32 but that is not supported by BP yet
FString Args = "";
if (CommandlineArgs.Num() > 1)
{
Args = CommandlineArgs[0];
for (int32 v = 1; v < CommandlineArgs.Num(); v++)
{
Args += " " + CommandlineArgs[v];
}
}
else if (CommandlineArgs.Num() > 0)
{
Args = CommandlineArgs[0];
}
UE_LOG(LogTemp, Warning, TEXT("%s"), *Args)
//uint32 NeedBPUINT32 = 0;
FPlatformProcess::CreateProc(
*FullPathOfProgramToRun,
*Args,
Detach,//* @param bLaunchDetached if true, the new process will have its own window
false,//* @param bLaunchHidded if true, the new process will be minimized in the task bar
Hidden,//* @param bLaunchReallyHidden if true, the new process will not have a window or be in the task bar
0,
Priority,
(OptionalWorkingDirectory != "") ? *OptionalWorkingDirectory : nullptr,//const TCHAR* OptionalWorkingDirectory,
nullptr
);
}
bool AOnejsky4UGameModeBase::logFileExists(FString FileName)
{
//FString FilePath = FPlatformProcess::UserDir() + FileName;;
@@ -144,3 +176,4 @@ FString AOnejsky4UGameModeBase::readFile(FString FileName) {
FFileHelper::LoadFileToString(str,*FileName);
return str;
}
+4 -1
View File
@@ -32,7 +32,10 @@ class ONEJSKY4U_API AOnejsky4UGameModeBase : public AGameModeBase
UFUNCTION(BlueprintCallable, Category = "System")
static void GetExcelData(FString Command);
UFUNCTION(BlueprintCallable, Category = "System")
static void createProc(FString FullPathOfProgramToRun, TArray<FString> CommandlineArgs, bool Detach, bool Hidden, int32 Priority, FString OptionalWorkingDirectory);
UFUNCTION(BlueprintCallable, Category = "File")
static bool logFileExists(FString FileName);
+186
View File
@@ -0,0 +1,186 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "mailer.h"
/*
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <iostream>
#include <windows.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32.lib")
using namespace std;
// Insist on at least Winsock v1.1
const VERSION_MAJOR = 1;
const VERSION_MINOR = 1;
#define CRLF "\r\n" // carriage-return/line feed pair
void ShowUsage()
{
//cout << "Usage: SENDMAIL mailserv to_addr from_addr messagefile" << endl
// << "Example: SENDMAIL smtp.myisp.com rcvr@elsewhere.com my_id@mydomain.com message.txt" << endl;
return;
}
// Basic error checking for send() and recv() functions
void Check(int iStatus, char *szFunction)
{
if ((iStatus != SOCKET_ERROR) && (iStatus))
return;
//cerr << "Error during call to " << szFunction << ": " << iStatus << " - " << GetLastError() << endl;
UE_LOG(LogTemp, Error, TEXT("Error during call to %s %d %s"), *FString(szFunction),iStatus, GetLastError());
return;
}
mailer::mailer(int argc, char argv[]) {
sendMail(argc, argv);
}
int mailer::sendMail(int argc, char argv[])
{
int iProtocolPort = 0;
char szSmtpServerName[64] = "";
char szToAddr[64] = "";
char szFromAddr[64] = "";
char szBuffer[4096] = "";
char szLine[255] = "";
char szMsgLine[255] = "";
SOCKET hServer;
WSADATA WSData;
LPHOSTENT lpHostEntry;
LPSERVENT lpServEntry;
SOCKADDR_IN SockAddr;
// Check for four command-line args
if (argc != 5)
ShowUsage();
// Load command-line args
lstrcpy(szSmtpServerName, argv[1]);
lstrcpy(szToAddr, argv[2]);
lstrcpy(szFromAddr, argv[3]);
// Create input stream for reading email message file
ifstream MsgFile(argv[4]);
// Attempt to intialize WinSock (1.1 or later)
if (WSAStartup(MAKEWORD(VERSION_MAJOR, VERSION_MINOR), &WSData))
{
//cout << "Cannot find Winsock v" << VERSION_MAJOR << "." << VERSION_MINOR << " or later!" << endl;
UE_LOG(LogTemp, Error, TEXT("Cannot find Winsock"));
return 1;
}
// Lookup email server's IP address.
lpHostEntry = gethostbyname(szSmtpServerName);
if (!lpHostEntry)
{
//cout << "Cannot find SMTP mail server " << szSmtpServerName << endl;
UE_LOG(LogTemp, Error, TEXT("Cannot find SMTP mail server %s"),FString(szSmtpServerName));
return 1;
}
// Create a TCP/IP socket, no specific protocol
hServer = socket(PF_INET, SOCK_STREAM, 0);
if (hServer == INVALID_SOCKET)
{
//cout << "Cannot open mail server socket" << endl;
UE_LOG(LogTemp, Error, TEXT("Cannot open mail server socket"));
return 1;
}
// Get the mail service port
lpServEntry = getservbyname("mail", 0);
// Use the SMTP default port if no other port is specified
if (!lpServEntry)
iProtocolPort = htons(IPPORT_SMTP);
else
iProtocolPort = lpServEntry->s_port;
// Setup a Socket Address structure
SockAddr.sin_family = AF_INET;
SockAddr.sin_port = iProtocolPort;
SockAddr.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list);
// Connect the Socket
if (connect(hServer, (PSOCKADDR)&SockAddr, sizeof(SockAddr)))
{
//cout << "Error connecting to Server socket" << endl;
UE_LOG(LogTemp, Error, TEXT("Error connecting to Server socket"));
return 1;
}
// Receive initial response from SMTP server
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() Reply");
// Send HELO server.com
sprintf(szMsgLine, "HELO %s%s", szSmtpServerName, CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() HELO");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() HELO");
// Send MAIL FROM: <sender@mydomain.com>
sprintf(szMsgLine, "MAIL FROM:<%s>%s", szFromAddr, CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() MAIL FROM");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() MAIL FROM");
// Send RCPT TO: <receiver@domain.com>
sprintf(szMsgLine, "RCPT TO:<%s>%s", szToAddr, CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() RCPT TO");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() RCPT TO");
// Send DATA
sprintf(szMsgLine, "DATA%s", CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() DATA");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() DATA");
// Send all lines of message body (using supplied text file)
MsgFile.getline(szLine, sizeof(szLine)); // Get first line
do // for each line of message text...
{
sprintf(szMsgLine, "%s%s", szLine, CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() message-line");
MsgFile.getline(szLine, sizeof(szLine)); // get next line.
} while (MsgFile.good());
// Send blank line and a period
sprintf(szMsgLine, "%s.%s", CRLF, CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() end-message");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() end-message");
// Send QUIT
sprintf(szMsgLine, "QUIT%s", CRLF);
Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() QUIT");
Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() QUIT");
// Report message has been sent
//cout << "Sent " << argv[4] << " as email message to " << szToAddr << endl;
UE_LOG(LogTemp, Warning, TEXT("Sent %s as email message to %s"), *FString(argv[4]), *FString(szToAddr));
// Close server socket and prepare to exit.
closesocket(hServer);
WSACleanup();
return 0;
}
*/
mailer::mailer(int argc, char argv[]) {
}
mailer::~mailer()
{
}
+17
View File
@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
class ONEJSKY4U_API mailer
{
public:
mailer(int argc, char argv[]);
~mailer();
protected:
//int sendMail(int argc, char argv[]);
};
Binary file not shown.
-13
View File
@@ -1,13 +0,0 @@
[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
AppliedTargetedHardwareClass=Desktop
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum
[/Script/Engine.Engine]
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/MyProject")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/MyProject")
+ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="MyProjectGameModeBase")
-3
View File
@@ -1,3 +0,0 @@
[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=E96A3C56407960CEDD4B62B4D78B5DF6
-13
View File
@@ -1,13 +0,0 @@
{
"FileVersion": 3,
"EngineAssociation": "4.25",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "MyProject",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}
-14
View File
@@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectTarget : TargetRules
{
public MyProjectTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "MyProject" } );
}
}
@@ -1,23 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class MyProject : ModuleRules
{
public MyProject(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}
@@ -1,6 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "MyProject.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, MyProject, "MyProject" );
@@ -1,6 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
@@ -1,5 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "MyProjectGameModeBase.h"
@@ -1,17 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "MyProjectGameModeBase.generated.h"
/**
*
*/
UCLASS()
class MYPROJECT_API AMyProjectGameModeBase : public AGameModeBase
{
GENERATED_BODY()
};
@@ -1,14 +0,0 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectEditorTarget : TargetRules
{
public MyProjectEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "MyProject" } );
}
}