Skip to content

Commit 1b9c8c5

Browse files
committed
removing personal info
0 parents  commit 1b9c8c5

File tree

87 files changed

+2913
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2913
-0
lines changed

.gitignore

+563
Large diffs are not rendered by default.

ASM/DOS/MASM/HelloWorld.asm

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.model small
2+
.stach 100h
3+
4+
.data
5+
msg db 'Hello world!$'
6+
7+
.code
8+
start:
9+
mov ah, 09h ; Display the message
10+
lea dx, msg
11+
int 21h
12+
mov ax, 4C00h ; Terminate the executable
13+
int 21h
14+
end start
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
section .text
2+
org 0x100
3+
mov ah, 0x9
4+
mox dx, hello
5+
int 0x21
6+
7+
mox ax, 0x4c00
8+
int 0x21
9+
10+
section .data
11+
hello: db 'Hello World!', 13, 10, '$'
12+
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.386
2+
.model small,c
3+
.stack 1000h
4+
5+
.data
6+
msg db "Hello World!",0
7+
8+
.code
9+
includelib libcmt.lib
10+
includelib libvcruntime.lib
11+
includelib libucrt.lib
12+
includelib legacy_stdio_definitions.lib
13+
14+
extrn printf:near
15+
extrn exit:near
16+
17+
public main
18+
main proc
19+
push offset msg
20+
call printf
21+
push 0
22+
call exit
23+
main endp
24+
25+
end

ASM/Win/MASM/HelloWorld/makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
all: HelloWorld
2+
3+
HelloWorld: HelloWorld.asm
4+
ML HelloWorld.asm
5+
6+
clean:
7+
rm -f HelloWorld.obj
8+
rm -f HelloWorld.exe
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
; Image base = 0x00400000
2+
%define RVA(x) (x-0x00400000)
3+
section .text
4+
push dword hello
5+
call dword [printf]
6+
push byte +0
7+
call dword [exit]
8+
ret
9+
10+
section .data
11+
hello db "Hello world!"
12+
13+
section .idata
14+
dd RVA(msvcrt_LookupTable)
15+
dd -1
16+
dd 0
17+
dd RVA(msvcrt_string)
18+
dd RVA(msvcrt_imports)
19+
times 5 dd 0 ; ends the descriptor table
20+
21+
msvcrt_string dd "msvcrt.dll", 0
22+
msvcrt_LookupTable:
23+
dd RVA(msvcrt_printf)
24+
dd RVA(msvcrt_exit)
25+
dd 0
26+
27+
msvcrt_imports:
28+
printf dd RVA(msvcrt_printf)
29+
exit dd RVA(msvcrt_exit)
30+
dd 0
31+
32+
msvcrt_printf:
33+
dw 1
34+
dw "printf", 0
35+
msvcrt_exit:
36+
dw 2
37+
dw "exit", 0
38+
dd 0
776 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
global _main
2+
extern _MessageBoxA@16
3+
extern _ExitProcess@4
4+
5+
section code use32 class=code
6+
_main:
7+
push dword 0 ; UINT uType = MB_OK
8+
push dword title ; LPCSTR lpCaption
9+
push dword banner ; LPCSTR lpText
10+
push dword 0 ; HWND hWnd = NULL
11+
call _MessageBoxA@16
12+
13+
push dword 0 ; UINT uExitCode
14+
call _ExitProcess@4
15+
16+
section data use32 class=data
17+
banner: db 'Hello, world!', 0
18+
title: db 'Hello', 0
455 Bytes
Binary file not shown.

C#/Email/Email.csproj

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net5.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="MailKit" Version="2.9.0" />
10+
<PackageReference Include="MimeKit" Version="2.9.2" />
11+
</ItemGroup>
12+
13+
</Project>

C#/Email/Email.sln

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30420.98
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Email", "Email.csproj", "{E6FB99DE-84B9-499D-84AF-1210E93E1CB2}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{E6FB99DE-84B9-499D-84AF-1210E93E1CB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E6FB99DE-84B9-499D-84AF-1210E93E1CB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E6FB99DE-84B9-499D-84AF-1210E93E1CB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E6FB99DE-84B9-499D-84AF-1210E93E1CB2}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {CEEEC979-A9B9-4DA3-9B92-F9F1547E3F45}
24+
EndGlobalSection
25+
EndGlobal

C#/Email/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (C) 2013-2020 .NET Foundation and Contributors
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
13+
all 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
21+
THE SOFTWARE.

C#/Email/Program.cs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
using System;
2+
using System.IO;
3+
4+
using MailKit.Net.Smtp;
5+
using MimeKit;
6+
7+
namespace Email
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
try
14+
{
15+
// Initialize To, From and Subject
16+
var message = new MimeMessage();
17+
message.From.Add(new MailboxAddress("Example", "[email protected]"));
18+
message.To.Add(new MailboxAddress("Example", "[email protected]"));
19+
message.Subject = "Example";
20+
var path = args[0];
21+
22+
// Create the message text
23+
var body = new TextPart("plain")
24+
{
25+
Text = @"Test"
26+
};
27+
28+
var attachment = new MimePart("document", "pdf")
29+
{
30+
Content = new MimeContent(File.OpenRead(path), ContentEncoding.Default),
31+
ContentDisposition = new ContentDisposition(ContentDisposition.Attachment),
32+
ContentTransferEncoding = ContentEncoding.Base64,
33+
FileName = Path.GetFileName(path)
34+
};
35+
36+
// now create the multipart/mixed container to hold the message text and the
37+
// image attachment
38+
Multipart multipart = new("mixed")
39+
{
40+
body,
41+
attachment
42+
};
43+
44+
// now set the multipart/mixed as the message body
45+
message.Body = multipart;
46+
47+
using SmtpClient client = new();
48+
client.Connect("smtp.example.com", 587, false);
49+
50+
// Note: only needed if the SMTP server requires authentication
51+
client.Authenticate("[email protected]", "Insert Password Here");
52+
53+
client.Send(message);
54+
client.Disconnect(true);
55+
}
56+
catch
57+
{
58+
Console.Write("No file path was detected.\n" + "Please enter a file path after the application.\n" + "Press any key to exit.\n");
59+
}
60+
}
61+
}
62+
}
63+

C#/Email/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Email
2+
3+
This is a SMTP application that sends an attachment out using [MailKit](https://github.com/jstedfast/MailKit) and [MineKit](https://github.com/jstedfast/MimeKit). This is a standalone application to send out emails if your printer application does not send a email out.
4+
5+
## Building
6+
7+
Use Visual Studio 2019 to build the project in Windows. Use ``` dotnet build ``` to build in Linux. You need Dotnet 5 SDK to build.
8+
9+
## Usage
10+
11+
```
12+
Email.exe File_Path_Here
13+
```
14+
15+
Make sure you edit the info inside the Project.cs file so the contacts are correct.
16+
17+
# Contributing
18+
Read the Contributing section in README.md at the root of the repository.
19+
20+
# License
21+
See LICENSE at the root of the repository. Additional licenses is in the project LICENSE.
Binary file not shown.

0 commit comments

Comments
 (0)