|
He didnt say "today" so you read the question, and the world wasnt made in a day
|
|
|
|
|
It's obviously implied from the context of the question.
What's with you?
|
|
|
|
|
I could ask the same question of you
|
|
|
|
|
On top of all of it you can limit the number of values by DFSing the net for email servers to limit your variables.
|
|
|
|
|
|
Its not my project, I am just offering suggestions on how to go about a difficult situation. You were a great help
|
|
|
|
|
You can try. But it's very processor/time intensive and even when you find a string that looks like an email address and has the correct MD5 hash, it may still not be the original address.
But you can do better than "nothing", which appears to be what most people are advocating.
Obtain a huge list of email addresses somewhere, and see if any of them match your hashes.
Look into oclHashcat. You can get it to test only strings that look like plausible email addresses. Email addresses are notorious for having much valid variation, but most will look like "asciichars@some_known_email_provider". Where the "asciichars" part is likely to contain words/names plus digits, underscores and dots. So don't use brute force, be smart. Use dictionaries of words+names and patterns.
|
|
|
|
|
Hello all,
I'm new here and it's a first time that i ask for help to the community. I'm also new in C sharp but i try to manage and learn on the way.
I would like to have some help to understand how to write a Process for windows with wich i can communicate with my winform.
i made an winform application which permit me to retrive some data from Active directory and also some other data from computers on the network "using powerShell" and a AD class.
For some reasons i can't grab a correct information about ex: shared Printers, cose the PowerShell give me a output of the computer printers, not user printers. It was a simple exemple.
so i decide to write a Process wich i want to upload and install on a remote computer, till here i can manage that.
what i would like to understand and if you can show me a little exemple, it's how to add some functions to this process and get the output of this function back to my Winform.
as exemple:
1.in my Winform a make a remote call to the process and ask him to give me the list of all printers installed.
2. show the output in a lisbox for exemple.
I would like to tell you thank you in advance for you help
|
|
|
|
|
tdcmystere wrote: 1.in my Winform a make a remote call to the process and ask him to give me the list of all printers installed.
2. show the output in a lisbox for exemple.
We can abstract the question to "how do I get data from PC1 to PC2". The recommendation would be to look into WCF, but any type of exchange-mechanism would do- there's examples on communicating using sockets, but it'd even be possible using simple files.
Are the computers on the same LAN? If yes, I'd go for a simple socket
|
|
|
|
|
Thank you for response
Yes all Computers are nearly on the same network inside a Active directory.
it's about 9K of computers.
|
|
|
|
|
Make that a multithreaded client/server, based on TCP/IP. Alternatively, you can write files to an UNC-share - might be easier to code, will be a bit harder to maintain.
|
|
|
|
|
in my question i ask to provide me " shure if it possible" a little exemple how to pass a command and give back a response "data".
i don't ask a whole code i want to learn but a little help will be much appreciate.
Thank you
PS: sorry for my english
|
|
|
|
|
There's a client/server example on MSDN[^]. Be sure to check out the hyperlinks at the bottom of the page.
|
|
|
|
|
Thanks for this link, i already read this article, based on this, as i can understand is a console based server/client.
how i can whrite a simple command for server or client to get infos about printers.
for example i use this peace of code to retrieve local printers on a remote computer
private void GetPrinters()
{
string strServer = "\\\\" + this.textBox20.Text;
ConnectionOptions options = new ConnectionOptions();
options.Username = "xxxx";
options.Password = "xxxxx";
options.Authority = "NTLMDOMAIN:consilium";
ManagementScope myScope = new ManagementScope(strServer + "\\root\\cimv2", options);
SelectQuery oQuery = new SelectQuery("SELECT * FROM WIN32_Printer");
ManagementObjectSearcher oResults = new ManagementObjectSearcher(myScope, oQuery);
foreach (ManagementObject oItem in oResults.Get())
{
string strPrinterName = oItem.Properties["DriverName"].Value.ToString();
listBox2.Items.Add(strPrinterName.ToString().ToUpper());
}
}
i would like to execute this code on a remote computer and get the data back to my winform.
thank you in advance
|
|
|
|
|
tdcmystere wrote: i would like to execute this code on a remote computer and get the data back to my winform.
Then you will need to write something to do that communication, or use an existing solution
You could also adapt the console-example to suit your needs, hence the link. If that's too much trouble, then you'd have to map a network-drive from the server, and use a batch-file to write the result to a file on that network-share. E.g.;
MyCommand.exe > F:\thefile.txt
|
|
|
|
|
I am really new to C# .NET and SQL Server, I usually manage to find all my informations thanks to existing posts, but I have to admit I'm actually stuck and a bit lost with all the resources available.
I am actually developing a Windows Forms Application with Visual C# Express 2010 which would use (read/write) data from a SQL Server 2008 Express DB
I have created my DB with SQL Server Management Studio (2008 Express), I understand the instance is named ATLELAG786576\SQLEXPRESS My DB is called 'TEST'
Looking at my DB 'TEST' Properties in SQL Server Management Studio (2008 Express): Under Files, I am (ATLE\bneveux) the owner of the DB
Looking under Security, Logins, Mylogin (ATLE\bneveux) My default DB is 'TEST' Server roles are 'public' + 'sysadmin' User Mapping DB 'TEST' User 'dbo' Default Schema 'dbo'
In my C# application
app.config:
="1.0"="utf-8" <configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="connectionStringTestDb"
connectionString="Data Source=ATLELAG786576\SQLEXPRESS;Initial Catalog=D:\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\TEST.mdf;Integrated Security=True;Connect Timeout=30;User Instance=False"
providerName="System.Data.SqlClient" />
</connectionStrings> </configuration>
dbConnection.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace SQLServerConnectionDemo
{
class dbConnection
{
public static SqlConnection newCon;
public static string connectionStringTestDb = ConfigurationManager.ConnectionStrings["connectionStringTestDb"].ConnectionString;
public static SqlConnection GetConnection()
{
newCon = new SqlConnection(connectionStringTestDb);
return newCon;
}
}
}
dbAccess.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace SQLServerConnectionDemo
{
class dbAccess
{
SqlConnection conn;
public dbAccess()
{
conn = dbConnection.GetConnection();
}
public void addEmployee(string Id, string Name, string Email)
{
if (conn.State.ToString() == "Closed")
{
conn.Open();
}
SqlCommand newCmd = conn.CreateCommand();
newCmd.Connection = conn;
newCmd.CommandType = CommandType.Text;
newCmd.CommandText = "INSERT INTO tblEmployees VALUES ('"+ Id +"','"+ Name +"','"+ Email +"')";
newCmd.ExecuteNonQuery();
}
}
}
in a form formEmployeeAdd.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SQLServerConnectionDemo
{
public partial class formEmployeeAdd : Form
{
dbAccess access = new dbAccess();
public formEmployeeAdd()
{
InitializeComponent();
}
private void btnInsert_Click(object sender, EventArgs e)
{
access.addEmployee(txtId.Text, txtName.Text, txtEmail.Text);
MessageBox.Show("Data successfully added");
}
}
}
And here the error message i always get when trying to run this process:
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "D:\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\TEST.mdf" requested by the login. The login failed. Login failed for user 'ATLE\bneveux'.
Note that I have never really been able to add my Data Source in Visual C# 2010 Express so I could manage the DB from VS, I always get the following error message:
Unable to open the physical file "D:\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\TEST.mdf". Operating system error 32: "32(Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.)". An attempt to attach an auto-named database for file D:\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\TEST.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Thank you for your expertise
Brice
|
|
|
|
|
|
Hi,
I have a text box in my form. I want to enter a pagraph in this text box, then store it as string (with XML format) into a table in SQL.
Because this is a paragraph, so the text value of the text box will include characters like: "\r\n" and "\r\n ".
But, I only can wirte and read "\n" of the text box in xml string, so I can't reload the original paragraph.
I used the below codes to write content of the text box:
strContent += (txtParagraph.Text != "") ? "<CONTENT>" + txtParagraph.Text + "</CONTENT>" : "<CONTENT />";
How can I write and read a below paragraph:
"Today is Monday.....
Tomorrow is Tuesday.
This month is November !"
Thanks and regards,
|
|
|
|
|
Just use string.Replace to change /n to /r/n
txtParagraph.text.Replace("\n","\r\n");
No more Mister Nice Guy... >: |
|
|
|
|
|
Thank you,
But the text box still only show contents in one line (not multi lines)
|
|
|
|
|
After returning from database?
No more Mister Nice Guy... >: |
|
|
|
|
|
Yes.
After get from database. I used the statement:
txtParagraph.Text = doc.SelectSingleNode("/CONTENT").InnerText;
But the textbox only shows in one line, like this: "This is the first line This is the second line This is the last line"
|
|
|
|
|
After returning from database you have to restore text to state you get it. So use string.Replace but in another direction.
textFromDatabase.Replace("/n","/r/n");
Why you cant add caret return in your xml? Replacing strings back and forth is not seems nice.
No more Mister Nice Guy... >: |
|
|
|
|
|
Thank you for your help.
I can do now, by using: txtContent.Text = txtContent.Text.Replace("\n", "\r\n");
P/s: Last, I used txtContent.Text.Replace("\n", "\r\n"), so it is not successful
|
|
|
|
|
Yes I thought of that. I did not include it in message before because entering '=' from my phone is really pain in the ass.
So everything is working fine?
No more Mister Nice Guy... >: |
|
|
|
|