تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
تسجيل الدخول للفيس بوك من خلال HttpWebRequest
#11
هل من طريقه من استخراج الاكسس توكن عن طريق برنامجي ؟
و بالطبع بعد تسجيل الحساب

(19-05-18, 07:18 PM)mrnooo2000 كتب : جرب هذه الدالة ربما تكون أسرع 


كود :
   Sub login(ByVal email As String, ByVal password As String)
       If email = String.Empty AndAlso password = String.Empty Then
           MsgBox("Put your email & password", 0, "Input data")
       Else
           Dim postData As String = "email=" & email & "&pass=" & password & ""
           Dim tempcookies As New CookieContainer
           Dim encoding As New UTF8Encoding
           Dim byteData As Byte() = encoding.GetBytes(postData)
           Dim postreq As HttpWebRequest = DirectCast(HttpWebRequest.Create("https://www.facebook.com/login.php?iphone&next=http%3A%2F%2Ftouch.facebook.com%2Findex.php%3Feu%3DD0sS06p7LA4Jn5QzzqNH​Qg&refsrc=http%3A%2F%2Ftouch.facebook.com%2F"), HttpWebRequest)
           postreq.Method = "POST"
           postreq.KeepAlive = True
           postreq.CookieContainer = tempcookies
           postreq.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre"
           postreq.ContentType = "application/x-www-form-urlencoded"
           postreq.Referer = "https://www.facebook.com/campaign/landing.php?&campaign_id=416642168442271&extra_1=s%7Cc%7C252977459990%7Cb%7Cfeas%20book%7C&placement=&creative=252977459990&keyword=feas%20book&partner_id=googlesem&extra_2=campaignid%3D160380079%26adgroupid%3D8949273799%26matchtype%3Db%26network%3Dg%26source%3Dnotmobile%26search_or_content%3Ds%26device%3Dc%26devicemodel%3D%26adposition%3D1o2%26target%3D%26targetid%3Dkwd-6653405681%26loc_physical_ms%3D9073644%26loc_interest_ms%3D%26feeditemid%3D%26param1%3D%26param2%3D&gclid=EAIaIQobChMIk-ikvq6P2wIVCt0bCh07bg1MEAMYAiAAEgK5NfD_BwE"
           ' postreq.Referer = "http://touch.facebook.com/login.php?next=http%3A%2F%2Ftouch.facebook.com%2Findex.php%3Feu%3DD0sS06p7LA4Jn5​QzzqNHQg&refsrc=http%3A%2F%2Ftouch.facebook.com%2F&_rdr"
           postreq.ContentLength = byteData.Length
           Dim postreqstream As Stream = postreq.GetRequestStream()
           postreqstream.Write(byteData, 0, byteData.Length)
           postreqstream.Close()
           Dim postresponse As HttpWebResponse
           postresponse = DirectCast(postreq.GetResponse, HttpWebResponse)
           tempcookies.Add(postresponse.Cookies)
           logincookie = tempcookies
           Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
           Dim thepage As String = postreqreader.ReadToEnd

           If thepage.Contains("Incorrect email/password combination") = True Then
               MsgBox("Incorrect email/password combination", 0, "Login error!")
           Else
               MsgBox("Logged in", 0, "Success!")
           End If
           If thepage.Contains("You have exceeded the number of invalid login attempts that we allow for your account") = True Then
               MsgBox("You have exceeded the number of invalid login attempts", 0, "Max number of wrong logins")
           End If
       End If
   End Sub
و ما فائده هذا الكود و احتاج شرح له ..
الرد }}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  فكرة تسجيل الحضور اليومي عبد العزيز البسكري 29 653 26-02-24, 02:15 PM
آخر رد: saud1004
  كيفية انشاء سكريبت لقاعدة بيانات من خلال الكود heem1986 1 194 20-02-24, 12:00 AM
آخر رد: Kamil
  التحقق من خلال محتوى خلية عن طريق textbox صالح عبدالله 2 222 24-01-24, 12:54 PM
آخر رد: صالح عبدالله
  معرفة عدد الاشهر خلال فترة زمنيةمعينة boofa2022 0 170 01-01-24, 01:18 PM
آخر رد: boofa2022
  [VB.NET] السلام عليكم ممكن مساعدة اخوان احتاج يكون تسجيل الدخول textbox1 + textbox2 Coder_iraqii 4 400 18-12-23, 06:46 PM
آخر رد: Kamil
  تسجيل الدخول من قاعدة البيانات um_noor20 3 374 19-10-23, 02:40 PM
آخر رد: aljzazy
  كيفية التحكم فى حجم الفورم من خلال الكود Ahmed.vb 4 510 11-10-23, 07:17 PM
آخر رد: bidaya
  عرض تقرير كريستال ريبورت من خلال دالة atefkhalf2004 0 284 23-09-23, 10:07 AM
آخر رد: atefkhalf2004
  [سؤال] مشكلة تسجيل وقت فقط بحقل جدول SQL dr.programming 2 304 01-09-23, 04:32 AM
آخر رد: اسامه الهرماوي
Rainbow [كود] كود الدخول على قائمه Run محمد مسافر 2 374 27-07-23, 02:26 AM
آخر رد: محمد مسافر

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم