This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from LeakIX/develop
v1.1.0
- Loading branch information
Showing
9 changed files
with
129 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package http | ||
|
||
import ( | ||
"github.com/LeakIX/l9format" | ||
"github.com/PuerkitoBio/goquery" | ||
"strings" | ||
) | ||
|
||
// This stage is useful if a plugin relies on tags ( eg nuclei plugin ) | ||
|
||
func TagDrupal(event *l9format.L9Event, body string, document *goquery.Document) bool { | ||
if strings.Contains(body, "Drupal.settings") || strings.Contains(body, "content=\"Drupal"){ | ||
event.AddTag("drupal") | ||
event.AddTag("php") | ||
return true | ||
} | ||
return false | ||
} | ||
|
||
func TagWordpress(event *l9format.L9Event, body string, document *goquery.Document) bool { | ||
if strings.Contains(body,"wp-content/") { | ||
event.AddTag("wordpress") | ||
event.AddTag("php") | ||
return true | ||
} | ||
return false | ||
} | ||
|
||
func TagJoomla(event *l9format.L9Event,body string, document *goquery.Document) bool { | ||
if strings.Contains(body,"content=\"Joomla!") { | ||
event.AddTag("joomla") | ||
event.AddTag("php") | ||
return true | ||
} | ||
return false | ||
} | ||
|
||
func TagVMWare(event *l9format.L9Event,body string, document *goquery.Document) bool { | ||
if strings.Contains(body,"vmware.vsphere.client") { | ||
event.AddTag("vmware") | ||
return true | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package http | ||
|
||
import ( | ||
"github.com/LeakIX/l9format" | ||
"github.com/PuerkitoBio/goquery" | ||
"strings" | ||
) | ||
|
||
func TagNginx(event *l9format.L9Event, body string, document *goquery.Document) bool { | ||
if serverHeader, hasServerHeader := event.Http.Headers["server"]; hasServerHeader { | ||
if strings.Contains(serverHeader, "nginx") { | ||
event.AddTag("nginx") | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
func TagApache(event *l9format.L9Event, body string, document *goquery.Document) bool { | ||
if serverHeader, hasServerHeader := event.Http.Headers["server"]; hasServerHeader && len(serverHeader) < 128 { | ||
if strings.Contains(serverHeader, "Apache") { | ||
event.AddTag("apache") | ||
if strings.Contains(serverHeader,"Coyote") { | ||
event.AddTag("tomcat") | ||
} | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
func TagPHP(event *l9format.L9Event, body string, document *goquery.Document) bool { | ||
if serverHeader, hasServerHeader := event.Http.Headers["server"]; hasServerHeader && len(serverHeader) < 128 { | ||
if strings.Contains(serverHeader, "PHP/") { | ||
event.AddTag("php") | ||
return true | ||
} | ||
} | ||
if powerHeader, hasPowerHeader := event.Http.Headers["x-powered-by"]; hasPowerHeader && len(powerHeader) < 128 { | ||
if strings.HasPrefix(powerHeader, "PHP") { | ||
event.AddTag("php") | ||
return true | ||
} | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters