24 |
25 |
26 |
27 |
28 |
29 | ## About The Project
30 |
31 |
32 | **Gecko** is a fast and efficient discord dm spammer and ID scraper
33 |
34 |
35 |
36 |
37 |
38 | ## Getting Started
39 |
40 | ### Download
41 |
42 | `git clone github.com/zLeki/Gecko`
43 | ### Example
44 | 
45 |
46 | ## Contributing
47 |
48 | Contributions are what make the open source community such an amazing place to
49 | learn, inspire, and create. Any contributions you make are **greatly
50 | appreciated**.
51 |
52 | If you have a suggestion that would make this better, please fork the repo and
53 | create a pull request. You can also simply open an issue with the tag
54 | "enhancement". Don't forget to give the project a star! Thanks again!
55 |
56 | 1. Fork the Project
57 | 2. Create your Feature Branch (`git checkout -b feat/amazing-feature`)
58 | 3. Commit your Changes with
59 | [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
60 | 4. Push to the Branch (`git push origin feat/amazing-feature`)
61 | 5. Open a Pull Request
62 |
63 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "bufio"
5 | "bytes"
6 | "encoding/json"
7 | "fmt"
8 | "github.com/fatih/color"
9 | "io"
10 | "io/ioutil"
11 | "log"
12 | "math/rand"
13 | "net/http"
14 | "os"
15 | "strconv"
16 | "time"
17 | )
18 |
19 | var client http.Client
20 | var words = []string{"virus!!!", "asm monkey", "leki shit coder fr fr", "github.com/zLeki", "idk", "buy my merch"}
21 |
22 | type ChannelData []struct {
23 | ID string `json:"id"`
24 | Type int `json:"type"`
25 | Content string `json:"content"`
26 | ChannelID string `json:"channel_id"`
27 | Attachments []interface{} `json:"attachments"`
28 | Embeds []interface{} `json:"embeds"`
29 | Mentions []interface{} `json:"mentions"`
30 | MentionRoles []interface{} `json:"mention_roles"`
31 | Pinned bool `json:"pinned"`
32 | MentionEveryone bool `json:"mention_everyone"`
33 | Tts bool `json:"tts"`
34 | Timestamp time.Time `json:"timestamp"`
35 | EditedTimestamp interface{} `json:"edited_timestamp"`
36 | Flags int `json:"flags"`
37 | Components []interface{} `json:"components"`
38 | Author struct {
39 | ID string `json:"id"`
40 | Username string `json:"username"`
41 | Avatar string `json:"avatar"`
42 | Discriminator string `json:"discriminator"`
43 | PublicFlags int `json:"public_flags"`
44 | Bot bool `json:"bot"`
45 | } `json:"author,omitempty"`
46 |
47 | MessageReference struct {
48 | ChannelID string `json:"channel_id"`
49 | GuildID string `json:"guild_id"`
50 | MessageID string `json:"message_id"`
51 | } `json:"message_reference,omitempty"`
52 | ReferencedMessage struct {
53 | ID string `json:"id"`
54 | Type int `json:"type"`
55 | Content string `json:"content"`
56 | ChannelID string `json:"channel_id"`
57 | Author struct {
58 | ID string `json:"id"`
59 | Username string `json:"username"`
60 | Avatar string `json:"avatar"`
61 | Discriminator string `json:"discriminator"`
62 | PublicFlags int `json:"public_flags"`
63 | } `json:"author"`
64 | Attachments []interface{} `json:"attachments"`
65 | Embeds []interface{} `json:"embeds"`
66 | Mentions []interface{} `json:"mentions"`
67 | MentionRoles []interface{} `json:"mention_roles"`
68 | Pinned bool `json:"pinned"`
69 | MentionEveryone bool `json:"mention_everyone"`
70 | Tts bool `json:"tts"`
71 | Timestamp time.Time `json:"timestamp"`
72 | EditedTimestamp time.Time `json:"edited_timestamp"`
73 | Flags int `json:"flags"`
74 | Components []interface{} `json:"components"`
75 | } `json:"referenced_message,omitempty"`
76 | }
77 | type GuidldChannelData []struct {
78 | ID string `json:"id"`
79 | LastMessageID string `json:"last_message_id,omitempty"`
80 | LastPinTimestamp time.Time `json:"last_pin_timestamp,omitempty"`
81 | Type int `json:"type"`
82 | Name string `json:"name"`
83 | Position int `json:"position"`
84 | ParentID string `json:"parent_id"`
85 | Topic interface{} `json:"topic,omitempty"`
86 | GuildID string `json:"guild_id"`
87 | PermissionOverwrites []struct {
88 | ID string `json:"id"`
89 | Type string `json:"type"`
90 | Allow int `json:"allow"`
91 | Deny int `json:"deny"`
92 | AllowNew string `json:"allow_new"`
93 | DenyNew string `json:"deny_new"`
94 | } `json:"permission_overwrites"`
95 | Nsfw bool `json:"nsfw"`
96 | RateLimitPerUser int `json:"rate_limit_per_user,omitempty"`
97 | Banner interface{} `json:"banner,omitempty"`
98 | Bitrate int `json:"bitrate,omitempty"`
99 | UserLimit int `json:"user_limit,omitempty"`
100 | RtcRegion interface{} `json:"rtc_region,omitempty"`
101 | }
102 |
103 | func title() {
104 | rand.Seed(time.Now().UnixNano())
105 | random := rand.Intn(len(words))
106 | clear()
107 | color.Green(`
108 |
109 | _
110 | | |
111 | __ _ ___ ___| | _____
112 | / _ |/ _ \/ __| |/ / _ \
113 | | (_| | __/ (__| < (_)|
114 | \__, |\___|\___|_|\_\___/
115 | __/ |
116 | |___/
117 |
118 | Gecko • Created by Leki#6796
119 | ` + words[random] + `
120 | `)
121 |
122 | }
123 | func clear() {
124 | for i := 0; i < 100; i++ {
125 | fmt.Print("\n")
126 | }
127 | }
128 |
129 | type Settings struct {
130 | Token string `json:"token"`
131 | Guild string `json:"guild"`
132 | Threads int `json:"threads"`
133 | Whitelisted string `json:"whitelisted"`
134 | Message string `json:"message"`
135 | }
136 |
137 | func MassDM(ids []string) {
138 | type ChannelInfo struct {
139 | ID string `json:"id"`
140 | Type int `json:"type"`
141 | LastMessageID interface{} `json:"last_message_id"`
142 | Recipients []struct {
143 | ID string `json:"id"`
144 | Username string `json:"username"`
145 | Avatar string `json:"avatar"`
146 | Discriminator string `json:"discriminator"`
147 | PublicFlags int `json:"public_flags"`
148 | Bot bool `json:"bot"`
149 | } `json:"recipients"`
150 | }
151 | f, _ := ioutil.ReadFile("settings.json")
152 | var settings Settings
153 | err := json.Unmarshal(f, &settings)
154 | if err != nil {
155 | log.Fatalf("Error opening settings", err)
156 | }
157 | token := settings.Token
158 | for _, v := range ids {
159 | var body = []byte(`
160 | {"recipients":["` + v + `"]}
161 | `)
162 | req, _ := http.NewRequest("POST", "https://discord.com/api/v9/users/@me/channels", bytes.NewBuffer(body))
163 | req.Header.Set("content-type", "application/json")
164 | req.Header.Set("Authorization", token)
165 | resp, _ := client.Do(req)
166 | var data ChannelInfo
167 | err := json.NewDecoder(resp.Body).Decode(&data)
168 | if err != nil {
169 | log.Println("Error decoding channel info: %v", err)
170 | os.Exit(0)
171 | }
172 | rand.Seed(time.Now().UnixNano())
173 | min := 30
174 | max := 90
175 | var body2 = []byte(`
176 | {
177 | "content": "` + settings.Message + `",
178 | "nonce": "23282321949104537` + strconv.Itoa(rand.Intn(max-min+1)+min) + `",
179 | "tts": false
180 | }
181 | `)
182 | req1, _ := http.NewRequest("POST", "https://discord.com/api/v9/channels/"+data.ID+"/messages", bytes.NewBuffer(body2))
183 | req1.Header.Set("content-type", "application/json")
184 | req1.Header.Set("Authorization", token)
185 | resp1, _ := client.Do(req1)
186 | dataByts, _ := ioutil.ReadAll(resp1.Body)
187 | log.Println(string(dataByts))
188 |
189 | }
190 | }
191 | func Pullids(guildid string) {
192 | var b = 0
193 | f, _ := ioutil.ReadFile("settings.json")
194 | var settings Settings
195 | err := json.Unmarshal(f, &settings)
196 | if err != nil {
197 | log.Println("Error opening settings", err)
198 | os.Exit(0)
199 | }
200 | token := settings.Token
201 | var ids = []string{}
202 | req1, _ := http.NewRequest("GET", "https://discord.com/api/guilds/"+guildid+"/channels", nil)
203 | req1.Header.Set("content-type", "application/json")
204 | req1.Header.Set("Authorization", token)
205 | resp1, _ := client.Do(req1)
206 | var data1 GuidldChannelData
207 | err = json.NewDecoder(resp1.Body).Decode(&data1)
208 | if err != nil {
209 | return
210 | }
211 | if resp1.StatusCode != http.StatusOK {
212 | errData, _ := ioutil.ReadAll(resp1.Body)
213 | log.Fatalf("Error sending request: %v", errData)
214 | }
215 | for _, v := range data1 {
216 |
217 | req, _ := http.NewRequest("GET", "https://discord.com/api/v9/channels/"+v.ID+"/messages?limit=100", nil)
218 | req.Header.Set("content-type", "application/json")
219 | req.Header.Set("Authorization", token)
220 | resp, _ := client.Do(req)
221 | if resp.StatusCode == 200 {
222 |
223 | defer func(Body io.ReadCloser) {
224 | err := Body.Close()
225 | if err != nil {
226 | log.Println("Error occured, err")
227 | return
228 | }
229 | }(resp.Body)
230 | var data ChannelData
231 | err := json.NewDecoder(resp.Body).Decode(&data)
232 | if err != nil {
233 | log.Println("Error decoding JSON: %v", err)
234 | return
235 | }
236 |
237 | for _, v := range data {
238 | if !contains(ids, v.Author.ID) {
239 | color.Green("[V] Pulled ID successfully! %v", b)
240 | ids = append(ids, v.Author.ID)
241 | b += 1
242 | }
243 | }
244 | }
245 | }
246 | color.Yellow("[-] Dming everyone..")
247 | MassDM(ids)
248 | }
249 | func contains(elems []string, v string) bool {
250 | for _, s := range elems {
251 | if v == s {
252 | return true
253 | }
254 | }
255 | return false
256 | }
257 | func menu() {
258 | title()
259 | color.Yellow("[1] Dm spam [2] Settings")
260 | input := bufio.NewScanner(os.Stdin)
261 | input.Scan()
262 | if input.Text() == "1" {
263 | title()
264 | color.Yellow("[i] Guild ID: >>> ") // would use a sql database but i dont want a monkey with my oracle online login
265 | input := bufio.NewScanner(os.Stdin)
266 | input.Scan()
267 | guildid := input.Text()
268 | Pullids(guildid)
269 | } else if input.Text() == "2" {
270 | log.Println("Unavailable option at the time.")
271 | time.Sleep(time.Second*3)
272 | os.Exit(0)
273 | }
274 | }
275 | func main() {
276 | menu()
277 |
278 | }
279 |
--------------------------------------------------------------------------------