Sunday 30 December 2012

Source: [VB.NET] winAPI(wininet library) -Get page source [Example]

I previously wrote a FTP Class totally based on win API's, located here:  http://loyaltyhf.blogspot.com/2012/11/source-pure-win32-apis-ftp-class.html
So i decided to finger HTTP protocol via win APIs so here is what i pulled of real quick. Its just an example for using win API calls in .NET i don't recommend using it this can be done in just one line  using .NET.




Download: http://puu.sh/1HiJC

Thursday 13 December 2012

Source: Saving/Loading/Using cookies from a file [Example][HTTPWebRequest]

So yeah...i was working on a project i have to test a few features but i have to login every time i start my application but the website started "No No" after three consecutive loggins so i came up with the idea of saving session cookies to a file and loading 'em to login...

I decided to put an example togetter for you guys!

So this is how it works...save the "Global Cookie" container to a file via a structure along with other session info using serilization(i'm using binary) and load 'em everytime you need to login from that particular file("*.cok" in my case)....it's like webrequest based simulation of the "Remember Me" thing.

It can be also be used to use the same cookies for different applications...you can use the binder class to do that(in case you are willing to use the binary serialization :3)
you can also encrypt the cookies before saving them to the file and decrypt 'em back for using.

I'm using gamerage.com as an example(i wrote the example a while back for some dude just modifying it to save/load session cookies)



 Source Code: http://puu.sh/1AyEq

Tuesday 27 November 2012

Source: [Pure Win32 API's] FTP Class






The class is totally win32 based(wininet.dll) and commented and i'll try to update it asap...

The current methods are:
  • UploadFileUploadFiles(+1)
  • UploadDirectory
  • SetCurrentDirectory
  • CreateDirectory
  • GetLastResponse(Fetch the server response)
Events:

  • Uploading
  • Uploaded
  • UploadFailed
  • Response
Demo Download: http://puu.sh/1uTNZ

Thursday 15 November 2012

Source: TextNow Registeration Example

A guy on HF needed help with this so put this example together real quick...n decided to share it with u guys so yeah here you go...

Source: Luhn Algorithm(Check for valid Credit Card Numbers)

A few days back a guy on HF posted an app that checks if the given no is a valid credit card no. or not, the app on the back end was using a websites which was using Luhn Algorithm to check whether the no. is a valid credit card no. or not but hey who'll trust a website for a credit card no. so here is an implementation of Luhn Algorithm in vb.net to check if the cc no. is valid or not :)