Skip to content

Commit d4a66c8

Browse files
committed
init repo
0 parents  commit d4a66c8

7 files changed

Lines changed: 258 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.txt

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PMAKER - param maker
2+
make params for http request from list of words !
3+
4+
5+
## install
6+
7+
install with go :
8+
```
9+
go install github.com/mrvcoder/pmaker@latest
10+
```
11+
---
12+
OR just download the binary file and use it from relases :)
13+
14+
15+
## Usage
16+
```
17+
Param Maker - Make Parameters From List Of Words :D
18+
-----------------------------------------------------------------------------
19+
cat wordlists | pmaker [options]
20+
--count Count of params per req to send (default: 15)
21+
--value vlaue to set for all params (default: vcoder)
22+
Follow me at github => https://github.com/mrvcoder
23+
Follow me at twitter => https://twitter.com/VC0D3R
24+
```

go.mod

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module github.com/mrvcoder/pmaker
2+
3+
go 1.21.3
4+
5+
require github.com/projectdiscovery/gologger v1.1.12
6+
7+
require (
8+
github.com/andybalholm/brotli v1.0.6 // indirect
9+
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
10+
github.com/golang/snappy v0.0.4 // indirect
11+
github.com/json-iterator/go v1.1.12 // indirect
12+
github.com/klauspost/compress v1.11.4 // indirect
13+
github.com/klauspost/pgzip v1.2.5 // indirect
14+
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
15+
github.com/mholt/archiver/v3 v3.5.1 // indirect
16+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
17+
github.com/modern-go/reflect2 v1.0.2 // indirect
18+
github.com/nwaples/rardecode v1.1.3 // indirect
19+
github.com/pierrec/lz4/v4 v4.1.2 // indirect
20+
github.com/ulikunitz/xz v0.5.11 // indirect
21+
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
22+
gopkg.in/djherbis/times.v1 v1.3.0 // indirect
23+
)

go.sum

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
2+
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
3+
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
4+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
6+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
7+
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY=
8+
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
9+
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
10+
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
11+
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
12+
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
13+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
14+
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
15+
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
16+
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
17+
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
18+
github.com/klauspost/compress v1.11.4 h1:kz40R/YWls3iqT9zX9AHN3WoVsrAWVyui5sxuLqiXqU=
19+
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
20+
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
21+
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
22+
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
23+
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
24+
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
25+
github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo=
26+
github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4=
27+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
28+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
29+
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
30+
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
31+
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
32+
github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=
33+
github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
34+
github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM=
35+
github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
36+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
37+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
38+
github.com/projectdiscovery/gologger v1.1.12 h1:uX/QkQdip4PubJjjG0+uk5DtyAi1ANPJUvpmimXqv4A=
39+
github.com/projectdiscovery/gologger v1.1.12/go.mod h1:DI8nywPLERS5mo8QEA9E7gd5HZ3Je14SjJBH3F5/kLw=
40+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
41+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
42+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
43+
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
44+
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
45+
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
46+
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
47+
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
48+
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
49+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
50+
gopkg.in/djherbis/times.v1 v1.3.0 h1:uxMS4iMtH6Pwsxog094W0FYldiNnfY/xba00vq6C2+o=
51+
gopkg.in/djherbis/times.v1 v1.3.0/go.mod h1:AQlg6unIsrsCEdQYhTzERy542dz6SFdQFZFv6mUY0P8=

