Skip to content

Commit ea5d974

Browse files
committed
Return the InternalURL if ExternalURL is empty
1 parent c157bb4 commit ea5d974

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Ruler has multiple functions, these have their own documentation that can be fou
3939

4040
# Attacking Exchange
4141

42-
The library included with Ruler allows for the creation of custom message using MAPI. This along with the Exchnage documentation is a great starting point for new research. For an example of using this library in another project, see [SensePost Liniaal].
42+
The library included with Ruler allows for the creation of custom message using MAPI. This along with the Exchange documentation is a great starting point for new research. For an example of using this library in another project, see [SensePost Liniaal].
4343

4444
# License
4545
[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-nc-sa/4.0/)

mapi/mapi.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ var AuthSession *utils.Session
3333
func ExtractMapiURL(resp *utils.AutodiscoverResp) string {
3434
for _, v := range resp.Response.Account.Protocol {
3535
if v.TypeAttr == "mapiHttp" {
36-
return v.MailStore.ExternalUrl
36+
if v.MailStore.ExternalUrl != "" {
37+
return v.MailStore.ExternalUrl
38+
}
39+
return v.MailStore.InternalUrl
3740
}
3841
}
3942
return ""
@@ -43,7 +46,10 @@ func ExtractMapiURL(resp *utils.AutodiscoverResp) string {
4346
func ExtractRPCURL(resp *utils.AutodiscoverResp) string {
4447
for _, v := range resp.Response.Account.Protocol {
4548
if v.TypeAttr == "rpcHttp" {
46-
return v.MailStore.ExternalUrl
49+
if v.MailStore.ExternalUrl != "" {
50+
return v.MailStore.ExternalUrl
51+
}
52+
return v.MailStore.InternalUrl
4753
}
4854
}
4955
return ""

ruler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ func main() {
11331133

11341134
app.Name = "ruler"
11351135
app.Usage = "A tool to abuse Exchange Services"
1136-
app.Version = "2.1.10"
1136+
app.Version = "2.2.0"
11371137
app.Author = "Etienne Stalmans <[email protected]>, @_staaldraad"
11381138
app.Description = ` _
11391139
_ __ _ _| | ___ _ __

0 commit comments

Comments
 (0)