Aymen 385 Posted April 20, 2014 Report Share Posted April 20, 2014 http://ubot-plugins.com/wp-content/uploads/2014/04/headline7.jpg Video Tutorial + Demonstration Source Codes In The Package -TextBox Dialog -TextArea Dialog -Gzip Compress/Gzip Decompress -Webclient Download file -Get domain Ips -Get Local Machine Names -Get Local Machine Ips -SmtpClient example (sending an email) ...More Source Codes will be added soon. Get This for $77 $57 http://ubot-plugins.com/wp-content/themes/OptimizePress/images/addtocart-style2-nopp.png Quote Link to post Share on other sites
kev123 132 Posted April 20, 2014 Report Share Posted April 20, 2014 nice i'm in Quote Link to post Share on other sites
Steve 30 Posted April 20, 2014 Report Share Posted April 20, 2014 nice!!! Now I just need to learn C#... Quote Link to post Share on other sites
kev123 132 Posted April 20, 2014 Report Share Posted April 20, 2014 going to hold of playing as that's probably my day gone. Hopefully there will be a good level of sharing done by us all of c# snippets Quote Link to post Share on other sites
kev123 132 Posted April 20, 2014 Report Share Posted April 20, 2014 quick question can we include the ubot api plugin so we can read tables lists etc from ubot. I will have a play myself just wondered if you had tried yet Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted April 20, 2014 Report Share Posted April 20, 2014 This is great. Please post more example tutorials on this for us c# newbies. Can it execute a ubot define/function when a button is clicked on the dialog? Quote Link to post Share on other sites
Aymen 385 Posted April 20, 2014 Author Report Share Posted April 20, 2014 quick question can we include the ubot api plugin so we can read tables lists etc from ubot. I will have a play myself just wondered if you had tried yet i didn't try that yet , i'll have something like that implemented soon This is great. Please post more example tutorials on this for us c# newbies. Can it execute a ubot define/function when a button is clicked on the dialog? i'm working on adding a function to allow you to do that ! Quote Link to post Share on other sites
Bot-Factory 602 Posted April 20, 2014 Report Share Posted April 20, 2014 Hello. How would I add a simple command like:ServiceController[] services = ServiceController.GetServices(); When I want the services to be added to a list within ubot for example? Dan Quote Link to post Share on other sites
don 1 Posted April 20, 2014 Report Share Posted April 20, 2014 Great tool, but i am afraid of the learning curve Quote Link to post Share on other sites
giganut 109 Posted April 20, 2014 Report Share Posted April 20, 2014 Great work Aymen, will this come with a scripting reference to take out a lot of the guess work? Quote Link to post Share on other sites
Macster (UBotter Labs) 112 Posted April 20, 2014 Report Share Posted April 20, 2014 and finally the ultimate plug is here well done aymen.p.s more samples and tuts would be awesome, thanks! Quote Link to post Share on other sites
Aymen 385 Posted April 20, 2014 Author Report Share Posted April 20, 2014 Hello. How would I add a simple command like:ServiceController[] services = ServiceController.GetServices(); When I want the services to be added to a list within ubot for example? Dan Create a StringBuilder instance and append all the list items to it then convert the stringbuilder instance to string!i'll post an example code later today Great work Aymen, will this come with a scripting reference to take out a lot of the guess work? this executes c#/vb code so your scripting reference is the C# language itself Quote Link to post Share on other sites
Aymen 385 Posted April 20, 2014 Author Report Share Posted April 20, 2014 Here is an example on how to work with Lists/Arrays or collections in general ServiceController Csharp Compiler Example.ubot Quote Link to post Share on other sites
dr. dre 23 Posted April 21, 2014 Report Share Posted April 21, 2014 Great stuff Aymen, I just picked this baby up, I'm anxious to learn it. Quote Link to post Share on other sites
Aymen 385 Posted April 22, 2014 Author Report Share Posted April 22, 2014 This is the last day of the launch discount!After today the price will go back to $77! Quote Link to post Share on other sites
whoami 26 Posted April 22, 2014 Report Share Posted April 22, 2014 Aymen,Quick question.Why should I use C# instead of Javascript/Jquery/JS libraries? Quote Link to post Share on other sites
Aymen 385 Posted April 22, 2014 Author Report Share Posted April 22, 2014 Aymen,Quick question.Why should I use C# instead of Javascript/Jquery/JS libraries? First there is things in C# that you can not do in either of what you mentioned!Second it may freeze your bot if you are executing JavaScript extensively!Third its easier to use if you know what you are doing ! Quote Link to post Share on other sites
whoami 26 Posted April 23, 2014 Report Share Posted April 23, 2014 First there is things in C# that you can not do in either of what you mentioned!Second it may freeze your bot if you are executing JavaScript extensively!Third its easier to use if you know what you are doing ! Are you going to add libraries eventually for owners of this plugin? I mean, some plugins here in Trade, Sell and Buy do some stuff that we could do using C#, for example:Tray alerts, minimizing to tray, licensing and so on.Do you think you will add libraries eventually for extra cost? Quote Link to post Share on other sites
Aymen 385 Posted April 23, 2014 Author Report Share Posted April 23, 2014 Are you going to add libraries eventually for owners of this plugin? I mean, some plugins here in Trade, Sell and Buy do some stuff that we could do using C#, for example:Tray alerts, minimizing to tray, licensing and so on.Do you think you will add libraries eventually for extra cost? I'll add libraries for free as code examples for sure!if you have something in mind , post here and i'll see about it! Quote Link to post Share on other sites
whoami 26 Posted April 23, 2014 Report Share Posted April 23, 2014 I'll add libraries for free as code examples for sure!if you have something in mind , post here and i'll see about it! Thats great!Im an absolutely buyer then. This will create great applications for UBot!Hopefully we can also do it multiplatform in the future. Quote Link to post Share on other sites
Bot-Factory 602 Posted May 14, 2014 Report Share Posted May 14, 2014 Aymen, I'm still looking for a solution to validate SSL certificates (certificate pinning). I found some example codes:public static void SetCertificatePolicy(){ServicePointManager.ServerCertificateValidationCallback+= RemoteCertificateValidate;} If you really want to nail it down to one particular certificate, you can compare the certificate data (in DER format) to the byte[] in certificate.GetRawCertData(). You can also use GetCertHashString() and Subject on the certificate parameter in RemoteCertificateValidate to get the information you're after. The hostname ought to be in the subject alternative name of the certificate or, if there isn't a subject alternative name, in the CN of the subject (distinguished) name. Considering the way .NET formats the subject string, this ought to be the first CN= you find there. Do you have an idea how this could be implemented with your plugin?An example code would be highly appreciated.ThanksDan Quote Link to post Share on other sites
Aymen 385 Posted May 14, 2014 Author Report Share Posted May 14, 2014 Check the send emails source code!i implemented Certificate Validation to send email via SSL! regards Quote Link to post Share on other sites
Bot-Factory 602 Posted May 23, 2014 Report Share Posted May 23, 2014 Played around with the C# plugin a bit today. I have to say that my C# skills are not that great at the moment. So please excuse if I ask something stupid :-) I have the following code working in Visual Studio 2013 static void Main(string[] args) { DateTime StartingDate = DateTime.Parse("23.02.2007"); DateTime EndingDate = DateTime.Parse("27.03.2007"); foreach (DateTime date in GetDateRange(StartingDate, EndingDate)) { Console.WriteLine(date.ToShortDateString()); } Console.ReadLine(); } static private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) { if (StartingDate > EndingDate) { return null; } List<DateTime> rv = new List<DateTime>(); DateTime tmpDate = StartingDate; do { rv.Add(tmpDate); tmpDate = tmpDate.AddDays(1); } while (tmpDate <= EndingDate); return rv; } Now I try to do that with the plugin. plugin command("CsharpCompiler.dll", "csharp container") { plugin command("CsharpCompiler.dll", "csharp add function", "private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) \{ if (StartingDate > EndingDate) \{ return null; \} List<DateTime> rv = new List<DateTime>(); DateTime tmpDate = StartingDate; do \{ rv.Add(tmpDate); tmpDate = tmpDate.AddDays(1); \} while (tmpDate <= EndingDate); return rv; \}") set(#code, $plugin function("CsharpCompiler.dll", "$csharp compiler", "return GetDateRange(\"1.01.2014\",\"10.01.2014\");"), "Global") alert(#code)} But he's telling me that the namespace list can't be found. And I struggle a bit with the add .net assembly and add namespace thing. I tried it with:plugin command("CsharpCompiler.dll", "csharp add namespace", "System.Collections.Generic.List") But it tells me, that it requires a Type Argument. Which should be System.DateTime. Butplugin command("CsharpCompiler.dll", "csharp add namespace", "System.DateTime") also isn't working. Would be great if someone could give me a hint how that works exactly. Thanks in advance for your supportDan Quote Link to post Share on other sites
Aymen 385 Posted May 23, 2014 Author Report Share Posted May 23, 2014 Played around with the C# plugin a bit today. I have to say that my C# skills are not that great at the moment. So please excuse if I ask something stupid :-) I have the following code working in Visual Studio 2013 static void Main(string[] args) { DateTime StartingDate = DateTime.Parse("23.02.2007"); DateTime EndingDate = DateTime.Parse("27.03.2007"); foreach (DateTime date in GetDateRange(StartingDate, EndingDate)) { Console.WriteLine(date.ToShortDateString()); } Console.ReadLine(); } static private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) { if (StartingDate > EndingDate) { return null; } List<DateTime> rv = new List<DateTime>(); DateTime tmpDate = StartingDate; do { rv.Add(tmpDate); tmpDate = tmpDate.AddDays(1); } while (tmpDate <= EndingDate); return rv; } Now I try to do that with the plugin. plugin command("CsharpCompiler.dll", "csharp container") { plugin command("CsharpCompiler.dll", "csharp add function", "private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) \{ if (StartingDate > EndingDate) \{ return null; \} List<DateTime> rv = new List<DateTime>(); DateTime tmpDate = StartingDate; do \{ rv.Add(tmpDate); tmpDate = tmpDate.AddDays(1); \} while (tmpDate <= EndingDate); return rv; \}") set(#code, $plugin function("CsharpCompiler.dll", "$csharp compiler", "return GetDateRange(\"1.01.2014\",\"10.01.2014\");"), "Global") alert(#code)} But he's telling me that the namespace list can't be found. And I struggle a bit with the add .net assembly and add namespace thing. I tried it with:plugin command("CsharpCompiler.dll", "csharp add namespace", "System.Collections.Generic.List") But it tells me, that it requires a Type Argument. Which should be System.DateTime. Butplugin command("CsharpCompiler.dll", "csharp add namespace", "System.DateTime") also isn't working. Would be great if someone could give me a hint how that works exactly. Thanks in advance for your supportDan try this code plugin command("CsharpCompiler.dll", "csharp container") { plugin command("CsharpCompiler.dll", "csharp add namespace", "System.Globalization") plugin command("CsharpCompiler.dll", "csharp add namespace", "System.Collections.Generic") plugin command("CsharpCompiler.dll", "csharp add namespace", "System.Text") plugin command("CsharpCompiler.dll", "csharp Framework version", "v4.0") plugin command("CsharpCompiler.dll", "csharp platform", "anycpu") plugin command("CsharpCompiler.dll", "csharp add function", "private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) \{ if (StartingDate > EndingDate) \{ return null; \} List<DateTime> rv = new List<DateTime>(); DateTime tmpDate = StartingDate; do \{ rv.Add(tmpDate); tmpDate = tmpDate.AddDays(1); \} while (tmpDate <= EndingDate); return rv; \}") set(#code, $plugin function("CsharpCompiler.dll", "$csharp compiler", "DateTime StartingDate = DateTime.ParseExact(\"23/2/2007\", \"dd/M/yyyy\", CultureInfo.InvariantCulture); DateTime EndingDate = DateTime.ParseExact(\"25/3/2007\", \"dd/M/yyyy\", CultureInfo.InvariantCulture); StringBuilder sb = new StringBuilder(); foreach (DateTime date in GetDateRange(StartingDate, EndingDate)) \{ sb.AppendLine(date.ToShortDateString()); \} return sb.ToString();"), "Global") alert(#code) } Quote Link to post Share on other sites
Bot-Factory 602 Posted May 23, 2014 Report Share Posted May 23, 2014 Awesome Aymen! Thanks a lot for that! Ok I see.. I forgot to convert that array into a string. Stringbuilder ok.. note to self :-) I'm still confused by the namespaces. I know what they are, but how do I know which ones I need to specify here?When I have the code running in visual studio. Is there a way to show which ones are used? Do I have to add all of them all the time? Dan Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.