Skip to content

Commit d69c0a2

Browse files
authored
LadonGo
1 parent 53f9838 commit d69c0a2

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

Ladon.go

+41-7
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ func Exploit() {
141141

142142
}
143143

144+
var isicmp bool
145+
144146
func incIP(ip net.IP) {
145147
for j := len(ip) - 1; j >= 0; j-- {
146148
ip[j]++
@@ -156,12 +158,19 @@ func GetUser(){
156158
//fmt.Println(err)
157159
return
158160
}
159-
fmt.Println("User: "+u.Username)
161+
if isicmp {
162+
color.Magenta("User: "+u.Username+" IsAdmin")
163+
} else {
164+
fmt.Println("User: "+u.Username+" IsUser")
165+
}
166+
160167
}
161168
var debugLog *log.Logger
162169
func main() {
163-
color.Green("LadonGo 3.0 by k8gege")
170+
color.Green("LadonGo 3.1 by k8gege")
164171
fmt.Println("Arch: "+runtime.GOARCH+" OS: "+runtime.GOOS)
172+
if icmp.IcmpOK("localhost") {
173+
isicmp=true}
165174
GetUser()
166175
fmt.Println("Pid: ",os.Getpid(),"Process:",path.Base(os.Args[0]))
167176
ParLen := len(os.Args)
@@ -292,9 +301,11 @@ func main() {
292301
}
293302
for i:=ips;i<=ipe;i++ {
294303
ip:=fmt.Sprintf("%s.%d",IPC,i)
304+
295305
fmt.Println("\nC_Segment: "+ip)
296306
fmt.Println("=============================================")
297307
CScan(ScanType,ip)
308+
298309
}
299310
} else if strings.Contains(Target, "/") {
300311
if Target != "" {
@@ -319,6 +330,9 @@ func main() {
319330
//log.Println("Finished")
320331
fmt.Println(" Finished: "+time.Now().Format("2006-01-02 03:04:05"))
321332
}
333+
func CEnd(){
334+
fmt.Println("CFinished: "+time.Now().Format("2006-01-02 03:04:05"))
335+
}
322336
func End(){
323337
fmt.Println(" Finished: "+time.Now().Format("2006-01-02 03:04:05"))
324338
os.Exit(0)
@@ -339,6 +353,7 @@ func CScan(ScanType string,Target string){
339353
}(ip)
340354
}
341355
wg.Wait()
356+
CEnd()
342357
}
343358
func BScan(ScanType string,Target string){
344359
ip:=strings.Replace(Target, "/b", "", -1)
@@ -369,10 +384,29 @@ func LadonScan(ScanType string,Target string) {
369384
icmp.Icmp(Target,debugLog)
370385
} else if ScanType == "SNMPSCAN" ||ScanType == "SNMP" {
371386
snmp.GetInfo(Target)
372-
} else if ScanType == "PORTSCAN" || ScanType == "SCANPORT" {
373-
port.ScanPort(Target)
374-
} else if ScanType == "TCPBANNER" {
375-
port.ScanPortBanner(Target)
387+
} else if ScanType == "ONLINEPC"{
388+
if isicmp {
389+
icmp.Icmp(Target,debugLog)
390+
}else if ping.PingOK(Target) {
391+
ping.PingName(Target)
392+
}
393+
snmp.SnmpOK(Target)
394+
} else if ScanType == "PORTSCAN" || ScanType == "SCANPORT"|| ScanType == "TCPSCAN" {
395+
if isicmp {
396+
if icmp.IcmpOK(Target) {
397+
port.ScanPort(Target)
398+
}
399+
}else if ping.PingOK(Target) {
400+
port.ScanPort(Target)
401+
}
402+
} else if ScanType == "TCPBANNER"|| ScanType == "PORTSCANBNNER" || ScanType == "SCANPORTBANNER" {
403+
if isicmp {
404+
if icmp.IcmpOK(Target) {
405+
port.ScanPortBanner(Target)
406+
}
407+
}else if ping.PingOK(Target) {
408+
port.ScanPortBanner(Target)
409+
}
376410
} else if ScanType == "HTTPBANNER" ||ScanType == "WEBBANNER" {
377411
http.HttpBanner(Target)
378412
} else if ScanType == "HTTPTITLE" || ScanType == "WEBTITLE" {
@@ -396,7 +430,7 @@ func LadonScan(ScanType string,Target string) {
396430
} else if ScanType == "MSSQLSCAN" {
397431
mssql.MssqlScan(ScanType,Target)
398432
} else if ScanType == "ORACLESCAN" {
399-
oracle.OracleScan(ScanType,Target)
433+
//oracle.OracleScan(ScanType,Target)
400434
} else if ScanType == "SQLPLUSSCAN" {
401435
oracle.SqlPlusScan(ScanType,Target)
402436
} else if ScanType == "WINRMSCAN" {

0 commit comments

Comments
 (0)