Unavailableuser
Megapat
- Katılım
- 6 Şubat 2014
- Mesajlar
- 6.104
- Makaleler
- 2
- Çözümler
- 64
Yaz görelim o zaman profil fotoğrafına Mr Robot koyunca yazılımcı olunmuyor.
Oyunum bitince ben yazıp verecektim :SÖrnek bir fonksiyon bloğu halka açık bir sorgulamadır.Arkadaşın kastettiği bu.PHP:class Kpsv2Sorgulayici { private $adresSorgu; private $adresSts; private $kullanici; private $sifre; // ------------------------------------------------------------------------------------------- // YARDIMCI METODLAR // ------------------------------------------------------------------------------------------- public function __construct($adresSorgu, $adresSts, $kullanici, $sifre) { $this->adresSorgu = $adresSorgu; $this->adresSts = $adresSts; $this->kullanici = $kullanici; $this->sifre = $sifre; } private function getZamanDamgasi($aralik = 0) { return gmdate("Y-m-d\TH:i:s\Z", time() + $aralik); } private function getXmlZamanDamgasiBasligi() { $zdBasla = $this->getZamanDamgasi(); $zdBitis = $this->getZamanDamgasi(300); return <<<XML <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="_0"> <wsu:Created>$zdBasla</wsu:Created> <wsu:Expires>$zdBitis</wsu:Expires> </wsu:Timestamp> XML; } private function getXmlSecurityBasligi($icerik1, $icerik2, $adres, $metod) { return <<<XML <wsse:Security> $icerik1 $icerik2 </wsse:Security> <wsa:To>$adres</wsa:To> <wsa:Action>$metod</wsa:Action> XML; } private function getXmlSoapTam($baslik, $govde) { return <<<XML <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:b="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" > <s:Header>$baslik</s:Header> <s:Body>$govde</s:Body> </s:Envelope> XML; } private function soapSorguYap($adres, $xml) { $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $adres); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/soap+xml; charset=utf-8', )); $sonuc = curl_exec($ch); curl_close($ch); return $sonuc; } // ------------------------------------------------------------------------------------------- // ASIL SORGU METODU // ------------------------------------------------------------------------------------------- public function calistir($anaMetod, $anaXmlGovde) { // Sts den kullanıcı şifre ile authentice olup token alma aşması // ------------------------------------------------------------------------------------------- $xmlZd = $this->getXmlZamanDamgasiBasligi(); $xmlSecurityIcerik = <<<XML <wsse:UsernameToken wsu:Id="Me"> <wsse:Username>$this->kullanici</wsse:Username> <wsse:Password>$this->sifre</wsse:Password> </wsse:UsernameToken> XML; $xmlBaslik = $this->getXmlSecurityBasligi($xmlZd, $xmlSecurityIcerik, $this->adresSts, 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue'); $tokenTipi = 'http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1'; $keyTipi = 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey'; $xmlGovde = <<<XML <wst:RequestSecurityToken> <wst:TokenType>$tokenTipi</wst:TokenType> <wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType> <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsa:EndpointReference> <wsa:Address>$this->adresSorgu</wsa:Address> </wsa:EndpointReference> </wsp:AppliesTo> <wst:KeyType>$keyTipi</wst:KeyType> </wst:RequestSecurityToken> XML; $xmlSorgu = $this->getXmlSoapTam($xmlBaslik, $xmlGovde); $sonuc = $this->soapSorguYap($this->adresSts, $xmlSorgu); // Alınan tokenı imzalama aşaması // ------------------------------------------------------------------------------------------- $dom = new DOMDocument(); $dom->loadXML($sonuc); $doc = $dom->documentElement; $xpath = new DOMXpath($dom); $xpath->registerNamespace('s', 'http://www.w3.org/2003/05/soap-envelope'); $xpath->registerNamespace('wst', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512'); $xpath->registerNamespace('wsse', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'); $xpath->registerNamespace('trust', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512'); $xpath->registerNamespace('o', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'); $token = $xpath->query('/s:Envelope/s:Body/wst:RequestSecurityTokenResponseCollection/wst:RequestSecurityTokenResponse/wst:RequestedSecurityToken', $doc); $proofKey = $xpath->query('/s:Envelope/s:Body/wst:RequestSecurityTokenResponseCollection/wst:RequestSecurityTokenResponse/wst:RequestedProofToken/wst:BinarySecret', $doc); $samlAssignID = $xpath->query('/s:Envelope/s:Body/trust:RequestSecurityTokenResponseCollection/trust:RequestSecurityTokenResponse/trust:RequestedAttachedReference/o:SecurityTokenReference/o:KeyIdentifier', $doc); if ($proofKey->length === 0) { throw new Error('Sts sunucusundan kimlik doğrulanamadı.'); } $proofKey = base64_decode($proofKey->item(0)->textContent); $token = $dom->saveXML($token->item(0)->firstChild); $samlAssignID = $samlAssignID->item(0)->textContent; $xmlZd = $this->getXmlZamanDamgasiBasligi(); $dom = new DOMDocument(); $dom->loadXML($xmlZd); $canonicalXML = $dom->documentElement->C14N(TRUE, FALSE); $digestValue = base64_encode(hash('sha1', $canonicalXML, TRUE)); $signedInfo = <<<XML <dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/> <dsig:Reference URI="#_0"> <dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform></dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue>$digestValue</dsig:DigestValue> </dsig:Reference> </dsig:SignedInfo> XML; $dom = new DOMDocument(); $dom->loadXML($signedInfo); $canonicalXml = $dom->documentElement->C14N(TRUE, FALSE); $signatureValue = base64_encode(hash_hmac('sha1', $canonicalXml , $proofKey, TRUE)); $tokenImza = <<<XML <dsig:Signature> $signedInfo <dsig:SignatureValue>$signatureValue</dsig:SignatureValue> <dsig:KeyInfo> <wsse:SecurityTokenReference b:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"> <wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">$samlAssignID</wsse:KeyIdentifier> </wsse:SecurityTokenReference> </dsig:KeyInfo> </dsig:Signature> XML; // Token kullanarak asıl sorguyu yapma aşaması // ------------------------------------------------------------------------------------------- $xmlBaslik = $this->getXmlSecurityBasligi($xmlZd, $token . $tokenImza, $this->adresSorgu, $anaMetod); $xmlSorgu = $this->getXmlSoapTam($xmlBaslik, $anaXmlGovde); return $this->soapSorguYap($this->adresSorgu, $xmlSorgu); } }
Modül;
Imports System
Imports System.CodeDom.Compiler
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Runtime.CompilerServices
Imports System.Threading
Imports System.Web.Services
Imports System.Web.Services.Description
Imports System.Web.Services.Protocols
Imports tckimliknoDogrulama.Properties
Namespace tckimliknoDogrulama.TCKimlikNoDogrulama
<GeneratedCode("System.Web.Services", "4.7.3190.0"), DebuggerStepThrough(), DesignerCategory("code"), WebServiceBinding(Name := "KPSPublicSoap", [Namespace] := "http://tckimlik.nvi.gov.tr/WS")>
Public Class KPSPublic
Inherits SoapHttpClientProtocol
' Token: 0x02000006 RID: 6
Public Sub New()
Me.Url = Settings.[Default].tckimliknoDogrulama_TCKimlikNoDogrulama_KPSPublic
Dim flag As Boolean = Me.IsLocalFileSystemWebService(Me.Url)
If flag Then
Me.UseDefaultCredentials = True
Me.useDefaultCredentialsSetExplicitly = False
Else
Me.useDefaultCredentialsSetExplicitly = True
End If
End Sub
Public Property Url() As String
Get
Return MyBase.Url
End Get
Set(value As String)
Dim flag As Boolean = Me.IsLocalFileSystemWebService(MyBase.Url) AndAlso Not Me.useDefaultCredentialsSetExplicitly AndAlso Not Me.IsLocalFileSystemWebService(value)
If flag Then
MyBase.UseDefaultCredentials = False
End If
MyBase.Url = value
End Set
End Property
Public Property UseDefaultCredentials() As Boolean
Get
Return MyBase.UseDefaultCredentials
End Get
Set(value As Boolean)
MyBase.UseDefaultCredentials = value
Me.useDefaultCredentialsSetExplicitly = True
End Set
End Property
<CompilerGenerated()>
<CompilerGenerated()>
Public Event TCKimlikNoDogrulaCompleted As TCKimlikNoDogrulaCompletedEventHandler
<SoapDocumentMethod("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula", RequestNamespace := "http://tckimlik.nvi.gov.tr/WS", ResponseNamespace := "http://tckimlik.nvi.gov.tr/WS", Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)>
Public Function TCKimlikNoDogrula(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer) As Boolean
Dim array As Object() = MyBase.Invoke("TCKimlikNoDogrula", New Object() { TCKimlikNo, Ad, Soyad, DogumYili })
Return CBool(array(0))
End Function
Public Sub TCKimlikNoDogrulaAsync(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer)
Me.TCKimlikNoDogrulaAsync(TCKimlikNo, Ad, Soyad, DogumYili, Nothing)
End Sub
Public Sub TCKimlikNoDogrulaAsync(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer, userState As Object)
Dim flag As Boolean = Me.TCKimlikNoDogrulaOperationCompleted Is Nothing
If flag Then
Me.TCKimlikNoDogrulaOperationCompleted = AddressOf Me.OnTCKimlikNoDogrulaOperationCompleted
End If
MyBase.InvokeAsync("TCKimlikNoDogrula", New Object() { TCKimlikNo, Ad, Soyad, DogumYili }, Me.TCKimlikNoDogrulaOperationCompleted, userState)
End Sub
Private Sub OnTCKimlikNoDogrulaOperationCompleted(arg As Object)
Dim flag As Boolean = Me.TCKimlikNoDogrulaCompleted IsNot Nothing
If flag Then
Dim invokeCompletedEventArgs As InvokeCompletedEventArgs = CType(arg, InvokeCompletedEventArgs)
Me.TCKimlikNoDogrulaCompleted(Me, New TCKimlikNoDogrulaCompletedEventArgs(invokeCompletedEventArgs.Results, invokeCompletedEventArgs.[Error], invokeCompletedEventArgs.Cancelled, invokeCompletedEventArgs.UserState))
End If
End Sub
Public Sub CancelAsync(userState As Object)
MyBase.CancelAsync(userState)
End Sub
Private Function IsLocalFileSystemWebService(url As String) As Boolean
Dim flag As Boolean = url Is Nothing OrElse url = String.Empty
Dim result As Boolean
If flag Then
result = False
Else
Dim uri As Uri = New Uri(url)
Dim flag2 As Boolean = uri.Port >= 1024 AndAlso String.Compare(uri.Host, "localHost", StringComparison.OrdinalIgnoreCase) = 0
result = flag2
End If
Return result
End Function
Private TCKimlikNoDogrulaOperationCompleted As SendOrPostCallback
Private useDefaultCredentialsSetExplicitly As Boolean
End Class
End Namespace
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports tckimliknoDogrulama.TCKimlikNoDogrulama
Namespace tckimliknoDogrulama
Public Class Form1
Inherits Form
' Token: 0x02000002 RID: 2
Public Sub New()
Me.InitializeComponent()
End Sub
Private Sub btnKontrolEt_Click(sender As Object, e As EventArgs)
Dim kPSPublic As KPSPublic = New KPSPublic()
Dim flag As Boolean = kPSPublic.TCKimlikNoDogrula(Long.Parse(Me.txtTCKimlikNo.Text), Me.txtIsim.Text.ToUpper(), Me.txtSoyisim.Text.ToUpper(), Integer.Parse(Me.txtDogumYil.Text))
Dim flag2 As Boolean = flag
If flag2 Then
MessageBox.Show("Bilgileriniz do" & ChrW(287) & "ruland" & ChrW(305), "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Else
MessageBox.Show("Bilgileriniz do" & ChrW(287) & "rulanamad" & ChrW(305), "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
End Sub
Protected Overrides Sub Dispose(disposing As Boolean)
Dim flag As Boolean = disposing AndAlso Me.components IsNot Nothing
If flag Then
Me.components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
Private Sub InitializeComponent()
Me.groupBox1 = New GroupBox()
Me.txtDogumYil = New TextBox()
Me.label2 = New Label()
Me.txtSoyisim = New TextBox()
Me.label1 = New Label()
Me.txtTCKimlikNo = New TextBox()
Me.label3 = New Label()
Me.txtIsim = New TextBox()
Me.İsim = New Label()
Me.btnKontrolEt = New Button()
Me.groupBox1.SuspendLayout()
MyBase.SuspendLayout()
Me.groupBox1.Controls.Add(Me.btnKontrolEt)
Me.groupBox1.Controls.Add(Me.txtDogumYil)
Me.groupBox1.Controls.Add(Me.label2)
Me.groupBox1.Controls.Add(Me.txtSoyisim)
Me.groupBox1.Controls.Add(Me.label1)
Me.groupBox1.Controls.Add(Me.txtTCKimlikNo)
Me.groupBox1.Controls.Add(Me.label3)
Me.groupBox1.Controls.Add(Me.txtIsim)
Me.groupBox1.Controls.Add(Me.İsim)
Me.groupBox1.Location = New Point(12, 12)
Me.groupBox1.Name = "groupBox1"
Me.groupBox1.Size = New Size(210, 220)
Me.groupBox1.TabIndex = 0
Me.groupBox1.TabStop = False
Me.groupBox1.Text = "Ki" & ChrW(351) & "isel Bilgiler"
Me.txtDogumYil.Location = New Point(9, 165)
Me.txtDogumYil.Name = "txtDogumYil"
Me.txtDogumYil.Size = New Size(195, 20)
Me.txtDogumYil.TabIndex = 1
Me.label2.AutoSize = True
Me.label2.Location = New Point(6, 149)
Me.label2.Name = "label2"
Me.label2.Size = New Size(55, 13)
Me.label2.TabIndex = 0
Me.label2.Text = "Do" & ChrW(287) & "um Y" & ChrW(305) & "l"
Me.txtSoyisim.Location = New Point(9, 124)
Me.txtSoyisim.Name = "txtSoyisim"
Me.txtSoyisim.Size = New Size(195, 20)
Me.txtSoyisim.TabIndex = 1
Me.label1.AutoSize = True
Me.label1.Location = New Point(6, 108)
Me.label1.Name = "label1"
Me.label1.Size = New Size(42, 13)
Me.label1.TabIndex = 0
Me.label1.Text = "Soyisim"
Me.txtTCKimlikNo.Location = New Point(9, 44)
Me.txtTCKimlikNo.Name = "txtTCKimlikNo"
Me.txtTCKimlikNo.Size = New Size(195, 20)
Me.txtTCKimlikNo.TabIndex = 1
Me.label3.AutoSize = True
Me.label3.Location = New Point(6, 28)
Me.label3.Name = "label3"
Me.label3.Size = New Size(104, 13)
Me.label3.TabIndex = 0
Me.label3.Text = "T.C. Kimlik Numaras" & ChrW(305)
Me.txtIsim.Location = New Point(9, 83)
Me.txtIsim.Name = "txtIsim"
Me.txtIsim.Size = New Size(195, 20)
Me.txtIsim.TabIndex = 1
Me.İsim.AutoSize = True
Me.İsim.Location = New Point(6, 67)
Me.İsim.Name = ChrW(304) & "sim"
Me.İsim.Size = New Size(25, 13)
Me.İsim.TabIndex = 0
Me.İsim.Text = ChrW(304) & "sim"
Me.btnKontrolEt.Location = New Point(97, 191)
Me.btnKontrolEt.Name = "btnKontrolEt"
Me.btnKontrolEt.Size = New Size(107, 23)
Me.btnKontrolEt.TabIndex = 0
Me.btnKontrolEt.Text = "Kontrol et"
Me.btnKontrolEt.UseVisualStyleBackColor = True
AddHandler Me.btnKontrolEt.Click, AddressOf Me.btnKontrolEt_Click
MyBase.AutoScaleDimensions = New SizeF(6F, 13F)
MyBase.AutoScaleMode = AutoScaleMode.Font
MyBase.ClientSize = New Size(241, 254)
MyBase.Controls.Add(Me.groupBox1)
MyBase.Name = "Form1"
MyBase.StartPosition = FormStartPosition.CenterScreen
Me.Text = "T.C. Kimlik No Do" & ChrW(287) & "rulama"
Me.groupBox1.ResumeLayout(False)
Me.groupBox1.PerformLayout()
MyBase.ResumeLayout(False)
End Sub
Private components As IContainer = Nothing
Private groupBox1 As GroupBox
Private txtDogumYil As TextBox
Private label2 As Label
Private txtSoyisim As TextBox
Private label1 As Label
Private txtTCKimlikNo As TextBox
Private label3 As Label
Private txtIsim As TextBox
Private İsim As Label
Private btnKontrolEt As Button
End Class
End Namespace
Kankam C# ile yazılmış kodu VB ile nasıl decompiler ettin Çok isteyen olursa atarız kaynak kodunu.Modül;
C#:Imports System Imports System.CodeDom.Compiler Imports System.ComponentModel Imports System.Diagnostics Imports System.Runtime.CompilerServices Imports System.Threading Imports System.Web.Services Imports System.Web.Services.Description Imports System.Web.Services.Protocols Imports tckimliknoDogrulama.Properties Namespace tckimliknoDogrulama.TCKimlikNoDogrulama <GeneratedCode("System.Web.Services", "4.7.3190.0"), DebuggerStepThrough(), DesignerCategory("code"), WebServiceBinding(Name := "KPSPublicSoap", [Namespace] := "http://tckimlik.nvi.gov.tr/WS")> Public Class KPSPublic Inherits SoapHttpClientProtocol ' Token: 0x02000006 RID: 6 Public Sub New() Me.Url = Settings.[Default].tckimliknoDogrulama_TCKimlikNoDogrulama_KPSPublic Dim flag As Boolean = Me.IsLocalFileSystemWebService(Me.Url) If flag Then Me.UseDefaultCredentials = True Me.useDefaultCredentialsSetExplicitly = False Else Me.useDefaultCredentialsSetExplicitly = True End If End Sub Public Property Url() As String Get Return MyBase.Url End Get Set(value As String) Dim flag As Boolean = Me.IsLocalFileSystemWebService(MyBase.Url) AndAlso Not Me.useDefaultCredentialsSetExplicitly AndAlso Not Me.IsLocalFileSystemWebService(value) If flag Then MyBase.UseDefaultCredentials = False End If MyBase.Url = value End Set End Property Public Property UseDefaultCredentials() As Boolean Get Return MyBase.UseDefaultCredentials End Get Set(value As Boolean) MyBase.UseDefaultCredentials = value Me.useDefaultCredentialsSetExplicitly = True End Set End Property <CompilerGenerated()> <CompilerGenerated()> Public Event TCKimlikNoDogrulaCompleted As TCKimlikNoDogrulaCompletedEventHandler <SoapDocumentMethod("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula", RequestNamespace := "http://tckimlik.nvi.gov.tr/WS", ResponseNamespace := "http://tckimlik.nvi.gov.tr/WS", Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> Public Function TCKimlikNoDogrula(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer) As Boolean Dim array As Object() = MyBase.Invoke("TCKimlikNoDogrula", New Object() { TCKimlikNo, Ad, Soyad, DogumYili }) Return CBool(array(0)) End Function Public Sub TCKimlikNoDogrulaAsync(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer) Me.TCKimlikNoDogrulaAsync(TCKimlikNo, Ad, Soyad, DogumYili, Nothing) End Sub Public Sub TCKimlikNoDogrulaAsync(TCKimlikNo As Long, Ad As String, Soyad As String, DogumYili As Integer, userState As Object) Dim flag As Boolean = Me.TCKimlikNoDogrulaOperationCompleted Is Nothing If flag Then Me.TCKimlikNoDogrulaOperationCompleted = AddressOf Me.OnTCKimlikNoDogrulaOperationCompleted End If MyBase.InvokeAsync("TCKimlikNoDogrula", New Object() { TCKimlikNo, Ad, Soyad, DogumYili }, Me.TCKimlikNoDogrulaOperationCompleted, userState) End Sub Private Sub OnTCKimlikNoDogrulaOperationCompleted(arg As Object) Dim flag As Boolean = Me.TCKimlikNoDogrulaCompleted IsNot Nothing If flag Then Dim invokeCompletedEventArgs As InvokeCompletedEventArgs = CType(arg, InvokeCompletedEventArgs) Me.TCKimlikNoDogrulaCompleted(Me, New TCKimlikNoDogrulaCompletedEventArgs(invokeCompletedEventArgs.Results, invokeCompletedEventArgs.[Error], invokeCompletedEventArgs.Cancelled, invokeCompletedEventArgs.UserState)) End If End Sub Public Sub CancelAsync(userState As Object) MyBase.CancelAsync(userState) End Sub Private Function IsLocalFileSystemWebService(url As String) As Boolean Dim flag As Boolean = url Is Nothing OrElse url = String.Empty Dim result As Boolean If flag Then result = False Else Dim uri As Uri = New Uri(url) Dim flag2 As Boolean = uri.Port >= 1024 AndAlso String.Compare(uri.Host, "localHost", StringComparison.OrdinalIgnoreCase) = 0 result = flag2 End If Return result End Function Private TCKimlikNoDogrulaOperationCompleted As SendOrPostCallback Private useDefaultCredentialsSetExplicitly As Boolean End Class End Namespace
Kullanım;
C#:Imports System Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Imports tckimliknoDogrulama.TCKimlikNoDogrulama Namespace tckimliknoDogrulama Public Class Form1 Inherits Form ' Token: 0x02000002 RID: 2 Public Sub New() Me.InitializeComponent() End Sub Private Sub btnKontrolEt_Click(sender As Object, e As EventArgs) Dim kPSPublic As KPSPublic = New KPSPublic() Dim flag As Boolean = kPSPublic.TCKimlikNoDogrula(Long.Parse(Me.txtTCKimlikNo.Text), Me.txtIsim.Text.ToUpper(), Me.txtSoyisim.Text.ToUpper(), Integer.Parse(Me.txtDogumYil.Text)) Dim flag2 As Boolean = flag If flag2 Then MessageBox.Show("Bilgileriniz do" & ChrW(287) & "ruland" & ChrW(305), "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Asterisk) Else MessageBox.Show("Bilgileriniz do" & ChrW(287) & "rulanamad" & ChrW(305), "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End If End Sub Protected Overrides Sub Dispose(disposing As Boolean) Dim flag As Boolean = disposing AndAlso Me.components IsNot Nothing If flag Then Me.components.Dispose() End If MyBase.Dispose(disposing) End Sub Private Sub InitializeComponent() Me.groupBox1 = New GroupBox() Me.txtDogumYil = New TextBox() Me.label2 = New Label() Me.txtSoyisim = New TextBox() Me.label1 = New Label() Me.txtTCKimlikNo = New TextBox() Me.label3 = New Label() Me.txtIsim = New TextBox() Me.İsim = New Label() Me.btnKontrolEt = New Button() Me.groupBox1.SuspendLayout() MyBase.SuspendLayout() Me.groupBox1.Controls.Add(Me.btnKontrolEt) Me.groupBox1.Controls.Add(Me.txtDogumYil) Me.groupBox1.Controls.Add(Me.label2) Me.groupBox1.Controls.Add(Me.txtSoyisim) Me.groupBox1.Controls.Add(Me.label1) Me.groupBox1.Controls.Add(Me.txtTCKimlikNo) Me.groupBox1.Controls.Add(Me.label3) Me.groupBox1.Controls.Add(Me.txtIsim) Me.groupBox1.Controls.Add(Me.İsim) Me.groupBox1.Location = New Point(12, 12) Me.groupBox1.Name = "groupBox1" Me.groupBox1.Size = New Size(210, 220) Me.groupBox1.TabIndex = 0 Me.groupBox1.TabStop = False Me.groupBox1.Text = "Ki" & ChrW(351) & "isel Bilgiler" Me.txtDogumYil.Location = New Point(9, 165) Me.txtDogumYil.Name = "txtDogumYil" Me.txtDogumYil.Size = New Size(195, 20) Me.txtDogumYil.TabIndex = 1 Me.label2.AutoSize = True Me.label2.Location = New Point(6, 149) Me.label2.Name = "label2" Me.label2.Size = New Size(55, 13) Me.label2.TabIndex = 0 Me.label2.Text = "Do" & ChrW(287) & "um Y" & ChrW(305) & "l" Me.txtSoyisim.Location = New Point(9, 124) Me.txtSoyisim.Name = "txtSoyisim" Me.txtSoyisim.Size = New Size(195, 20) Me.txtSoyisim.TabIndex = 1 Me.label1.AutoSize = True Me.label1.Location = New Point(6, 108) Me.label1.Name = "label1" Me.label1.Size = New Size(42, 13) Me.label1.TabIndex = 0 Me.label1.Text = "Soyisim" Me.txtTCKimlikNo.Location = New Point(9, 44) Me.txtTCKimlikNo.Name = "txtTCKimlikNo" Me.txtTCKimlikNo.Size = New Size(195, 20) Me.txtTCKimlikNo.TabIndex = 1 Me.label3.AutoSize = True Me.label3.Location = New Point(6, 28) Me.label3.Name = "label3" Me.label3.Size = New Size(104, 13) Me.label3.TabIndex = 0 Me.label3.Text = "T.C. Kimlik Numaras" & ChrW(305) Me.txtIsim.Location = New Point(9, 83) Me.txtIsim.Name = "txtIsim" Me.txtIsim.Size = New Size(195, 20) Me.txtIsim.TabIndex = 1 Me.İsim.AutoSize = True Me.İsim.Location = New Point(6, 67) Me.İsim.Name = ChrW(304) & "sim" Me.İsim.Size = New Size(25, 13) Me.İsim.TabIndex = 0 Me.İsim.Text = ChrW(304) & "sim" Me.btnKontrolEt.Location = New Point(97, 191) Me.btnKontrolEt.Name = "btnKontrolEt" Me.btnKontrolEt.Size = New Size(107, 23) Me.btnKontrolEt.TabIndex = 0 Me.btnKontrolEt.Text = "Kontrol et" Me.btnKontrolEt.UseVisualStyleBackColor = True AddHandler Me.btnKontrolEt.Click, AddressOf Me.btnKontrolEt_Click MyBase.AutoScaleDimensions = New SizeF(6F, 13F) MyBase.AutoScaleMode = AutoScaleMode.Font MyBase.ClientSize = New Size(241, 254) MyBase.Controls.Add(Me.groupBox1) MyBase.Name = "Form1" MyBase.StartPosition = FormStartPosition.CenterScreen Me.Text = "T.C. Kimlik No Do" & ChrW(287) & "rulama" Me.groupBox1.ResumeLayout(False) Me.groupBox1.PerformLayout() MyBase.ResumeLayout(False) End Sub Private components As IContainer = Nothing Private groupBox1 As GroupBox Private txtDogumYil As TextBox Private label2 As Label Private txtSoyisim As TextBox Private label1 As Label Private txtTCKimlikNo As TextBox Private label3 As Label Private txtIsim As TextBox Private İsim As Label Private btnKontrolEt As Button End Class End Namespace
Hani kod diyenler için ekledim helal et
Yapacaklara c# zor gelir diye convert ettim bilen arkadaşlar tabi ki zaten biliyodur.Kankam C# ile yazılmış kodu VB ile nasıl decompiler ettin Çok isteyen olursa atarız kaynak kodunu.
Bu sitenin çalışmasını sağlamak için gerekli çerezleri ve deneyiminizi iyileştirmek için isteğe bağlı çerezleri kullanıyoruz.