forked from Ne0nd0g/merlin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
68 lines (53 loc) · 1.98 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Merlin is a post-exploitation command and control framework.
// This file is part of Merlin.
// Copyright (C) 2022 Russel Van Tuyl
// Merlin is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
// Merlin is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Merlin. If not, see <http://www.gnu.org/licenses/>.
package main
import (
// Standard
"flag"
"os"
// 3rd Party
"github.com/fatih/color"
// Merlin
"github.com/Ne0nd0g/merlin/pkg"
"github.com/Ne0nd0g/merlin/pkg/cli"
"github.com/Ne0nd0g/merlin/pkg/cli/banner"
"github.com/Ne0nd0g/merlin/pkg/logging"
"github.com/Ne0nd0g/merlin/pkg/pwnboard"
)
// Global Variables
var build = "nonRelease"
func main() {
logging.Server("Starting Merlin Server version " + merlin.Version + " build " + merlin.Build)
flag.Usage = func() {
color.Blue("#################################################")
color.Blue("#\t\tMERLIN SERVER\t\t\t#")
color.Blue("#################################################")
color.Blue("Version: " + merlin.Version)
color.Blue("Build: " + build)
color.Yellow("Merlin Server does not take any command line arguments")
color.Yellow("Visit the Merlin wiki for additional information: https://merlin-c2.readthedocs.io/en/latest/")
flag.PrintDefaults()
os.Exit(0)
}
ip := flag.String("pwn", "", "The IP address / hostname of pwnboard server")
flag.Parse()
color.Blue(banner.MerlinBanner1)
color.Blue("\t\t Version: %s", merlin.Version)
color.Blue("\t\t Build: %s", build)
if *ip != "" {
go pwnboard.Updateserver(*ip)
}
// Start Merlin Command Line Interface
cli.Shell()
}