Fetching POSTKEY
#1
Hey,

So I can fetch the post key, this code is very crude and done very fast
so don't even think about trolling me.

And some of it is copied from @iAegle

Code:
Private Function Login(ByVal User As String, ByVal Password As String) As Boolean Dim Data As New System.Collections.Specialized.NameValueCollection() Dim SData As New System.Collections.Specialized.NameValueCollection() Data.Add("username", User) Data.Add("password", Password) Data.Add("submit", "Login") Data.Add("action", "do_login") SData.Add("action", "add_shout") SData.Add("shout_data", "ASDASASD") Dim wb As New WebClient() Dim bytes As Byte() = wb.UploadValues("http://itsmods.com/forum/member.php", "POST", Data) My.Computer.FileSystem.WriteAllText("C:\rcrayon\bytes.txt", System.Text.Encoding.ASCII.GetString(bytes), False) ListBox1.Items.AddRange(System.IO.File.ReadAllLines("C:\rcrayon\bytes.txt")) Dim i As Integer For i = 0 To ListBox1.Items.Count - 1 If InStr(ListBox1.Items(i), "var my_post_key") Then Dim PostKey As Array Dim PostKeyTrimmed As String Dim PostKeyClean As String PostKey = Split(ListBox1.Items(i), "=") PostKeyTrimmed = Replace(PostKey(1), Chr(34), "") PostKeyClean = Replace(PostKeyTrimmed, ";", "") MsgBox("Your postkey is: " + PostKeyClean) SData.Add("postcode", PostKeyClean) End If Next Dim wb2 As New WebClient() Dim sbytes As Byte() = wb2.UploadValues("http://www.itsmods.com/forum/xmlhttp.php", "POST", SData) MsgBox(System.Text.Encoding.ASCII.GetString(sbytes)) Return True Return False End Function
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Reply

#2
so basically you can spam the whole shoutbox with this? Awesome
Reply

#3
Is the code trolling or are you ? (VB) Troll Lets have a look
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
Here is the latest:

Code:
Imports System.Net Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click status.Text = "Login Started..." Login("crayon", "xxxxxxxxxx") End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load status.Text = "Idle..." If My.Computer.FileSystem.DirectoryExists("C:\rcrayon") Then Exit Sub Else My.Computer.FileSystem.CreateDirectory("C:\rcrayon") End If End Sub Private Function Login(ByVal User As String, ByVal Password As String) Dim Data As New System.Collections.Specialized.NameValueCollection() Data.Add("username", User) Data.Add("password", Password) Data.Add("submit", "Login") Data.Add("action", "do_login") Dim wb As New WebClient() Dim bytes As Byte() = wb.UploadValues("http://itsmods.com/forum/member.php", "POST", Data) status.Text = "Sending Data..." If System.Text.Encoding.ASCII.GetString(bytes).Contains("successfully") Then status.Text = "Logged in as: " & User End If My.Computer.FileSystem.WriteAllText("C:\rcrayon\bytes.txt", System.Text.Encoding.ASCII.GetString(bytes), False) ListBox1.Items.AddRange(System.IO.File.ReadAllLines("C:\rcrayon\bytes.txt")) Dim i As Integer For i = 0 To ListBox1.Items.Count - 1 If InStr(ListBox1.Items(i), "var my_post_key") Then Dim SData As New System.Collections.Specialized.NameValueCollection() Dim PostKey As Array Dim PostKeyTrimmed As String Dim PostKeyClean As String PostKey = Split(ListBox1.Items(i), "=") PostKeyTrimmed = Replace(PostKey(1), Chr(34), "") PostKeyClean = Replace(PostKeyTrimmed, ";", "") SData.Add("go_to", "shoutbox") SData.Add("action", "add") SData.Add("my_post_key", Trim(PostKeyClean)) SData.Add("message", "ASDASASD") pkey.Text = Trim(PostKeyClean) Dim sbytes As Byte() = wb.UploadValues("http://www.itsmods.com/forum/index.php", "POST", SData) MsgBox(System.Text.Encoding.ASCII.GetString(sbytes)) End If Next End Function Private Sub StatusStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles StatusStrip1.ItemClicked End Sub Private Sub pkey_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub End Class
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Reply

#5
Code doesn't work: incorrect password xxxxxxxxxx
Reply

#6
Can't get it to post to shoutbox yet.
(02-08-2012, 23:53)SuperNovaAO Wrote: Code doesn't work: incorrect password xxxxxxxxxx


LOL!
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Reply

#7
(02-08-2012, 23:54)crAyon Wrote: Can't get it to post to shoutbox yet.

Just take a browser like Google Chrome, Apple Safari, Mozilla Firefox, (Opera) Opera, Netscape, ..... M$ IE? and go to the frontpage and shout there. LOL
Reply

#8
(02-08-2012, 23:58)SuperNovaAO Wrote:
(02-08-2012, 23:54)crAyon Wrote: Can't get it to post to shoutbox yet.

Just take a browser like Google Chrome, Apple Safari, Mozilla Firefox, (Opera) Opera, Netscape, ..... M$ IE? and go to the frontpage and shout there.

Oh no, that's far too easy.
Full source attached.


Attached Files
.zip   Form1.Designer.zip (Size: 3.98 KB / Downloads: 37)
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Reply

#9
what about this?

(in C#)
Code:
string Source = Encoding.Default.GetString( bytes ); int Offset = Source.IndexOf( "var my_post_key = " ); int End = Source.IndexOf( "\"", Offset + 1 ) + 1; string PostKey = Source.Substring( Offset + "var my_post_key = ".Length, End );
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#10
I'll update the JS Troll
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.