[Owasp-turkey] Arızayı Bul #3

Bedirhan Urgun bedirhanurgun at gmail.com
Fri Oct 16 12:21:48 EDT 2009


Merhaba,
java ve javascript'ten sonra bir c# arizayi bul ornegi. *Yazdigim bir thick
client uygulamasindan... :(*

bedirhan


Arizayi Bul#3
-------------------

        private void button1_Click(object sender, EventArgs e)
        {
            Requester requester = GetRequester(textBox2.Text);
            textBox1.Text += requester.ToString();
            textBox2.Text = requester.Manager;
        }


        private Requester GetRequester(string aUserName)
        {
            Requester requester = null;
            // get our user
            DirectoryEntry ldapUser = GetLDAPUser(aUserName);
            if (ldapUser == null)
                return requester;
        ...

        }

        private DirectoryEntry GetLDAPUser(string UserName)
        {
            DirectoryEntry de = GetDirectoryEntry();
            DirectorySearcher deSearch = new DirectorySearcher();
            deSearch.SearchRoot = de;
            deSearch.Filter = "(&(objectClass=user)(sAMAccountName=" +
UserName + "))";
            deSearch.SearchScope = SearchScope.Subtree;
            SearchResult results = deSearch.FindOne();
            if (results != null)
                return GetDirectoryEntry(results.Path);
            else
                return null;
        }
-------------- sonraki bölüm --------------
Bir HTML eklentisi temizlendi...
URL: https://lists.owasp.org/pipermail/owasp-turkey/attachments/20091016/c7173607/attachment.html 


More information about the Owasp-turkey mailing list