Passwortüberprüfung

  • VB.NET

Es gibt 16 Antworten in diesem Thema. Der letzte Beitrag () ist von Marc.

    Passwortüberprüfung

    Hallo zusammen,

    ich brauche mal wieder eure Hilfe...
    Ich bin auf der Suche nach einer Lösung um zu überprüfen ob das Passwort auf ul.to geändert wird. Es handelt sich um ein Premium Account und eine ganze Abteilung hat das PW dazu. Wenn ein User auf die Idee kommt es zu ändern, soll der Teamleiter einen Alarm bekommen.

    Wie kann man das am besten lösen und hat dazu jemand einen Ansatz für mich? Ich denke da an ein minimiertes Programm, meinet wegen auch in den Tryicons in der Taskleiste, welches Alarm schlägt wenn sich das PW bei ul.to ändert. Wer kann mir da helfen?

    Besten Dank im Voraus und
    LG Marc
    Hey,

    Danke das hilft mir ein Stück weiter...

    Ich habe nun in der Zeile R.Host = "secure.schuelervz.net" folgenden Fehler erhalten: "Host" ist kein Member von "System.Net.HttpWebRequest".

    Leider weiß ich nicht woran das liegt. Im Tut wird es ja so angegeben. Ich wollte das grad vorher testen...
    Okay, jetzt klappt es mehr oder weniger.
    Allerdings bekomme ich nur Login fehlgeschlagen zurück...

    Was mache ich falsch - kann jemand helfen???


    HTTP Header:

    Quellcode

    1. http://uploaded.net/io/login
    2. POST /io/login HTTP/1.1
    3. Host: uploaded.net
    4. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
    5. Accept: text/javascript, text/html, application/xml, text/xml, */*
    6. Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    7. Accept-Encoding: gzip, deflate
    8. X-Requested-With: XMLHttpRequest
    9. X-Prototype-Version: 1.6.1
    10. Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    11. Referer: http://uploaded.net/
    12. Content-Length: 19
    13. Cookie: RT=si=jkf8&ss=1392556227259&sl=0&tt=0&obo=0&r=http%3A%2F%2Fuploaded.net%2F&ul=1392558065305&hd=1392558065333; __utma=91125214.1409814351.1391966326.1392556109.1392558517.8; __utmz=91125214.1392469098.5.2.utmcsr=adf.ly|utmccn=(referral)|utmcmd=referral|utmcct=/dCurA; __PPU_SESSION_2_3152__/file/yk1ik0q1=1391966529261|1|1391966529261|1|1; __PPU_SESSION_2_3152__/file/u20a3eit=1391968767319|1|1391968767319|1|1; ulmanagemax=100; PHPSESSID=2b57dc2c45ca387a49cc692a0246b708; __utmb=91125214.6.10.1392558517; __utmc=91125214
    14. Connection: keep-alive
    15. Pragma: no-cache
    16. Cache-Control: no-cache
    17. id=USER&pw=PASSWORT <----- HIER STEHT DER LOGIN IM KLARTEXT !!!!!!!!!!!!!!!
    18. HTTP/1.1 200 OK
    19. Date: Sun, 16 Feb 2014 13:51:01 GMT
    20. Server: Apache
    21. Expires: Thu, 19 Nov 1981 08:52:00 GMT
    22. Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    23. Pragma: no-cache
    24. Set-Cookie: login=%26id%3D1473415%26pw%3D98bcf334410605d7201fa076f82bd1589a43d618%26cks%3D97c7328c6153; expires=Mon, 16-Feb-2015 13:51:01 GMT; path=/; domain=.uploaded.net
    25. Set-Cookie: auth=147341574b6f8ddff60a31b6c1674f2abae4b56; expires=Wed, 15-Feb-2017 13:51:01 GMT; path=/; domain=.uploaded.net
    26. Vary: Accept-Encoding
    27. Content-Encoding: gzip
    28. Content-Length: 30
    29. Keep-Alive: timeout=3, max=100
    30. Connection: Keep-Alive
    31. Content-Type: application/javascript; charset=ISO-8859-1



    Mein VB Code:

    VB.NET-Quellcode

    1. Imports System.Net
    2. Imports System.IO
    3. Imports System.Text.RegularExpressions
    4. Public Class Form1
    5. Private Containa = New CookieContainer
    6. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    7. 'Dim Source As String = New WebClient().DownloadString("http://uploaded.net/io/login")
    8. 'Dim FormKey As String = Regex.Match(Source, "formkey"" value=""([^""]+)""").Groups(1).Value
    9. 'Dim Iv As String = Regex.Match(Source, "iv"" value=""([^""]+)""").Groups(1).Value
    10. Dim R As HttpWebRequest = HttpWebRequest.Create("http://uploaded.net/io/login")
    11. R.Method = "POST"
    12. R.CookieContainer = Containa
    13. 'R.Connection = "uploaded.net"
    14. 'R.Host = "uploaded.net"
    15. R.Headers("useragent") = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0"
    16. R.ContentType = "application/x-www-form-urlencoded"
    17. Dim Post As String = "id=USER&pw=PASSWORT" '<--- GENAU WIE IN DER HEADER OBEN!!!
    18. R.ContentLength = Post.Length
    19. Dim Writer As New StreamWriter(R.GetRequestStream(), System.Text.Encoding.ASCII)
    20. Writer.Write(Post)
    21. Writer.Close()
    22. Dim Reader As New StreamReader(R.GetResponse.GetResponseStream())
    23. Dim Response As String = Reader.ReadToEnd
    24. Reader.Close()
    25. If Response.Contains("uploaded.net - Profile") Then '<--- OB DAS IN DEN ("") SO RICHTIG IST WEISS ICH AUCH NICHT
    26. MessageBox.Show("Erfolgreich eingeloggt!")
    27. Else
    28. MessageBox.Show("Login fehlgeschlagen!")
    29. End If
    30. End Sub
    31. End Class
    Mach mal oben auf die Zeile 34 deines Codes (If Response.Contains("uploaded.net - Profile") Then) einen Haltepünkt und lass dein Programm bis dahin ausführen. Wenn er dann am Haltepunkt ankommt, lässt du dir im Überwachungsfenster oder im Direktfenster (Strg+G) den Inhalt von Response anzeigen. Das ist der HTML-Quelltext, den der Server nach dem Loginversuch an den Client (normalerweise ein Browser) zurückschickt. Dort kannst du dann stöbern und relativ leicht ersehen, welcher Text in welchem Fall (Login erfolgreich/fehlgeschlagen) darin enthalten ist und dann weißt du auch, was in Zeile 34 in dein String-Literal muss, um herauszufinden, ob die Login-Daten passten oder nicht.

    Sofern du mit dieser "eingeloggten Session" nicht weiterarbeiten sondern wirklich nur testen willst, ob der Login klappt, kannst du die Geschichte mit den Cookies erstmal beseite lassen.
    Weltherrschaft erlangen: 1%
    Ist dein Problem erledigt? -> Dann markiere das Thema bitte entsprechend.
    Waren Beiträge dieser Diskussion dabei hilfreich? -> Dann klick dort jeweils auf den Hilfreich-Button.
    Danke.
    Das ist eigentlich sogar einfacher:
    Du deklarierst einen Cookiecontainer und ein WebClient-Objekt. Diesem weist Du den CookieContainer zu.
    Dann nutzt Du einmal WebClient.GetString um Dir die Cookies zu holen.
    Dann brauchst Du eine NameValueCollection, zu der Du die Parameter hinzufügst.
    Dann kannst Du diese einfach per WebClient.UploadValues hochlaen.
    Das hier???
    Eine Ausnahme (erste Chance) des Typs "System.Net.WebException" ist in System.dll aufgetreten.
    Eine Ausnahme (erste Chance) des Typs "System.Net.WebException" ist in System.dll aufgetreten.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.My.MyApplication.New" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.My.MyApplication.__ENCAddToList" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "System.Activator.CreateInstance<System.__Canon>" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.My.MyApplication.OnCreateMainForm" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "System.Activator.CreateInstance<System.__Canon>" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.My.MyApplication.OnCreateMainForm" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.My.MyProject.MyForms.Form1.get" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.Form1.Form1" wird übersprungen.
    Einzelschritt: Nichtbenutzercode "Check_ul.to_Account.Form1.__ENCAddToList" wird übersprungen.
    Das steht garantiert nicht in deiner Variablen "Response" drin.
    Wenn das Programm unterbricht, machst du mal nen Rechtsklick auf die Variable "Response" und wählst aus dem Kontextmenü dann den Punkt "Schnellüberwachung".
    Weltherrschaft erlangen: 1%
    Ist dein Problem erledigt? -> Dann markiere das Thema bitte entsprechend.
    Waren Beiträge dieser Diskussion dabei hilfreich? -> Dann klick dort jeweils auf den Hilfreich-Button.
    Danke.
    Glaub ich nicht. Der Text steht üblicherweise im Ausgabefenster. Das Direktfenster ist was anderes.
    Außerdem geht es nicht darum, was im Direktfenster steht, sondern was in der Variablen Response steht. Und das kann man (unter vielen anderen Möglichkeiten) auch über das Direktfenster erfahren, indem man in selbigem den Befehl "?Response" eingibt.

    Lern mal die Werkzeuge, die Visual Studio dir bietet, richtig zu nutzen ;)
    Weltherrschaft erlangen: 1%
    Ist dein Problem erledigt? -> Dann markiere das Thema bitte entsprechend.
    Waren Beiträge dieser Diskussion dabei hilfreich? -> Dann klick dort jeweils auf den Hilfreich-Button.
    Danke.
    Ahhhh ich habe das falsch gemacht. Der richtige Link ist upladed.net/#login...

    Hier kommt jetzt:

    HTML-Quellcode

    1. ?Response
    2. "<!doctype html> <html lang="en"> <head> <script> LOGN = {}; LOGN.pg = 'start'; (function(d, s) { var js = d.getElementsByTagName(s)[0], ln = d.createElement(s); BOOMR_lstart=new Date().getTime(); ln.src = '//lognormal.net/boomerang/dca725193d6e8c4689708aa8259302fd79baea0e74d63c46dfa4f2a4'; js.parentNode.insertBefore(ln, js); })(document, 'script'); </script> <title>uploaded.net</title> <base href="http://uploaded.net:80/" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="revisit-after" content="1 days" /> <meta name="description" content="the easiest way to backup and share your files with everyone." /> <meta name="keywords" content="uploaded, ul, uploaded.to, ul.to, upload, download, free, premium, one click hoster, och, sharehoster" /> <meta name="author" content="uploaded.net" /> <meta name="owner" content="uploaded.net" /> <meta name="RATING" content="General"> <meta name="language" http-equiv="c
    3. ontent-language" content="en" /> <meta property="og:video" content="http://staticcdn.uploaded.net/video/intro.mp4" /> <meta property="og:video:height" content="1000" /> <meta property="og:video:width" content="529" /> <meta property="og:video:type" content="video/mp4" /> <meta property="og:image" content="http://uploaded.net/img/e/start/logo.png" /> <!--<meta property="fb:page_id" content="217881528283333" />--> <link rel="stylesheet" href="img/layout.css" /> <link rel="stylesheet" href="img/noIE.css" /> <link rel="icon" href="favicon.ico" type="image/x-icon" /> <script type="text/javascript" src="js2/protoculous.js?v=1"></script> <script type="text/javascript" src="js2/app.js"></script> <script type="text/javascript" src="js2/history.js"></script><script type="text/javascript" src="js2/yahoo-dom-event.js"></script><script type="text/javascript" src="js2/element-min.js"></script><script type="text/javascript" src="js2/uploader-min.js"></script><script typ
    4. e="text/javascript" src="js2/jwplayer.js"></script><script type="text/javascript" src="js/script.js"></script><script type="text/javascript" src="js/start.js"></script><link rel="stylesheet" href="img/layout.css" /><link rel="stylesheet" href="img/noIE.css" /> <style type="text/css"> @font-face { font-family:'Signika'; font-style:normal; font-weight:400; src:local('Signika-Regular'), url('misc/font/signika400.woff') format('woff'); } @font-face { font-family:'Signika'; font-style:normal; font-weight:300; src:local('Signika-Light'), url('misc/font/signika300.woff') format('woff'); } @font-face { font-family:'Signika'; font-style:bold; font-weight:600; src:local('Signika-Semibold'), url('misc/font/signika600.woff') format('woff'); } b { font-weight:normal; } a { cursor:pointer } button, b, input[type=text], input[type=password], h1, h2, h3 { font-family:Signika,'Trebuchet MS' } body { background:#0e70cb url(img/e/start/bg.png) repeat-x top center; } .sbackground { width:100%; height:100
    5. %; } .vborder { width:1px; height:100%; background:#fff; border-left:1px solid #eee } #app { font-family: Signika,'Trebuchet MS'; } #senv { z-index:-1; position:absolute; top:0; right:0; bottom:0; left:0; width:100%; min-height:500px; height:100%; background:url(img/e/start/environment.jpg) top center no-repeat; } #slogo { width:300px; height:300px; position:relative; margin-top:195px; left:50%; margin-left:-140px } #slogo:hover #c2u { opacity:.8; top:-20px; } #ishadow { margin:268px 0 0 -35px } #islot { z-index:99999; position:absolute; bottom:16px; width:1px; left:50%; height:1px; background:#2085d3; border-bottom:1px solid #57a8e1; box-shadow:0 -1px 2px #3694dc,0 1px 5px #65b0e5 } #c2u { opacity:0; position:absolute; letter-spacing:0.05em; top:-50px; left:76px; text-transform:uppercase; font-weight:400; text-shadow:none; background:rgba(0,0,0,.08); padding:3px 6px 3px; width:92px; border-radius:5px; font-size:10px; color:rgba(255,255,255,.8); box-shadow:0 -1px 1px rgba(255,25
    6. 5,255,.1), 0 -1px 1px rgba(0,0,0,.03) inset; -moz-transition:all .6s ease-out; -webkit-transition:all .6s ease-out; -o-transition:all .6s ease-out; -ms-transition:all .6s ease-out; transition:all .6s ease-out; } #c2u div { position:absolute; width:11px; height:6px; left:50%; bottom:-6px; margin-left:-5px; background:url(../img/e/start/intro.png) 0 -168px } #uploads { padding:15px 0 10px } #uploads .uploadWeb .mask { background:url(../img/e/start/intro.png) } #uploads .uploadWeb p { text-align:left; top:25px; } #uploads .uploadWeb span { text-align:left; } #uploads .uploadWeb h1 span { text-shadow:#326ab9 0 1px 1px } #uploads .uploadWeb a { width:100%; padding:0; margin:0; } #theu { z-index:1001; position:absolute; width:300px; bottom:18px; overflow:hidden } #particles { overflow:hidden; position:absolute; width:100%; height:270px; top:230px; } #particles div { position:absolute; height:100%; } #particles .particle { z-index:1000; position:absolute; width:135px; height:135px
    7. ; background:url(img/e/start/particle_file.png) -200px 0 } #icontent { position:relative; z-index:1002; max-width:960px; width:100%; margin:35px auto 0; color:#fff !important } #icontent h1 { font-family: Signika,'Trebuchet MS'; font-weight:400; text-shadow:0 2px 3px #166bb5; font-size:22px; color:#fff; line-height:24px; position:relative; } #icontent h1 a, #icontent h1 .a { color:#fff; } #icontent h1 small { font-size:16px; line-height:20px; color:rgba(255,255,255,.8); font-family: Signika; font-weight:300 } #icontent h1 #video_play { float:left; margin:-12px auto 0 45px; background:url(/img/e/start/intro.png?1=2) 0 -187px; width:85px; height:72px } #video { box-shadow:0 0 5px rgba(0,0,0,.4);height:529px;left:50%;margin:-120px 0 0 -500px;position:absolute;width:1000px;z-index:214748; } #video_close { opacity:.7;cursor:pointer;position:absolute;top:10px;left:10px;font-size:30px;padding:1px 15px 5px;background:#24323f;border-radius:3px;color:#fff } #video_close:hover { opacity:1 }
    8. #foot { padding:12px 0 30px; background:none; text-align:center; } #foot a { color:#9fd5ff; font-weight:300; text-shadow:#1264ac 0 1px 2px } #foot a:hover { text-decoration:none; color:#fff; text-shadow:none } #foot a:active, #icontent h1 a:hover { color:#0b3f70; text-shadow:#3a92d7 0 1px 0 } #center { position:relative; width:970px; height:500px; margin:190px auto -190px; } </style> </head> <body> <form action="http://uploaded.to" style="display:none;" id="guestvars"> <input type="text" name="id" id="guestid" style="display:none;" value="" /> <input type="password" name="pw" id="guestpw" style="display:none;" value="" /> </form><div id="intro"></div> <div id="head" style="display:none"></div> <div id="app" class="sbackground"> <div id="senv"></div> <div id="login" class="box" style="z-index:999999;display:none;margin-left:-145px;left:50%;top:250px;padding:0"> <form method="post" action="io/login" style="margin-top:16px"> <input type="text" name="id" value="Account-ID" st
    9. yle="" /> <input type="text" name="pw" value="Password" /> <div> <button type="submit">Login</button><b class="a">Forgotten password?</b> </div> </form> </div> <div id="register" class="box" style="z-index:999999;display:none;position:absolute;margin-left:-270px;left:50%;top:200px;padding:0"> <form method="post" action="io/register/free" style="margin:16px 20px 22px;width:500px"> <table> <tr><td style="width:100px"> <div style="width:80px;height:74px;margin:12px 0 0 10px;background:url(../img/e/start/intro.png) 0 -91px"></div> </td> <td style="width:20px"><div class="vborder" style="height:100px"></div></td> <td class="aL" style="font-weight:300"> <h2>Please sign up in order to transfer files</h2> <p>After entering your eMail addres and receipt of your registration you'll simultaneously receive your personal access data from us.</p> <p style="font-weight:400" id="regstatus">This is always free of charge.</p> </td></tr> </table> <div style="mar
    10. gin:5px 0 62px"> <input type="text" name="mail" value="eMail address" style="width:355px;margin:5px 0 14px 5px" /> <button type="submit" style="margin:6px 0 0 15px;line-height:16px">Register</button> </div> </form> </div> <div id="video" style="display:none;"> <div id="video_container"></div> <div id="video_close" style="">x</div> <script type="text/javascript"> jwplayer('video_container').setup({ 'flashplayer': '/js2/player.swf', 'file': 'http://staticcdn.uploaded.net/video/intro.mp4', 'skin': 'img/assets/bekle.zip', 'width': '1000', 'height': '529', 'provider': 'http', 'http.startparam': 'starttime', 'plugins': { "sharing-3": { 'code': "%3Cembed%20src%3D'http%3A%2F%2Fuploaded.net%2Fjs2%2Fplayer.swf'%20height%3D'529'%20width%3D'1000'%20allowscriptaccess%3D'always'%20allowfullscreen%3D'true'%20flashvars%3D'%26controlbar%3Dover%26file%3Dhttp%3A%2F%2Fstaticcdn.uploaded.net%2Fvideo%2Fviral.mp4%26plugins%3Dsharing-3%
    11. 26sharing.link%3Dhttp%3A%2F%2Fuploaded.net%2Fstart'%20%2F%3E", 'link': "http://uploaded.net/start" } }, events: { onComplete: function() { oStart.hideVideo(); } } }); </script> </div> <div id="slogo" class="aC"> <div id="c2u">click to upload<div></div></div> <img src="img/e/start/shadow_logo.png" id="ishadow" style="width:40%;margin-top:278px;display:none" /> <div id="islot" style="opacity:0"></div> <div id="theu" style="cursor:pointer;display:none;height:10px" onclick="oStart.go2('register')"><img src="img/e/start/logo.png" /></div> <div style="cursor:pointer;position:absolute;z-index:9999;top:0;width:100%;height:300px" id="nupload"></div> </div> <div id="particles"> <div class="spleft" style="left:0px"></div> <div class="spright" style="right:0px"></div> </div> <div id="icontent"> <div class="aC" style="width:650px;margin:0 auto"> <h1 id="headline" style="min-height:28px"><div id="video_show" st
    12. yle="margin-bottom:8px;text-align:left;cursor:pointer"><div id="video_play"></div>Store &amp; share your files with uploaded.net<br /><small>Learn more about our services (video)</small></div></h1> </div> <div id="uploads"></div> <div style="width:100%;height:50px;margin-bottom:-44px;background:url(img/e/start/intro.png) 0 -40px"></div> <div id="foot"> <a href="#login">Login</a> &middot; <a href="register">Register</a> &middot; <a href="offer">Our offer</a>&middot; <a href="press">Press</a> &middot; <a href="legal">TOS & Guidelines</a> &middot; <a href="affiliate">Affiliate program</a> &middot; <a href="corporate">Corporate products</a> &middot; <a href="help">Support</a> &middot; <a href="/takedown/notice">Takedown</a>&middot; <a href="about">Contact</a> </div> </div> </div> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-34088231-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('scr
    13. ipt'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></body> </html>"