Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Sunday, February 26, 2012

Thread Ripper

Thread ripper is a tool coded in C# and as it's name suggest it's a link ripping tool from threads(web forums)It is designed for special case scenarios like you had a 1000 page pictures thread in any web forum and you accidentally deleted all those images from your HDD,and want to recollect them all.Then thread ripper can be a good solution for you.

how it works......
STEP 1.
first find the target thread you want to grab pics/links from.
suppose it's http://www.whitegadget.com/pc-wallpapers/3853-katrina-kaif-wallpaper.html
now this thread has 45 pages.

STEP 2.
Analyze the link structure

if don't already know,this window opens by right clicking on any image and selecting view image info in Firefox,you can directly see page source if this option is unavailable to you for some reason.As you can see all images in this thread starts with http://www.whitegadget.com/attachments/ so it will be much easier to find now.

STEP 3.
Setting thread ripper

We already know that we are using this
 http://www.whitegadget.com/pc-wallpapers/3853-katrina-kaif-wallpaper.html
thread as target.So lets see how pages are managed in this thread,try to copy the link for page 2
http://www.whitegadget.com/pc-wallpapers/3853-katrina-kaif-wallpaper-2.html
similarly
http://www.whitegadget.com/pc-wallpapers/3853-katrina-kaif-wallpaper-3.html
so now we know how pages are managed in this thread or we can say this web-forum.






1. Target URL :  http://www.whitegadget.com/pc-wallpapers/3853-katrina-kaif-wallpaper-
(Note: we are going to use multi page option here and  the page no. will be added after the url so we are not using .html at the end of the target URL,if you are going to use a single page then you have to paste the complete URL.)


2. Search for : http://www.whitegadget.com/attachments/

3. Stop at : border="0"

Why? because when you open page source and analyze the link it will look like this.........


< img src="http://www.whitegadget.com/attachments/pc-wallpapers/2826d1199878479-katrina-kaif-wallpaper-katrinainterweb1.jpg" border="0" alt="Name: Katrinainterweb1.jpg Views: 28465 Size: 79.9 KB" />


and we just need  http://www.whitegadget.com/attachments/............................jpg   part of all images,that's why.

4. Enable multy page option,now you can enter range of page no. you want to grab the links.
5. we are going to start from page 1
6. to page 5
7.  Have to add .html at the end of the link.
8. lets run this puppy.


9. 168 links found! You can save this links in a text file and import it to IDM or any other download manager.

There are some other options which i didn't mention yet,lets talk about that.

- Replace : With
This feature is useful when downloading images from thumbnails etc.For example some host like http://picscrazy.com didn't allow direct linking of images instead they provide thumbnails of images.
so the link in the forum looks like this...
http://picscrazy.com/thumb/abcd.jpg 
but the link for original image will be...
http://picscrazy.com/image/abcd.jpg 
So in such case you can replace thumb with image.

-offline sorting
This feature allows you to edit the resultant links in offline mode,keep reading for more detail on this option

Target URL : http://forums.superiorpics.com/ubbthreads/ubbthreads.php/topics/3481355#Post3481355
In this thread images are from different sources(different servers) so we have to grab all the image links in it and filter the links we want.


If you can see,there are many different image links including forum avatars,signatures,adds and some html parts,lets clean this mess.The links we are interested in,starts with http://img and ends with ".
Enable the offline sorting,two buttons will be enabled inside it.First one << is a back button if any thing goes wrong you can go back to previous result.The second one performs the sorting,just enter what to search,where to stop and replace:with (optional) and press this button.like this......

After sorting we have left only with plain image links that we were interested.

 -Save Settings
Simple and sweet save settings button saves all the information in the Search for,Stop At,Replace,With text boxes in the settings.ini file,so you can use them later to search links from the same thread or web-forum.

That's all folks. :)

Download Thread Ripper-
http://praveenverma.co.nr/support/Thread_ripper.rar




Wednesday, January 12, 2011

Tricks for custom form design in VB.NET

In this tutorial we are going to learn some simple tricks for changing a simple form to cool design in VB.NET (i am using 2005) off-course beginners level.

 

so which one is looking cool to you?I hope that's the right one.
lets see how to achieve this,first choose an image(better to select *.png or *.gif with transparent background) which you want to use as your form template,you can do this by selecting BackgorundImage in form properties or you can use me.BackgroundImage and remember to add it as a resource file not a local file.once your image is imported you have to set it's layout by  
BackgroundImageLayout=None or  me.BackgroundImageLayout=ImageLayout.None 
and change the form size to cover the image completely,something like
 
we are allmost done just have to hide the original form which holds our image,this is a two step process
1.) Hide the form border.
2.) Make transparent the form background.

first step is easy just go to form properties and set 
FormBorderStyle=None or me.FormBorderStyle=Windows.Forms.FormBorderStyle.None 
however when you make your form border-less you can't move it,So we have to add some extra code here to avoid that problem.Copy this code anywhere in your form coding body.
#Region " ClientAreaMove Handling "
    Const WM_NCHITTEST As Integer = &H84
    Const HTCLIENT As Integer = &H1
    Const HTCAPTION As Integer = &H2
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = HTCLIENT Then m.Result = HTCAPTION
                'If m.Result.ToInt32 = HTCLIENT Then m.Result = IntPtr.op_Explicit(HTCAPTION) 'Try this in VS.NET 2002/2003 if the latter line of code doesn't do it... thx to Suhas for the tip.
            Case Else
                'Make sure you pass unhandled messages back to the default message handler.
                MyBase.WndProc(m)
        End Select
    End Sub
#End Region
now your form can move even without a border (don't ask me how this code works cause i don't completely  understand either,and all credit goes to the original coder)

Second step is pretty easy you just have to set form backcolor to transparent however you can't set 
BackColor=Transperant   or Me.BackColor = Color.Transparent 
because this is not supported by VB.NET.
so again need to do a little trick here,go to form properties and set BackColor to anycolor which is rarely used and ensure you are not  going to use it any where else.(In this case i am using hot pink,because that would be the most ugly color for me :P ) so again form properties
BackColor=HotPink or Me.BackColor = Color.HotPink
now we have to set the TransparencyKey exaclty same to color we choose (in this case HotPink)
TransparencyKey=HotPink or Me.TransparencyKey = Color.HotPink

that's it! your form is now boderless and transparent and after some coding this will look like......
isn't it cool? now go make one for yourself  :)

Thursday, May 13, 2010

Reticle Drawer: A custom crosshair maker for FPS games.

Sometimes when playing this FPS(first person shooter) games like UT or Counter Strike,the thing which i want to change is that little rarely visible cross-hair,off-course there are custom cross-hair are available for this games but manually changing it separately for each game is kinda too much thing.So i code a simple tool in vb.net to just create some circle and line on top of the given window...it uses a D3D not Open GL and actually coded for http://gamehacking.com on somebody's request...

reticle drawer....

a test run on UT2004

and team fortress 2


Note: Working of this tool is a matter of you graphics and system/hardware configuration.

you can download this tool from:

http://praveenverma.co.nr/support/reticle.rar