| 240 | cprint("Could not send to your Slack Webhook. Server returned: %s" % resp.status_code, "red") |
| 241 | |
| 242 | def get_permutations(domain, subdomain=None): |
| 243 | perms = [ |
| 244 | "%s" % domain, |
| 245 | "www-%s" % domain, |
| 246 | "%s-www" % domain, |
| 247 | ] |
| 248 | |
| 249 | perms.extend([line.strip() % domain for line in open(ARGS.permutations)]) |
| 250 | |
| 251 | if subdomain is not None: |
| 252 | perms.extend([ |
| 253 | "%s-%s" % (subdomain, domain) if subdomain else "", |
| 254 | "%s-%s" % (domain, subdomain) if subdomain else "" |
| 255 | ]) |
| 256 | |
| 257 | return filter(None, perms) |
| 258 | |
| 259 | |
| 260 | def stop(): |