helper_funcs.go

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
package main
2+
3+
import (
4+
"bufio"
5+
"fmt"
6+
"io/ioutil"
7+
"os"
8+
"strings"
9+
10+
"github.com/projectdiscovery/gologger"
11+
)
12+
13+
// helper funcs
14+
func isStdinEmpty() bool {
15+
fi, _ := os.Stdin.Stat()
16+
if fi.Mode()&os.ModeNamedPipe == 0 {
17+
return true
18+
}
19+
return false
20+
}
21+
22+
func ReadStdin() string {
23+
all_data := ""
24+
25+
if !isStdinEmpty() {
26+
scanner := bufio.NewScanner(os.Stdin)
27+
for scanner.Scan() {
28+
line := scanner.Text()
29+
if line != "" {
30+
all_data += strings.TrimSpace(line) + "\n"
31+
}
32+
}
33+
34+
if err := scanner.Err(); err != nil {
35+
gologger.Fatal().Msg("Error reading standard input: " + err.Error())
36+
}
37+
38+
} else {
39+
gologger.Fatal().Msg("Stdin is empty")
40+
}
41+
return strings.TrimSpace(all_data)
42+
}
43+
44+
// ChunkStringSlice slices a []string into smaller chunks
45+
func ChunkStringSlice(slice []string, chunkSize int) [][]string {
46+
var chunks [][]string
47+
48+
for i := 0; i < len(slice); i += chunkSize {
49+
end := i + chunkSize
50+
if end > len(slice) {
51+
end = len(slice)
52+
}
53+
chunks = append(chunks, slice[i:end])
54+
}
55+
56+
return chunks
57+
}
58+
59+
func createTextFile(fileName, content string) error {
60+
// Create a new file with the given file name
61+
file, err := os.Create(fileName)
62+
if err != nil {
63+
return err
64+
}
65+
defer file.Close()
66+
67+
// Write the content to the file
68+
_, err = file.WriteString(content)
69+
if err != nil {
70+
return err
71+
}
72+
73+
return nil
74+
}
75+
76+
func readTextFile(filePath string) (string, error) {
77+
// Read the entire file content into a byte slice
78+
content, err := ioutil.ReadFile(filePath)
79+
if err != nil {
80+
return "", err
81+
}
82+
83+
// Convert the byte slice to a string
84+
return string(content), nil
85+
}
86+
87+
func WriteToFile(content string, filePath string) {
88+
file, err := os.OpenFile(filePath, os.O_APPEND|os.O_WRONLY, 0644)
89+
if err != nil {
90+
fmt.Println("Error opening file:", err)
91+
return
92+
}
93+
defer file.Close()
94+
95+
// Text to append to the file
96+
textToAppend := content
97+
98+
// Append the text to the file
99+
_, err = file.WriteString(textToAppend)
100+
if err != nil {
101+
fmt.Println("Error appending to file:", err)
102+
return
103+
}
104+
}

main.go

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package main
2+
3+
import (
4+
"flag"
5+
"fmt"
6+
"os"
7+
"strings"
8+
9+
"github.com/projectdiscovery/gologger"
10+
"github.com/projectdiscovery/gologger/levels"
11+
)
12+
13+
var (
14+
help = flag.Bool("h", false, "help menu")
15+
params_count = flag.Int("count", 15, "Count of params per req to send (default: 15)")
16+
params_value = flag.String("value", "vcoder", "vlaue to set for all params (default: vcoder)")
17+
)
18+
19+
func main() {
20+
flag.Parse()
21+
gologger.DefaultLogger.SetMaxLevel(levels.LevelDebug)
22+
23+
if *help == true {
24+
fmt.Println(`Param Maker - Make Parameters From List Of Words :D
25+
-----------------------------------------------------------------------------
26+
cat wordlists | pmaker [options]
27+
--count Count of params per req to send (default: 15)
28+
--value vlaue to set for all params (default: vcoder)
29+
Follow me at github => https://github.com/mrvcoder
30+
Follow me at twitter => https://twitter.com/VC0D3R
31+
`)
32+
os.Exit(0)
33+
}
34+
35+
Stdin := ReadStdin()
36+
37+
params := strings.Split(Stdin, "\n")
38+
chunks := ChunkStringSlice(params, *params_count)
39+
// Build the query strings for each chunk
40+
for i, chunk := range chunks {
41+
d := CreateParams(chunk)
42+
out := fmt.Sprintf("Part %d:\n\n%s\n\n", i+1, d)
43+
fmt.Println(out)
44+
}
45+
}
46+
47+
func CreateParams(params []string) string {
48+
// Build the query string
49+
var queryParams []string
50+
for _, word := range params {
51+
queryParams = append(queryParams, fmt.Sprintf("%s=%s", word, *params_value))
52+
}
53+
queryString := strings.Join(queryParams, "&")
54+
return queryString
55+
}

pmaker

5.04 MB
Binary file not shown.

0 commit comments

Comments
 (0)