试用、下载、了解更多产品信息请点击"咨询在线客服"
C#: oMailer.BodyHtmlText = @" Test HTML message.
www.afterlogic.com"; |
VB.NET: oMailer.BodyHtmlText = " Test HTML message. " & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " & vbCrLf & _ " & vbCrLf & _ "www.afterlogic.com" |
C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html); |
VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html) |
C#: oMailer.Message.LoadBodyText(@"C:\Temp\saved_web_page.htm", MessageBodyType.Html); |
VB.NET: oMailer.Message.LoadBodyText("C:\Temp\saved_web_page.htm", MessageBodyType.Html) |
C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm ", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles| ImportBodyOptions.ImportRelatedFilesFromUris); |
VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm ", _ MessageBodyType.Html, _ Encoding.Default, ImportBodyOptions.ImportRelatedFiles Or _ ImportBodyOptions.ImportRelatedFilesFromUris) |
C#: using System; using System.Text; using MailBee; using MailBee.SmtpMail; using MailBee.Mime; namespace EmailApp { class Class1 { [STAThread] static void Main(string[] args) { Smtp oMailer = new Smtp(); oMailer.To.AddFromString("Bill Smith "); oMailer.From.AsString = "John Doe (Company Info)"; oMailer.Subject = "Test web page"; oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris); try { oMailer.Send(); Console.WriteLine("The message has been successfully sent."); } catch (MailBeeSmtpMessageSizeOutOfRangeException e) { Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes)."); } } } } |
VB.NET: Imports System Imports System.Text Imports MailBee Imports MailBee.SmtpMail Imports MailBee.Mime Namespace EmailApp Class Class1 _ Shared Sub Main(ByVal args() As String) Dim oMailer As Smtp = New Smtp() oMailer.To.AddFromString("Bill Smith ") oMailer.From.AsString = "John Doe (Company Info)" oMailer.Subject = "Test web page" oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris) Try oMailer.Send() Console.WriteLine("The message has been successfully sent.") Catch e As MailBeeSmtpMessageSizeOutOfRangeException Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes).") End Try End Sub End Class End Namespace |
C#
Console.WriteLine("Attachment name is " + msg.Attachments[0].Name);
VB.NET
Console.WriteLine("Attachment name is " + msg.Attachments(0).Name)
C#
Pop3 pop = new Pop3();
// Download entire message
MailMessage msg = pop.DownloadEntireMessage(1);
if (msg.HasAttachments)
{
// The message has at least one attachment
}
VB.NET
Dim pop As New Pop3()
' Download entire message
Dim msg As MailMessage = pop.DownloadEntireMessage(1)
if (msg.HasAttachments) Then
' The message has at least one attachment
End If
来自ERPScan公司的安全专家们发现了这个编号为CVE-2018-2636的漏洞。这个漏洞来自Oracle MICROS系统内的销售点(Point-of-Sale)终端,可能被利用来从硬件内无需验证地读取敏感资料。
ERPScan发布的漏洞分析内这样写道:“CVE2018-2636标记了一个Oracle MICROS系统内的文件夹遍历时暴露出的漏洞。如果公司内部有人得到了某个关键文件夹的路径,他就能从一台终端中偷取许多关键的资料,包括服务日志以及一些包含着用户名和密码的信息,甚至可以使用这些密码去连接数据库,获得更多关于服务器端之类的信息。”
“攻击者们能够获得数据库用户名以及哈希过后的密码,将密码暴力破解然后获得数据库内部商业资料的所有权限。而且还有许多不同的利用这个漏洞的攻击方式,导致整个MICROS系统处在危险之中。”
Oracle的MICROS系统在世界范围内拥有超过330000的现金注册用户,涵盖了许多食物卖场(200000+)以及酒店(30000)。
研究者还解释道,对一个本地攻击者来说要获取到MICROS销售点终端的URL路径是很简单的。
例如,他可以找到一个商场的电子秤或者其他使用RJ45点硬件,将其连接到Raspberry PI(树莓派),然后扫描整个内部网络。另一个选项是可以通过这些暴露在因特网上的设备来定位。截止本稿完成之时,共有139个MICROS销售点系统暴露在因特网上,其中大多数位于美国及加拿大。
这并不是MICROS首次遭到质疑,2016年时就曾经有黑客通过客户售后支持中心入侵MICROS系统。
分析报告最后总结道:“如果你想保护你的系统免受网络攻击的危害,你必须持续地保持更新,安装所有安全补丁。在这个案例中,特指Oracle在2018年1月的更新。”
static void SimpleOCRCalculator(string filePath) { RasterCodecs codecs = new RasterCodecs(); RasterImage image = codecs.Load(filePath); string[] calculations; using (IOcrEngine engine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false)) { engine.Startup(null, null, null, null); IOcrPage page = engine.CreatePage(image, OcrImageSharingMode.None); page.AutoZone(null); page.Recognize(null); calculations = new string[page.Zones.Count]; for (int i = 0; i < page.Zones.Count; i++) { calculations[i] = page.GetText(i); } engine.Shutdown(); } Dictionary<string, Action<double, double>> operands = new Dictionary<string, Action<double, double>>(); operands.Add("+", new Action<double, double>(delegate(double a, double b) { double ans = a + b; Console.WriteLine("{0} + {1} = {2}", a, b, ans); })); operands.Add("-", new Action<double, double>(delegate(double a, double b) { double ans = a - b; Console.WriteLine("{0} - {1} = {2}", a, b, ans); })); operands.Add("x", new Action<double, double>(delegate(double a, double b) { double ans = a * b; Console.WriteLine("{0} * {1} = {2}", a, b, ans); })); operands.Add("/", new Action<double, double>(delegate(double a, double b) { double ans = a / b; Console.WriteLine("{0} / {1} = {2}", a, b, ans); })); for (int i = 0; i < calculations.Length; i++) { string equation = Regex.Replace(calculations[i], @"\n|\r| ", ""); string[] ops = new string[] { "+", "-", "x", "/" }; for (int j = 0; j < ops.Length; j++) { int index = equation.IndexOf(ops[j]); if (index > 0 && index < equation.Length) { string op1 = equation.Substring(0, index); string op2 = equation.Substring(index + 1); double arg1 = double.Parse(op1); double arg2 = double.Parse(op2); operands[ops[j]](arg1, arg2); break; } } } codecs.Dispose(); image.Dispose(); }
C# msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain; VB.NET msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain
C# textBox1.Text += msg.BodyPlainText; VB.NET textBox1.Text += msg.BodyPlainText