dnsspoof: Fix lingering case sensitivity issues
parent
dc22ec3e5c
commit
1b020708b5
|
@ -24,4 +24,4 @@ const routes: Routes = [
|
|||
],
|
||||
exports: [dnsspoofComponent]
|
||||
})
|
||||
export class dnsspoofModule { }
|
||||
export class DNSspoofModule { }
|
|
@ -21,7 +21,7 @@ export class dnsspoofComponent implements OnInit {
|
|||
|
||||
handleBackup(): void {
|
||||
this.API.request({
|
||||
module: 'dnsspoof',
|
||||
module: 'DNSspoof',
|
||||
action: "backup"
|
||||
}, (response) => {
|
||||
if (response == "ok") {
|
||||
|
@ -35,7 +35,7 @@ export class dnsspoofComponent implements OnInit {
|
|||
add(): void {
|
||||
this.isAdding = true;
|
||||
this.API.request({
|
||||
module: 'dnsspoof',
|
||||
module: 'DNSspoof',
|
||||
action: "add",
|
||||
user_ip: this.userIP,
|
||||
user_domain: this.userDomain
|
||||
|
@ -53,7 +53,7 @@ export class dnsspoofComponent implements OnInit {
|
|||
|
||||
get(): void {
|
||||
this.API.request({
|
||||
module: 'dnsspoof',
|
||||
module: 'DNSspoof',
|
||||
action: "get"
|
||||
}, (response) => {
|
||||
this.allocation = response;
|
||||
|
@ -63,7 +63,7 @@ export class dnsspoofComponent implements OnInit {
|
|||
update(): void {
|
||||
this.isUpdating = true;
|
||||
this.API.request({
|
||||
module: 'dnsspoof',
|
||||
module: 'DNSspoof',
|
||||
action: "update"
|
||||
}, (response) => {
|
||||
if (response != "ok") {
|
||||
|
@ -76,7 +76,7 @@ export class dnsspoofComponent implements OnInit {
|
|||
reset(): void {
|
||||
this.isResetting = true;
|
||||
this.API.request({
|
||||
module: 'dnsspoof',
|
||||
module: 'DNSspoof',
|
||||
action: "reset"
|
||||
}, (response) => {
|
||||
if (response != "ok") {
|
||||
|
|
|
@ -5,15 +5,15 @@ import os
|
|||
import subprocess
|
||||
from pineapple.modules import Module, Request
|
||||
|
||||
module = Module('dnsspoof', logging.DEBUG)
|
||||
module = Module('DNSspoof', logging.DEBUG)
|
||||
|
||||
@module.handles_action("backup")
|
||||
def backup(request):
|
||||
try:
|
||||
if not os.path.exists('modules/dnsspoof/host-backup.txt'):
|
||||
if not os.path.exists('modules/DNSspoof/host-backup.txt'):
|
||||
with open("/etc/hosts", "r") as file:
|
||||
hosts = file.read()
|
||||
with open("modules/dnsspoof/host-backup.txt", "w+") as backup:
|
||||
with open("modules/DNSspoof/host-backup.txt", "w+") as backup:
|
||||
backup.write(hosts)
|
||||
return "ok"
|
||||
except Exception as e:
|
||||
|
@ -51,7 +51,7 @@ def update_dns(request):
|
|||
@module.handles_action("reset")
|
||||
def reset_hosts(request):
|
||||
try:
|
||||
with open("modules/dnsspoof/host-backup.txt", "r") as backup:
|
||||
with open("modules/DNSspoof/host-backup.txt", "r") as backup:
|
||||
old = backup.read()
|
||||
with open("/etc/hosts", "w+") as file:
|
||||
file.write(old)
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
export * from './lib/services/dnsspoof.service';
|
||||
export * from './lib/components/dnsspoof.component';
|
||||
export * from './lib/dnsspoof.module';
|
||||
export * from './lib/DNSspoof.module';
|
||||
|
|
Loading…
Reference in New Issue