Add DNSspoof

pull/70/head
90N45 2023-03-05 09:49:59 +01:00
parent d1a8a1d666
commit 6e9ced5339
24 changed files with 33182 additions and 0 deletions

47
DNSspoof/angular.json Normal file
View File

@ -0,0 +1,47 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"dnsspoof": {
"projectType": "library",
"root": "projects/dnsspoof",
"sourceRoot": "projects/dnsspoof/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/dnsspoof/tsconfig.lib.json",
"project": "projects/dnsspoof/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/dnsspoof/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/dnsspoof/src/test.ts",
"tsConfig": "projects/dnsspoof/tsconfig.spec.json",
"karmaConfig": "projects/dnsspoof/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/dnsspoof/tsconfig.lib.json",
"projects/dnsspoof/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}},
"defaultProject": "dnsspoof"
}

90
DNSspoof/build.sh Normal file
View File

@ -0,0 +1,90 @@
#!/bin/bash
MODULENAME=$(basename $PWD)
check_workspace() {
if [[ ! -d "node_modules" ]]; then
while true; do
read -p "[!!] The Angular workspace has not been prepared. Would you like to do it now? [Y\n] " yn
case $yn in
[Yy]* ) prepare_workspace; break;;
[Nn]* ) exit 1;;
* ) prepare_workspace; break;;
esac
done
fi
}
prepare_workspace() {
echo "[*] Preparing the Angular workspace."
if ! command -v npm &> /dev/null; then
echo "[!] NPM does not appear to be installed on this system. Failed to create workspace."
return
fi
if ! npm install &> /dev/null; then
echo "[!] Failed to prepare workspace. Run npm install to see why."
return
fi
echo "[*] Prepared the Angular workspace successfully."
}
build_module() {
ng build --prod > /dev/null 2>&1
RET=$?
if [[ $RET -ne 0 ]]; then
echo "[!] Angular Build Failed: Run 'ng build --prod' to figure out why."
exit 1
else
echo "[*] Angular Build Succeeded"
fi
# Step 2: Copy the required files to the build output
cp -r projects/$MODULENAME/src/module.svg dist/$MODULENAME/bundles/
cp -r projects/$MODULENAME/src/module.json dist/$MODULENAME/bundles/
cp -r projects/$MODULENAME/src/module.py dist/$MODULENAME/bundles/ > /dev/null 2>&1
cp -r projects/$MODULENAME/src/module.php dist/$MODULENAME/bundles/ > /dev/null 2>&1
cp -r projects/$MODULENAME/src/assets/ dist/$MODULENAME/bundles/ > /dev/null 2>&1
# Step 3: Clean up
rm -rf dist/$MODULENAME/bundles/*.map
rm -rf dist/$MODULENAME/bundles/*.min*
rm -rf bundletmp
mv dist/$MODULENAME/bundles/ bundletmp
rm -rf dist/$MODULENAME/*
mv bundletmp/* dist/$MODULENAME/
rm -rf bundletmp
}
package() {
VERS=$(cat dist/$MODULENAME/module.json | grep "version" | awk '{split($0, a, ": "); gsub("\"", "", a[2]); gsub(",", "", a[2]); print a[2]}')
rm -rf $MODULENAME-$VERS.tar.gz
echo "[*] Packaging $MODULENAME (Version $VERS)"
cd dist/
tar -pczf $MODULENAME-$VERS.tar.gz $MODULENAME
mv $MODULENAME-$VERS.tar.gz ../
cd ../
}
copy_to_device() {
echo "[*] Copying module to WiFi Pineapple via SCP"
scp -r dist/$MODULENAME root@172.16.42.1:/pineapple/modules
}
main() {
check_workspace
build_module
if [[ $1 == "package" ]]; then
package
elif [[ $1 == "copy" ]]; then
copy_to_device
fi
echo "[*] Success!"
}
main $1

32223
DNSspoof/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

52
DNSspoof/package.json Normal file
View File

@ -0,0 +1,52 @@
{
"name": "dnsspoof",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.11",
"@angular/cdk": "^9.2.4",
"@angular/common": "~9.1.11",
"@angular/compiler": "~9.1.11",
"@angular/core": "~9.1.11",
"@angular/flex-layout": "^9.0.0-beta.31",
"@angular/forms": "~9.1.11",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.11",
"@angular/platform-browser-dynamic": "~9.1.11",
"@angular/router": "~9.1.11",
"rxjs": "~6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.8",
"@angular-devkit/build-ng-packagr": "~0.901.8",
"@angular/cli": "~9.1.8",
"@angular/compiler-cli": "~9.1.11",
"@angular/language-service": "~9.1.11",
"@types/jasmine": "~3.5.10",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.2",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~3.3.1",
"karma-jasmine-html-reporter": "^1.4.0",
"ng-packagr": "^9.1.5",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"tslint": "~6.1.2",
"typescript": "^3.6.5"
}
}

View File

@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/dnsspoof",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@ -0,0 +1,11 @@
{
"name": "dnsspoof",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^8.2.14",
"@angular/core": "^8.2.14"
},
"scripts": {
"build": "ng build --prod"
}
}

View File

@ -0,0 +1 @@
This file is a placeholder for module assets that you may like to add.

View File

@ -0,0 +1,47 @@
<div style="display: flex; justify-content: center; align-items: center;">
<span *ngIf="!backup" style="display: flex; justify-content: center; align-items: center; height: 10vh;">
<mat-spinner diameter="25"></mat-spinner>
</span>
<mat-card style="min-width: 40%;" *ngIf="backup">
<mat-card-title style="text-align: center;">DNSspoof</mat-card-title>
<mat-divider></mat-divider>
<br>
<mat-card-content>
<div style="display: flex; justify-content: center; align-items: center;">
<textarea style="width: 100%; height: 150px; background-color: #efefef; border-color: #cecece; border-radius: 2px; resize: vertical;" readonly>{{ allocation }}</textarea>
</div>
<div style="display: flex; justify-content: space-evenly; align-items: center;">
<mat-form-field style="width: 35%;">
<mat-label>IP Address</mat-label>
<input class="control-input" matInput [(ngModel)]="userIP"/>
</mat-form-field>
<mat-form-field style="width: 35%;">
<mat-label>Domain</mat-label>
<input class="control-input" matInput [(ngModel)]="userDomain"/>
</mat-form-field>
<button style="width: 20%; height: 5vh;" mat-flat-button color="accent" (click)="add();">
<span *ngIf="!isAdding">Add</span>
<span *ngIf="isAdding" style="display: flex; justify-content: center; align-items: center; height: 5vh;">
<mat-spinner diameter="20"></mat-spinner>
</span>
</button>
</div>
<br>
<div style="display: flex; justify-content: space-evenly; align-items: center;">
<button style="width: 45%; height: 5vh;" mat-flat-button color="accent" (click)="update();">
<span *ngIf="!isUpdating">Update allocation</span>
<span *ngIf="isUpdating" style="display: flex; justify-content: center; align-items: center; height: 5vh;">
<mat-spinner diameter="20"></mat-spinner>
</span>
</button>
<button style="width: 45%; height: 5vh; background-color: red;" mat-flat-button color="accent" (click)="reset();">
<span *ngIf="!isResetting">Reset</span>
<span *ngIf="isResetting" style="display: flex; justify-content: center; align-items: center; height: 5vh;">
<mat-spinner diameter="20"></mat-spinner>
</span>
</button>
</div>
<span style="display: flex; justify-content: center; align-items: center;"><small>{{ error }}</small></span>
</mat-card-content>
</mat-card>
</div>

View File

@ -0,0 +1,95 @@
import { Component, OnInit } from '@angular/core';
import { ApiService } from '../services/api.service';
@Component({
selector: 'lib-dnsspoof',
templateUrl: './dnsspoof.component.html',
styleUrls: ['./dnsspoof.component.css']
})
export class dnsspoofComponent implements OnInit {
constructor(private API: ApiService) { }
error = "";
allocation = "";
userIP = "";
userDomain = "";
backup: boolean = false;
isAdding: boolean = false;
isUpdating: boolean = false;
isResetting: boolean = false;
handleBackup(): void {
this.API.request({
module: 'dnsspoof',
action: "backup"
}, (response) => {
if (response == "ok") {
this.backup = true;
} else {
this.error = response;
}
})
}
add(): void {
this.isAdding = true;
this.API.request({
module: 'dnsspoof',
action: "add",
user_ip: this.userIP,
user_domain: this.userDomain
}, (response) => {
if (response != "ok") {
this.error = response;
} else {
this.userIP = "";
this.userDomain = "";
this.get();
}
this.isAdding = false;
})
}
get(): void {
this.API.request({
module: 'dnsspoof',
action: "get"
}, (response) => {
this.allocation = response;
})
}
update(): void {
this.isUpdating = true;
this.API.request({
module: 'dnsspoof',
action: "update"
}, (response) => {
if (response != "ok") {
this.error = response;
}
this.isUpdating = false;
})
}
reset(): void {
this.isResetting = true;
this.API.request({
module: 'dnsspoof',
action: "reset"
}, (response) => {
if (response != "ok") {
this.error = response;
} else {
this.get();
}
this.isResetting = false;
})
}
ngOnInit() {
this.handleBackup();
this.get();
}
}

View File

@ -0,0 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { dnsspoofComponent } from './components/dnsspoof.component';
import { RouterModule, Routes } from '@angular/router';
import {MaterialModule} from './modules/material/material.module';
import {FlexLayoutModule} from '@angular/flex-layout';
import {FormsModule} from '@angular/forms';
const routes: Routes = [
{ path: '', component: dnsspoofComponent }
];
@NgModule({
declarations: [dnsspoofComponent],
imports: [
CommonModule,
RouterModule.forChild(routes),
MaterialModule,
FlexLayoutModule,
FormsModule,
],
exports: [dnsspoofComponent]
})
export class dnsspoofModule { }

View File

@ -0,0 +1,107 @@
/*
* Copyright (c) 2018 Hak5 LLC.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { A11yModule } from '@angular/cdk/a11y';
import { BidiModule } from '@angular/cdk/bidi';
import { ObserversModule } from '@angular/cdk/observers';
import { OverlayModule } from '@angular/cdk/overlay';
import { PlatformModule } from '@angular/cdk/platform';
import { PortalModule } from '@angular/cdk/portal';
import { CdkStepperModule } from '@angular/cdk/stepper';
import { CdkTableModule } from '@angular/cdk/table';
import { CdkTreeModule } from '@angular/cdk/tree';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatBadgeModule } from '@angular/material/badge';
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatSliderModule } from '@angular/material/slider';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatSortModule } from '@angular/material/sort';
import { MatStepperModule } from '@angular/material/stepper';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatTreeModule } from '@angular/material/tree';
@NgModule({
imports: [ CommonModule],
exports: [
// CDK
A11yModule,
BidiModule,
ObserversModule,
OverlayModule,
PlatformModule,
PortalModule,
CdkStepperModule,
CdkTableModule,
CdkTreeModule,
// Material
MatAutocompleteModule,
MatBadgeModule,
MatBottomSheetModule,
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatFormFieldModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatNativeDateModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatSortModule,
MatStepperModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatTreeModule,
],
declarations: []
})
export class MaterialModule {
}

View File

@ -0,0 +1,196 @@
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Router} from '@angular/router';
@Injectable({
providedIn: 'root'
})
export class ApiService {
public static totalRequests = 0;
apiModuleBusy = document.getElementById('ApiModuleBusy');
constructor(private http: HttpClient,
private router: Router) {}
emptyResponse = {error: 'Request returned empty response'};
unauth(): void {
localStorage.removeItem('authToken');
if (this.router.url !== '/Login' && this.router.url !== '/Setup') {
this.router.navigateByUrl('/Login');
}
}
setBusy(): void {
this.apiModuleBusy.style.display = 'block';
}
setNotBusy(): void {
this.apiModuleBusy.style.display = 'none';
}
static extractBaseHref(): string {
// Duplicated from injector because we have to be able to support
// a static method here
if (window['_app_base']) {
if (window['_app_base'].endsWith('/')) {
return window['_app_base'].slice(0, -1)
}
}
return window['_app_base'] || '';
}
request(payload: any, callback: (any) => void) {
this.setBusy();
let resp;
this.http.post(`${ApiService.extractBaseHref()}/api/module/request`, payload).subscribe((r: any) => {
if (r === undefined || r === null) {
resp = this.emptyResponse;
} else if (r.error) {
resp = r;
} else {
resp = r.payload;
}
}, (err) => {
resp = err.error;
if (err.status === 401) {
this.unauth();
}
this.setNotBusy();
callback(resp);
}, () => {
this.setNotBusy();
callback(resp);
});
ApiService.totalRequests++;
}
APIGet(path: string, callback: (any) => void): any {
ApiService.totalRequests++;
let resp;
this.http.get(`${ApiService.extractBaseHref()}${path}`).subscribe((r) => {
if (r === undefined || r === null) {
r = this.emptyResponse;
}
resp = r;
}, (err) => {
resp = err.error;
if (err.status === 401) {
this.unauth();
}
callback(resp);
}, () => {
callback(resp);
});
}
async APIGetAsync(path: string): Promise<any> {
ApiService.totalRequests++;
return await this.http.get(`${ApiService.extractBaseHref()}${path}`).toPromise();
}
APIPut(path: string, body: any, callback: (any) => void): any {
ApiService.totalRequests++;
let resp;
this.http.put(`${ApiService.extractBaseHref()}${path}`, body).subscribe((r) => {
if (r === undefined || r === null) {
r = this.emptyResponse;
}
resp = r;
}, (err) => {
resp = err.error;
if (err.status === 401) {
this.unauth();
}
callback(resp);
}, () => {
callback(resp);
});
}
async APIPutAsync(path: string, body: any): Promise<any> {
return await this.http.put(`${ApiService.extractBaseHref()}/${path}`, body).toPromise();
}
APIPost(path: string, body: any, callback: (any) => void): any {
ApiService.totalRequests++;
let resp;
this.http.post(`${ApiService.extractBaseHref()}${path}`, body).subscribe((r) => {
if (r === undefined || r === null) {
resp = this.emptyResponse;
}
resp = r;
}, (err) => {
resp = err.error;
if (err.status === 401) {
this.unauth();
}
callback(resp);
}, () => {
callback(resp);
});
}
async APIPostAsync(path: string, body: any): Promise<any> {
return await this.http.post(`${ApiService.extractBaseHref()}/${path}`, body).toPromise();
}
APIDelete(path: string, body: any, callback: (any) => void): any {
ApiService.totalRequests++;
const opts = {
headers: null,
body: body
};
let resp;
this.http.delete(`${ApiService.extractBaseHref()}/${path}`, opts).subscribe((r) => {
if (r === undefined || r === null) {
r = this.emptyResponse;
}
resp = r;
}, (err) => {
resp = err.error;
if (err.status === 401) {
this.unauth();
}
callback(resp);
}, () => {
callback(resp);
});
}
async APIDeleteAsync(path: string, body: any): Promise<any> {
return await this.http.delete(`${ApiService.extractBaseHref()}${path}`, body).toPromise();
}
APIDownload(fullpath: string, filename: string): void {
ApiService.totalRequests++;
const body = {
filename: fullpath
};
this.http.post(`${ApiService.extractBaseHref()}/api/download`, body, {responseType: 'blob'}).subscribe((r) => {
const url = window.URL.createObjectURL(r);
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('style', 'display: none');
a.href = url;
a.download = filename;
a.click();
window.URL.revokeObjectURL(url);
a.remove();
});
}
}

View File

@ -0,0 +1,8 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class dnsspoofServiceService {
constructor() {}
}

View File

@ -0,0 +1,10 @@
{
"name": "dnsspoof",
"title": "DNSspoof",
"description": "Spoof DNS records",
"version": "1.0.1",
"author": "90N45",
"firmware_required": "1.0.0",
"devices": ["wifipineapplemk7"]
}

View File

@ -0,0 +1,63 @@
#!/usr/bin/env python3
import logging
import os
import subprocess
from pineapple.modules import Module, Request
module = Module('dnsspoof', logging.DEBUG)
@module.handles_action("backup")
def backup(request):
try:
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:
backup.write(hosts)
return "ok"
except Exception as e:
return "Error: " + str(e)
@module.handles_action("add")
def add_host(request):
try:
with open("/etc/hosts", "r") as file:
hosts = file.read().replace("\n\n", "\n" + request.user_ip + " " + request.user_domain + "\n\n", 1)
os.remove("/etc/hosts")
with open("/etc/hosts", "w") as file:
file.write(hosts)
return "ok"
except Exception as e:
return "Error: " + str(e)
@module.handles_action("get")
def fetch_hosts(request):
try:
with open("/etc/hosts", "r") as file:
hosts = file.read().partition("\n\n")[0]
return hosts
except:
return "Error"
@module.handles_action("update")
def update_dns(request):
try:
subprocess.run(["killall", "dnsmasq", "&&", "/etc/init.d/dnsmasq", "start"])
return "ok"
except Exception as e:
return "Error: " + str(e)
@module.handles_action("reset")
def reset_hosts(request):
try:
with open("modules/dnsspoof/host-backup.txt", "r") as backup:
old = backup.read()
with open("/etc/hosts", "w+") as file:
file.write(old)
return "ok"
except Exception as e:
return "Error: " + str(e)
if __name__ == '__main__':
module.start()

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 1024 1024" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g id="Ebene-1">
<g opacity="1">
<path d="M128.166 52.3575L895.834 52.3575C933.77 52.3575 964.524 83.1106 964.524 121.047L964.524 229.422C964.524 267.358 933.77 298.111 895.834 298.111L128.166 298.111C90.2296 298.111 59.4764 267.358 59.4764 229.422L59.4764 121.047C59.4764 83.1106 90.2296 52.3575 128.166 52.3575Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="49.6422"/>
<path d="M126.754 386.329L897.246 386.329C934.402 386.329 964.524 416.45 964.524 453.607L964.524 564.805C964.524 601.961 934.402 632.083 897.246 632.083L126.754 632.083C89.5978 632.083 59.4764 601.961 59.4764 564.805L59.4764 453.607C59.4764 416.45 89.5978 386.329 126.754 386.329Z" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="49.6422"/>
<path d="M40.4831 512.478L40.4831 514.468C40.4831 577.559 91.6282 628.704 154.719 628.704L869.281 628.704C932.372 628.704 983.517 577.559 983.517 514.468L983.517 512.478C983.517 449.388 932.372 398.243 869.281 398.243L154.719 398.243C91.6282 398.243 40.4831 449.388 40.4831 512.478ZM317.197 414.439C327.005 414.439 346.598 414.439 356.407 414.439C368.154 414.439 378.862 416.215 388.319 420.04C397.864 423.9 406.004 429.967 412.325 437.997C418.549 445.902 422.995 455.591 425.897 466.708C425.883 466.656 425.916 466.761 426.026 467.188C426.135 467.616 426.135 467.722 426.122 467.668C428.947 478.909 430.283 491.746 430.283 506.271C430.283 535.483 424.954 558.772 412.325 575.057C412.229 575.181 412.126 575.282 412.102 575.314C399.286 591.65 379.837 599.352 356.407 599.352C346.598 599.352 327.005 599.352 317.197 599.352C311.717 599.352 307.273 594.908 307.273 589.429C307.273 548.162 307.273 465.628 307.273 424.361C307.273 418.881 311.717 414.439 317.197 414.439ZM466.548 414.439C471.813 414.439 482.344 414.439 487.61 414.439C491.492 414.439 495.022 416.701 496.636 420.232C506.733 442.317 522.545 476.889 537.031 508.576C537.031 477.929 537.031 445.413 537.031 424.361C537.031 418.881 541.475 414.439 546.953 414.439C551.657 414.439 561.07 414.439 565.774 414.439C571.254 414.439 575.698 418.882 575.698 424.361C575.698 465.628 575.698 548.161 575.698 589.429C575.698 594.908 571.254 599.352 565.774 599.352C560.509 599.352 549.978 599.352 544.712 599.352C540.834 599.352 537.303 597.083 535.687 593.558C525.584 571.534 509.783 537.064 495.292 505.471C495.292 536.026 495.292 568.437 495.292 589.429C495.292 594.908 490.849 599.352 485.369 599.352C480.665 599.352 471.252 599.352 466.548 599.352C461.068 599.352 456.626 594.908 456.626 589.429C456.626 548.162 456.626 465.628 456.626 424.361C456.626 418.881 461.068 414.439 466.548 414.439ZM347.605 451.184C347.605 482.937 347.605 530.885 347.605 562.638C351.459 562.638 355.309 562.638 357.879 562.638C364.517 562.638 369.405 561.322 373.083 559.245C377.03 557.016 380.196 553.938 382.814 549.547C385.498 545.045 387.628 539.262 388.959 532.006C390.325 524.565 391.04 515.979 391.04 506.271C391.04 496.639 390.32 488.145 388.959 480.824C387.628 473.661 385.546 467.985 382.942 463.635C380.416 459.416 377.359 456.508 373.531 454.417C369.926 452.448 364.996 451.184 358.295 451.184C355.621 451.184 351.616 451.184 347.605 451.184ZM652.005 411.142C659.458 411.142 666.457 411.973 672.907 413.798C679.526 415.671 685.566 418.754 690.736 423.017C695.898 427.274 700.136 432.649 703.475 438.861C706.842 445.125 709.278 452.32 710.997 460.371C712.093 465.506 709.016 470.591 703.955 471.99C699.411 473.246 690.318 475.759 685.775 477.016C680.301 478.529 674.682 475.133 673.451 469.59C672.714 466.27 671.725 463.101 670.474 460.019C669.422 457.427 668.091 455.247 666.505 453.361C666.488 453.342 666.412 453.248 666.345 453.169C664.899 451.486 663.131 450.141 660.744 449.008C658.867 448.117 656.129 447.439 652.23 447.439C646.383 447.439 642.733 448.655 640.514 450.128C637.729 451.978 636.555 453.666 635.937 455.666C634.843 459.21 634.369 462.478 634.369 465.524C634.369 471.015 635.739 474.397 638.018 477.016C640.424 479.78 644.716 482.585 651.813 484.665C651.827 484.67 651.832 484.661 651.845 484.665C656.603 486.082 666.133 488.914 670.891 490.331C677.707 492.368 683.711 494.881 688.911 498.045C694.084 501.192 698.607 505.083 702.29 509.664C702.305 509.681 702.34 509.71 702.355 509.728C710.073 519.468 713.462 531.95 713.462 546.026C713.462 553.918 712.381 561.377 710.069 568.272C707.698 575.34 703.892 581.669 698.738 586.868C693.511 592.142 686.993 596.049 679.596 598.711C671.998 601.447 663.462 602.68 654.054 602.68C644.661 602.68 636.207 601.468 628.735 598.744C621.475 596.095 615.068 592.145 609.883 586.868C604.844 581.742 600.892 575.57 598.071 568.624C595.367 561.964 593.399 554.677 592.086 546.794C591.203 541.496 594.688 536.461 599.959 535.431C604.744 534.495 614.317 532.621 619.101 531.685C624.665 530.598 630.033 534.397 630.847 540.008C631.421 543.957 632.244 547.755 633.345 551.403C634.293 554.546 635.602 557.156 637.282 559.437C638.682 561.339 640.525 562.931 643.203 564.27C645.306 565.322 648.699 566.158 653.637 566.158C659.754 566.158 663.883 564.968 666.601 563.342C669.73 561.469 670.985 559.685 671.659 557.741C672.86 554.274 673.419 551.026 673.419 547.85C673.419 541.922 672.035 537.712 669.674 534.375C667.679 531.556 663.645 528.532 656.134 526.212C651.851 524.901 643.343 522.302 639.074 520.995C639.06 520.991 639.024 520.967 639.01 520.963C632.013 518.786 625.801 516.158 620.349 512.929C614.839 509.666 610.052 505.685 606.233 500.958C602.418 496.233 599.588 490.784 597.815 484.889C596.057 479.044 595.287 472.709 595.287 465.94C595.287 454.558 597.954 444.041 603.577 434.988C603.589 434.968 603.622 434.908 603.673 434.828C609.242 425.933 616.946 419.243 626.398 415.751C634.69 412.687 643.275 411.142 652.005 411.142Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="none"/>
<path d="M126.496 725.889L897.504 725.889C934.518 725.889 964.524 755.894 964.524 792.908L964.524 904.623C964.524 941.637 934.518 971.643 897.504 971.643L126.496 971.643C89.482 971.643 59.4764 941.637 59.4764 904.623L59.4764 792.908C59.4764 755.894 89.482 725.889 126.496 725.889Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="49.6422"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of dnsspoof
*/
export * from './lib/services/dnsspoof.service';
export * from './lib/components/dnsspoof.component';
export * from './lib/dnsspoof.module';

View File

@ -0,0 +1,25 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

34
DNSspoof/tsconfig.json Normal file
View File

@ -0,0 +1,34 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"paths": {
"dnsspoof": [
"dist/dnsspoof"
],
"dnsspoof/*": [
"dist/dnsspoof/*"
]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}

79
DNSspoof/tslint.json Normal file
View File

@ -0,0 +1,79 @@
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warning"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
}
}