Skip to content

Commit

Permalink
Merge branch 'fix/algo-descriptions'
Browse files Browse the repository at this point in the history
  • Loading branch information
rangertaha committed Nov 26, 2024
2 parents 9e708ec + 499ca8d commit d066d3a
Show file tree
Hide file tree
Showing 19 changed files with 337,218 additions and 549 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ A major limitation of the output format is its restricted display in the termina

- Work on creating an advanced keyboard model that incorporates layer-shifting functionality.


- Implement functionality for sending DNS queries to multiple DNS servers.

- Store records in an embedded database, enabling plugins to access the data efficiently.
Expand Down
6 changes: 3 additions & 3 deletions internal/plugins/algorithms/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import (
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/aci"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/acs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/bf"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cb"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cm"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cns"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/co"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/com"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/dcar"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/dcr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/dhs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/di"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/do"
Expand All @@ -22,7 +20,9 @@ import (
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/ho"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/hr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/hs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/kr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/ons"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/rar"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/si"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/sp"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/tld"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package com

// Algo

// Algo is taking the target domain name and adding additional words
// to it typically separated by a hyphen. example.com may end up looking like
// support-example[.]com. Something like this might find its way into a phishing
// message targeting an organization. It gives the appearance of it being I.T. support.

// Combo-squatting is a form of typosquatting that involves creating domain names combining a legitimate brand or word with another keyword. It’s a social engineering technique that aims to mislead users into believing the domain is related to a trusted website or service.

// For example, if the legitimate domain is amazon.com, a combo-squatted domain might be something like amazon-login.com or amazon-secure.com. These additional words or phrases make the fake domain look authentic or security-focused, increasing the chances that users will click the link.

// This tactic is used to trick users into visiting the site, often for malicious purposes like phishing attacks, credential harvesting, or spreading malware. Combo-squatting is particularly effective because the domains appear more trustworthy than simple typographical errors, as the added words can look plausible and contextually relevant.
package cb

import (
"github.com/rangertaha/urlinsane/internal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package com
package cb
4 changes: 2 additions & 2 deletions internal/plugins/algorithms/cr/cr.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
CODE = "cr"
NAME = "Double Character Insertion"
NAME = "Character Repetition"
DESCRIPTION = "Repeats a character of the domain name twice"
)

Expand Down Expand Up @@ -51,7 +51,7 @@ func (n *Algo) Description() string {
}

func (n *Algo) Exec(original internal.Domain, acc internal.Accumulator) (err error) {
for _, variant := range algo.DoubleCharacterInsertion(original.Name()) {
for _, variant := range algo.CharacterRepetition(original.Name()) {
if original.Name() != variant {
acc.Add(domain.Variant(n, original.Prefix(), variant, original.Suffix()))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package dcr
package cr

import (
"github.com/rangertaha/urlinsane/internal"
Expand All @@ -22,8 +22,8 @@ import (
)

const (
CODE = "dcr"
NAME = "Double Character Insertion"
CODE = "cr"
NAME = "Character Repetition"
DESCRIPTION = "Created by replacing identical, consecutive letters in the name."
)

Expand Down Expand Up @@ -51,7 +51,7 @@ func (n *Algo) Description() string {
}

func (n *Algo) Exec(original internal.Domain, acc internal.Accumulator) (err error) {
for _, variant := range algo.DoubleCharacterInsertion(original.Name()) {
for _, variant := range algo.CharacterRepetition(original.Name()) {
if original.Name() != variant {
acc.Add(domain.Variant(n, original.Prefix(), variant, original.Suffix()))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package dcr
package cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package dcar
package rar

// Adjacent character substitution is where an attacker swaps characters
// that are next to each other on a keyboard.
Expand All @@ -36,9 +36,9 @@ import (
)

const (
CODE = "dcr"
NAME = "Double Character Adjacent Replacement"
DESCRIPTION = "Double character adjacent replacement typos replace consecutive identical letters with adjacent keys on the keyboard."
CODE = "rar"
NAME = "Repetition Adjacent Replacement"
DESCRIPTION = "Typos created by replacing identical consecutive letters with adjacent keys on the keyboard."
)

type Algo struct {
Expand Down Expand Up @@ -66,7 +66,7 @@ func (n *Algo) Description() string {

func (n *Algo) Exec(original internal.Domain, acc internal.Accumulator) (err error) {
for _, keyboard := range n.keyboards {
for _, variant := range algo.DoubleCharacterAdjacentReplacement(original.Name(), keyboard.Layouts()...) {
for _, variant := range algo.RepetitionAdjacentReplacement(original.Name(), keyboard.Layouts()...) {
if original.Name() != variant {
acc.Add(domain.Variant(n, original.Prefix(), variant, original.Suffix()))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package dcar
package rar
8 changes: 4 additions & 4 deletions internal/plugins/algorithms/sp/sps.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (
)

const (
CODE = "sps"
NAME = "Singular Pluralise Substitution"
DESCRIPTION = "Singular-Plural Substitution is when singular forms of words are swapped for plural forms"
CODE = "sp"
NAME = "Singular Pluralise"
DESCRIPTION = "Singular-Plural substitution is when singular forms of words are swapped for plural forms"
)

type Algo struct {
Expand All @@ -65,7 +65,7 @@ func (n *Algo) Description() string {
}

func (n *Algo) Exec(original internal.Domain, acc internal.Accumulator) (err error) {
for _, variant := range algo.SingularPluraliseSubstitution(original.Name()) {
for _, variant := range algo.SingularPluralise(original.Name()) {
if original.Name() != variant {
acc.Add(domain.Variant(n, original.Prefix(), variant, original.Suffix()))
}
Expand Down
50 changes: 25 additions & 25 deletions internal/plugins/languages/arabic/arabic.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,34 @@ var (
homophones: arHomophones,
antonyms: arAntonyms,
homoglyphs: map[string][]string{
"ض": []string{},
"ص": []string{},
"ث": []string{},
"ق": []string{},
"ف": []string{},
"غ": []string{},
"ع": []string{},
"ه": []string{"0", "Ο", "ο", "О", "о", "Օ", "ȯ", "ọ", "ỏ", "ơ", "ó", "ö", "ӧ"},
"خ": []string{"ج", "ح"},
"ح": []string{"خ", "ج"},
"ج": []string{"خ", "ح"},
"ة": []string{},
"ش": []string{"ش"},
"ض": []string{"ص", "ظ", "ط", "ড", "b", "в"},
"ص": []string{"ض", "ظ", "ط"},
"ث": []string{"ت", "ن"},
"ق": []string{"م"},
"ف": []string{"م"},
"غ": []string{"ع", "خ"},
"ع": []string{"غ", "خ"},
"ه": []string{"ة", "0", "Ο", "ο", "О", "о", "Օ", "ȯ", "ọ", "ỏ", "ơ", "ó", "ö", "ӧ"},
"خ": []string{"ج", "ح", "ع"},
"ح": []string{"خ", "ج", "ع"},
"ج": []string{"خ", "ح", "ع"},
"ة": []string{"ن", "ق"},
"ش": []string{"س", "},
"س": []string{"vv", "ѡ", "ա", "ԝ"},
"ي": []string{},
"ب": []string{},
"ي": []string{"ف"},
"ب": []string{"ث", "ت", "ن"},
"ل": []string{"j", "J"},
"ا": []string{"1", "l", "Ꭵ", "í", "ï", "ı", "ɩ", "ι", "ꙇ", "ǐ", "ĭ", "¡"},
"ت": []string{},
"ن": []string{},
"م": []string{},
"ك": []string{},
"ظ": []string{},
"ط": []string{},
"ذ": []string{},
"د": []string{},
"ز": []string{},
"ر": []string{},
"ت": []string{"ن", "ث"},
"ن": []string{"ت", "ث"},
"م": []string{"ق", "ف", "غ", "ع"},
"ك": []string{"ل", "ا"},
"ظ": []string{"ط", "ص", "ض"},
"ط": []string{"ظ", "ص", "ض"},
"ذ": []string{"ز", "د", "ر"},
"د": []string{"ز", "ذ", "ر"},
"ز": []string{"ر", "د", "ذ"},
"ر": []string{"ز", "د", "ذ"},
},
}
)
Expand Down
2 changes: 1 addition & 1 deletion internal/plugins/languages/english/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var (
"1": {"one", "first"},
"2": {"two", "second"},
"3": {"three", "third"},
"4": {"four", "fourth", "for"},
"4": {"four", "fourth"},
"5": {"five", "fifth"},
"6": {"six", "sixth"},
"7": {"seven", "seventh"},
Expand Down
Loading

0 comments on commit d066d3a

Please sign in to comment.