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
2a65b8bc
Verified
Commit
2a65b8bc
authored
Jun 24, 2023
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
Smol fix
parent
3f47038f
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
main.go
+1
-1
1 addition, 1 deletion
main.go
sendMeme.go
+11
-0
11 additions, 0 deletions
sendMeme.go
with
12 additions
and
1 deletion
main.go
+
1
−
1
View file @
2a65b8bc
...
@@ -25,7 +25,7 @@ func init() {
...
@@ -25,7 +25,7 @@ func init() {
}
}
var
conn
*
websocket
.
Conn
var
conn
*
websocket
.
Conn
var
connCh
=
make
(
chan
interface
{},
5
)
var
connCh
=
make
(
chan
interface
{},
5
00
)
var
socket
=
"ws://127.0.0.1:8080/ws"
var
socket
=
"ws://127.0.0.1:8080/ws"
func
init
()
{
func
init
()
{
...
...
This diff is collapsed.
Click to expand it.
sendMeme.go
+
11
−
0
View file @
2a65b8bc
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
"math/rand"
"math/rand"
"net/http"
"net/http"
"strings"
"strings"
"time"
)
)
var
cache
=
make
(
map
[
string
]
bool
)
var
cache
=
make
(
map
[
string
]
bool
)
...
@@ -17,6 +18,15 @@ func submit(ip, pass string) ([]string, error) {
...
@@ -17,6 +18,15 @@ func submit(ip, pass string) ([]string, error) {
}
}
resp
,
e
:=
http
.
Post
(
fmt
.
Sprintf
(
"http://[%s]:8080/attempt"
,
ip
),
"text/plain"
,
strings
.
NewReader
(
pass
+
"
\n
"
))
resp
,
e
:=
http
.
Post
(
fmt
.
Sprintf
(
"http://[%s]:8080/attempt"
,
ip
),
"text/plain"
,
strings
.
NewReader
(
pass
+
"
\n
"
))
if
e
!=
nil
{
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
rand
.
Intn
(
5
)))
resp
,
e
=
http
.
Post
(
fmt
.
Sprintf
(
"http://[%s]:8080/attempt"
,
ip
),
"text/plain"
,
strings
.
NewReader
(
pass
+
"
\n
"
))
if
e
!=
nil
{
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
rand
.
Intn
(
5
)))
resp
,
e
=
http
.
Post
(
fmt
.
Sprintf
(
"http://[%s]:8080/attempt"
,
ip
),
"text/plain"
,
strings
.
NewReader
(
pass
+
"
\n
"
))
}
}
if
e
!=
nil
{
if
e
!=
nil
{
log
.
Println
(
"host is ded"
,
ip
)
log
.
Println
(
"host is ded"
,
ip
)
return
nil
,
e
return
nil
,
e
...
@@ -56,6 +66,7 @@ func submit(ip, pass string) ([]string, error) {
...
@@ -56,6 +66,7 @@ func submit(ip, pass string) ([]string, error) {
Id
:
rand
.
Int
(),
Id
:
rand
.
Int
(),
IPs
:
ips
,
IPs
:
ips
,
}
}
defer
resp
.
Body
.
Close
()
return
ips
,
e
return
ips
,
e
}
}
...
...
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