The C# wrapper and StringExtension.cs and be found here http://forum.logicalgamers.com/progr...structure.htmlCode:public static Boolean GaiaLogin(string username,string password) { string pd = StringExtensions.gsb((wrapper.get("http://www.gaiaonline.com/")), "</fieldset>", "</form>").Replace("data-value", "").Replace("<a name", "").Replace("value=\"value", ""); List<string> n = StringExtensions.gasb(pd, "name=\"", "\""); List<string> v = StringExtensions.gasb(pd, "value=\"", "\""); string postdata = n[0] + "=" + v[0] + "&" + n[1] + "=" + v[1] + "&" + n[2] + "=" + v[2] + "&" + n[3] + "=" + v[3] + "&" + "username=" + username + "&password=" + password; string login = wrapper.post("http://www.gaiaonline.com/auth/login/", postdata); login = wrapper.get("http://www.gaiaonline.com/"); return login.Contains("Welcome back"); }
Results 1 to 16 of 16
Thread: [C#] GaiaOnline login (4/2/2013)
- 01 Feb. 2013 11:24pm #1
Moderator Bachelor of Science in Virginity
- Age
- 31
- Join Date
- Nov. 2009
- Location
- Toronto
- Posts
- 5,421
- Reputation
- 546
- LCash (Rank 3)
- 1.96
[C#] GaiaOnline login (4/2/2013)
Last edited by Stapled; 03 Apr. 2013 at 12:11am. Reason: Changed a few lines - Thanks Arti & Charles
- 01 Feb. 2013 11:37pm #2
Looks nice.
Good work.
- 02 Feb. 2013 12:00am #3
It looks good, though at the end you should just be able to go:
Code:return login.Contains("Welcome back")
- 02 Feb. 2013 12:04am #4
Moderator Bachelor of Science in Virginity
- Age
- 31
- Join Date
- Nov. 2009
- Location
- Toronto
- Posts
- 5,421
- Reputation
- 546
- LCash (Rank 3)
- 1.96
- 02 Feb. 2013 12:17am #5
I don't know C#, so forgive my potential ignorance, but is the ToString method necessary for all the v[#]? I'm assuming gasb() is string between, which I imagine returns a string to begin with, so no use that method, which would make the code a lot more readable. And blahblahblah microoptimization.
- 02 Feb. 2013 12:57am #6
Moderator Bachelor of Science in Virginity
- Age
- 31
- Join Date
- Nov. 2009
- Location
- Toronto
- Posts
- 5,421
- Reputation
- 546
- LCash (Rank 3)
- 1.96
- 02 Feb. 2013 03:26am #7
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.83
Dang, that's nice. I wish I could find an easy way to search for field names and values like that, but in Java lol.
- 02 Feb. 2013 06:07am #8
- 02 Feb. 2013 06:33am #9
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.44
- 02 Feb. 2013 03:26pm #10
- 02 Feb. 2013 04:28pm #11
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 1.48
- 09 Mar. 2013 05:55am #12
Put into Vb.net:
Code:Public Shared Function GaiaLogin(username As String, password As String) As [Boolean] Dim pd As String = StringExtensions.gsb((wrapper.[get]("http://www.gaiaonline.com/")), "</fieldset>", "</form>").Replace("data-value", "") Dim n As List(Of String) = StringExtensions.gasb(pd, "name=""", """") Dim v As List(Of String) = StringExtensions.gasb(pd, "value=""", """") Dim postdata As String = ((((((n(0) + "=" + v(0) & "&") + n(1) & "=") + v(1) & "&") + n(2) & "=") + v(2) & "&") + n(3) & "=") + v(3) & "&" & "username=" & username & "&password=" & password Dim login As String = wrapper.post("http://www.gaiaonline.com/auth/login/", postdata) login = wrapper.[get]("http://www.gaiaonline.com/") Return login.Contains("Welcome back") End Function
- 09 Mar. 2013 05:58am #13
lol VB. Stapled also already has one in VB btw.
- 09 Mar. 2013 06:00am #14
- 09 Mar. 2013 06:38am #15
You guys might want to post these to Guides or Public Programs. Just throwing that out there. If there is any of this you don't want the public accessing, now that guides/progs has the 10 post/3 day requirement.
- 20 Mar. 2013 11:53pm #16
Oh so you just took out the part that they keep changing and made it so it would grab the changed part every time? Clever! And thanks now I can finish updating some older bots!