Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kakifantom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pp_coalition
kakifantom
Commits
bf93f4c8
Verified
Commit
bf93f4c8
authored
Jun 24, 2023
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
Fixes
parent
a1897871
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
discovered.go
+1
-1
1 addition, 1 deletion
discovered.go
sendMeme.go
+8
-0
8 additions, 0 deletions
sendMeme.go
with
9 additions
and
1 deletion
discovered.go
+
1
−
1
View file @
bf93f4c8
...
...
@@ -47,7 +47,7 @@ func Discover(d Discovered) error {
return
}
if
det
.
Score
<
-
1
0
{
if
det
.
Score
<
0
{
log
.
Println
(
"Shitty host detected, baiting..."
)
e
:=
tutter
.
SendIPs
([]
string
{
ip
})
if
e
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
sendMeme.go
+
8
−
0
View file @
bf93f4c8
...
...
@@ -7,14 +7,18 @@ import (
"math/rand"
"net/http"
"strings"
"sync"
)
var
mut
sync
.
Mutex
var
cache
=
make
(
map
[
string
]
bool
)
func
submit
(
ip
,
pass
string
)
([]
string
,
error
)
{
mut
.
Lock
()
if
cache
[
ip
]
{
return
nil
,
nil
}
mut
.
Unlock
()
resp
,
e
:=
http
.
Post
(
fmt
.
Sprintf
(
"http://[%s]:8080/attempt"
,
ip
),
"text/plain"
,
strings
.
NewReader
(
pass
+
"
\n
"
))
if
e
!=
nil
{
...
...
@@ -33,7 +37,9 @@ func submit(ip, pass string) ([]string, error) {
log
.
Println
(
"They fucked up"
)
case
204
:
fmt
.
Printf
(
"First submission to %s
\n
"
,
ip
)
mut
.
Lock
()
cache
[
ip
]
=
true
mut
.
Unlock
()
connCh
<-
Submitted
{
Id
:
rand
.
Int
(),
IP
:
ip
,
...
...
@@ -42,7 +48,9 @@ func submit(ip, pass string) ([]string, error) {
}
return
nil
,
e
case
200
:
mut
.
Lock
()
cache
[
ip
]
=
true
mut
.
Unlock
()
var
ips
[]
string
dec
:=
json
.
NewDecoder
(
resp
.
Body
)
e
=
dec
.
Decode
(
&
ips
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment