forked from markus/S_New4
windows
This commit is contained in:
parent
afa1d76ea5
commit
a33e54d522
68
.gitignore
vendored
68
.gitignore
vendored
@ -1,34 +1,34 @@
|
|||||||
# This file is used to ignore files which are generated
|
# This file is used to ignore files which are generated
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
*~
|
*~
|
||||||
*.autosave
|
*.autosave
|
||||||
|
|
||||||
*.moc
|
*.moc
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
|
|
||||||
|
|
||||||
*.debug
|
*.debug
|
||||||
Makefile?*
|
Makefile?*
|
||||||
*.prl
|
*.prl
|
||||||
*.app
|
*.app
|
||||||
moc_*.cpp
|
moc_*.cpp
|
||||||
|
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
/.qmake.stash
|
/.qmake.stash
|
||||||
|
|
||||||
# qtcreator generated files
|
# qtcreator generated files
|
||||||
*.pro.user*
|
*.pro.user*
|
||||||
|
|
||||||
# MinGW generated files
|
# MinGW generated files
|
||||||
*.Debug
|
*.Debug
|
||||||
*.Release
|
*.Release
|
||||||
|
|
||||||
|
|
||||||
#Own adds:
|
#Own adds:
|
||||||
build*
|
build*
|
||||||
Makefile
|
Makefile
|
||||||
S_New4
|
S_New4
|
||||||
|
298
Changelog.md
298
Changelog.md
@ -1,149 +1,149 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### v.5.1.1
|
### v.5.1.1
|
||||||
* Update Curl Lib & WinLib handling
|
* Update Curl Lib & WinLib handling
|
||||||
|
|
||||||
### v.5.1.0
|
### v.5.1.0
|
||||||
* Add update Warning
|
* Add update Warning
|
||||||
|
|
||||||
### v.5.0.0
|
### v.5.0.0
|
||||||
* Multi Page support!
|
* Multi Page support!
|
||||||
|
|
||||||
### v.4.3.0
|
### v.4.3.0
|
||||||
* Second Download url, if first doesn't work anymore
|
* Second Download url, if first doesn't work anymore
|
||||||
|
|
||||||
### v.4.2.0
|
### v.4.2.0
|
||||||
* New Update Url.... manuel update needed
|
* New Update Url.... manuel update needed
|
||||||
|
|
||||||
### v.4.1.0
|
### v.4.1.0
|
||||||
* Change s.to -> serienstream.sx
|
* Change s.to -> serienstream.sx
|
||||||
|
|
||||||
### v.4.0.4
|
### v.4.0.4
|
||||||
* Fix Error: Konnte Position von script async= nicht finden
|
* Fix Error: Konnte Position von script async= nicht finden
|
||||||
|
|
||||||
### v.4.0.2/3
|
### v.4.0.2/3
|
||||||
* Entferne /embed bei Vivo und ignoriere Groß-& Kleinschreib. Bei -l & -g
|
* Entferne /embed bei Vivo und ignoriere Groß-& Kleinschreib. Bei -l & -g
|
||||||
|
|
||||||
### v.4.0.1
|
### v.4.0.1
|
||||||
* Behebe falsche Position von der 0 bei der Zeit im LogFile
|
* Behebe falsche Position von der 0 bei der Zeit im LogFile
|
||||||
|
|
||||||
### v.4.0.0
|
### v.4.0.0
|
||||||
* Füge Architekture ARM v6 hinzu
|
* Füge Architekture ARM v6 hinzu
|
||||||
|
|
||||||
### v.3.9.1/2/3
|
### v.3.9.1/2/3
|
||||||
* Behebe Fehler bei der Replace Funktion + Farben bei der LogFile ausgabe
|
* Behebe Fehler bei der Replace Funktion + Farben bei der LogFile ausgabe
|
||||||
|
|
||||||
### v.3.9.0
|
### v.3.9.0
|
||||||
* Neu: Möglichkeit, mehrere Dateien mit -o anzugeben
|
* Neu: Möglichkeit, mehrere Dateien mit -o anzugeben
|
||||||
* Im DefaultFile: Schreibe nun, wenn nicht verändert mit -o Ausgabe ins LogFile
|
* Im DefaultFile: Schreibe nun, wenn nicht verändert mit -o Ausgabe ins LogFile
|
||||||
|
|
||||||
### v.3.8.0
|
### v.3.8.0
|
||||||
* Log System
|
* Log System
|
||||||
|
|
||||||
### v.3.6.3 -> 3.8
|
### v.3.6.3 -> 3.8
|
||||||
* SIEHE IN GIT COMMITS
|
* SIEHE IN GIT COMMITS
|
||||||
|
|
||||||
### v3.6.2
|
### v3.6.2
|
||||||
* Füge ChangeLog Datei hinzu
|
* Füge ChangeLog Datei hinzu
|
||||||
|
|
||||||
### v3.6.1
|
### v3.6.1
|
||||||
* Extra ausgabe bei ungültigen Redirect Links, vorallem bei Unterfunktion url
|
* Extra ausgabe bei ungültigen Redirect Links, vorallem bei Unterfunktion url
|
||||||
* Verschiebe Source Dateien in den Order src/
|
* Verschiebe Source Dateien in den Order src/
|
||||||
|
|
||||||
### v3.6.0
|
### v3.6.0
|
||||||
* Deaktivireung des Proxy mit Port 0 nun möglich
|
* Deaktivireung des Proxy mit Port 0 nun möglich
|
||||||
|
|
||||||
### v3.5.6
|
### v3.5.6
|
||||||
* Bei Haupt Helpmenüe kann man nun -- weglassen bei --help
|
* Bei Haupt Helpmenüe kann man nun -- weglassen bei --help
|
||||||
|
|
||||||
### v3.5.5
|
### v3.5.5
|
||||||
* Stoppe nun sofort, wenn checkName Function durch fehlerhaften HTML code fehlschlägt
|
* Stoppe nun sofort, wenn checkName Function durch fehlerhaften HTML code fehlschlägt
|
||||||
|
|
||||||
### v3.5.4
|
### v3.5.4
|
||||||
* Größere Fehlerbehebungen
|
* Größere Fehlerbehebungen
|
||||||
|
|
||||||
### v3.5.3
|
### v3.5.3
|
||||||
* Bei Serienauswahl wird nun auch der 2.te Name falls vorhanden angezeigt ( bei 1ner Möglichkeiten (1 Serien gefunden) )
|
* Bei Serienauswahl wird nun auch der 2.te Name falls vorhanden angezeigt ( bei 1ner Möglichkeiten (1 Serien gefunden) )
|
||||||
|
|
||||||
### v3.5.2
|
### v3.5.2
|
||||||
* Bei Serienauswahl wird nun auch der 2.te Name falls vorhanden angezeigt ( bei mehren Möglichkeiten (verschiedenen Serien) )
|
* Bei Serienauswahl wird nun auch der 2.te Name falls vorhanden angezeigt ( bei mehren Möglichkeiten (verschiedenen Serien) )
|
||||||
|
|
||||||
### v3.5.1
|
### v3.5.1
|
||||||
* Serienliste: Seriensortierung: Genres -> Alphabet
|
* Serienliste: Seriensortierung: Genres -> Alphabet
|
||||||
|
|
||||||
### v3.5.0
|
### v3.5.0
|
||||||
* Neuer Parameter: -s bei der Unterfunktion info um Namenausgabe der einzelnen Folgen zu verhindern
|
* Neuer Parameter: -s bei der Unterfunktion info um Namenausgabe der einzelnen Folgen zu verhindern
|
||||||
|
|
||||||
### v3.4.6
|
### v3.4.6
|
||||||
* Behebe Fehler bei Serien mit HTML Sonderzeichen im Namen in der Serienliste
|
* Behebe Fehler bei Serien mit HTML Sonderzeichen im Namen in der Serienliste
|
||||||
|
|
||||||
### v3.4.5
|
### v3.4.5
|
||||||
* Füge Farbausgabe bei der Unterfuktion info hinzu
|
* Füge Farbausgabe bei der Unterfuktion info hinzu
|
||||||
|
|
||||||
### v3.4.4
|
### v3.4.4
|
||||||
* Erseze HTML Sonderzeichen mit Asci Zeichen in info Unterfunktion
|
* Erseze HTML Sonderzeichen mit Asci Zeichen in info Unterfunktion
|
||||||
* Verbessere Ausgabe bei der Unterfunktion info
|
* Verbessere Ausgabe bei der Unterfunktion info
|
||||||
|
|
||||||
### v3.4.3
|
### v3.4.3
|
||||||
* Behbe bei manchen Function: In Windows Pfadzeichen / -> \
|
* Behbe bei manchen Function: In Windows Pfadzeichen / -> \
|
||||||
* Behebe Fehler in Suchfunktion bei Serien mit einem / im Namen
|
* Behebe Fehler in Suchfunktion bei Serien mit einem / im Namen
|
||||||
|
|
||||||
### v3.4.2
|
### v3.4.2
|
||||||
* Füge Fehlernachricht bei --remove hinzu, wenn kein Ordner ausgewählt wurde
|
* Füge Fehlernachricht bei --remove hinzu, wenn kein Ordner ausgewählt wurde
|
||||||
|
|
||||||
### v3.4.1
|
### v3.4.1
|
||||||
* Größere Fehlerbehebungen
|
* Größere Fehlerbehebungen
|
||||||
* Füge Unterfunktion --remove dem Helpmenü hinzu
|
* Füge Unterfunktion --remove dem Helpmenü hinzu
|
||||||
|
|
||||||
### v3.4.0
|
### v3.4.0
|
||||||
* Neue Unterfunktion: --remove
|
* Neue Unterfunktion: --remove
|
||||||
|
|
||||||
### v3.3.2
|
### v3.3.2
|
||||||
* Entferne vor kurzem hinzugefügtes überprüfen nach HTML Fehlern beim herunterladen der Internetseiten
|
* Entferne vor kurzem hinzugefügtes überprüfen nach HTML Fehlern beim herunterladen der Internetseiten
|
||||||
|
|
||||||
### v3.3.1
|
### v3.3.1
|
||||||
* Verbesserung der Überprüfung der Versionen beim Updaten
|
* Verbesserung der Überprüfung der Versionen beim Updaten
|
||||||
|
|
||||||
### v3.3.0
|
### v3.3.0
|
||||||
* Überarbeitung der Unterfunkion --update
|
* Überarbeitung der Unterfunkion --update
|
||||||
|
|
||||||
### v3.2.0
|
### v3.2.0
|
||||||
* Füge Update hinzu: Vorsicht fehlerhaft -> v3.2.0
|
* Füge Update hinzu: Vorsicht fehlerhaft -> v3.2.0
|
||||||
* Füge Function zum Downloaden in Dateien
|
* Füge Function zum Downloaden in Dateien
|
||||||
* Update Readme
|
* Update Readme
|
||||||
|
|
||||||
### v3.1.1
|
### v3.1.1
|
||||||
* Behebe Pfade im Helpmenü
|
* Behebe Pfade im Helpmenü
|
||||||
* Update Readme
|
* Update Readme
|
||||||
* füge Windows Libraries hinzu
|
* füge Windows Libraries hinzu
|
||||||
|
|
||||||
### v3.1.0
|
### v3.1.0
|
||||||
* Mann kan nun bei Ungültiger Serie 1ne Serie aus mehreren Möglichkeiten auswählen, falls vorhanden
|
* Mann kan nun bei Ungültiger Serie 1ne Serie aus mehreren Möglichkeiten auswählen, falls vorhanden
|
||||||
|
|
||||||
### v3.0.6 / v3.0.5
|
### v3.0.6 / v3.0.5
|
||||||
* Behebe Überschreibung des Namens in der Serienauswahlfunktion
|
* Behebe Überschreibung des Namens in der Serienauswahlfunktion
|
||||||
* Debug Nachrichten & Besseres Aussehen der Debug nachrichten
|
* Debug Nachrichten & Besseres Aussehen der Debug nachrichten
|
||||||
* Behebe Fehler: Programm stoppt wenn Staffel beendet ist, wartet aber nicht auf die Threads
|
* Behebe Fehler: Programm stoppt wenn Staffel beendet ist, wartet aber nicht auf die Threads
|
||||||
|
|
||||||
### v3.0.4
|
### v3.0.4
|
||||||
* Behebe Fehler beim 1. mal Updaten der Serienliste, wenn die Datei noch nicht existiert
|
* Behebe Fehler beim 1. mal Updaten der Serienliste, wenn die Datei noch nicht existiert
|
||||||
|
|
||||||
### v3.0.3
|
### v3.0.3
|
||||||
* Behebe Helpmenü fehler
|
* Behebe Helpmenü fehler
|
||||||
* Füge Hoster * hinzu, aber nur mit Trick möglich, da dieser Vorgang unnötig viele Accounts braucht
|
* Füge Hoster * hinzu, aber nur mit Trick möglich, da dieser Vorgang unnötig viele Accounts braucht
|
||||||
|
|
||||||
### v3.0.2
|
### v3.0.2
|
||||||
* Aktualisiere Unterfuktion search's Helpmenü
|
* Aktualisiere Unterfuktion search's Helpmenü
|
||||||
* Aktualisiere Defaults-Datei (neue Bezeichnungen)
|
* Aktualisiere Defaults-Datei (neue Bezeichnungen)
|
||||||
|
|
||||||
### v3.0.1
|
### v3.0.1
|
||||||
* Größere Fehlerbehebungen
|
* Größere Fehlerbehebungen
|
||||||
* Nun möglich: Updaten der serienliste und Namesuche
|
* Nun möglich: Updaten der serienliste und Namesuche
|
||||||
|
|
||||||
### v3.0.0
|
### v3.0.0
|
||||||
* Füge Updatewarnsystem bei Serienliste hinzu
|
* Füge Updatewarnsystem bei Serienliste hinzu
|
||||||
|
|
||||||
### Vorher
|
### Vorher
|
||||||
* -
|
* -
|
||||||
|
|
||||||
|
|
||||||
|
160
README.md
160
README.md
@ -1,80 +1,80 @@
|
|||||||
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
||||||
|
|
||||||
|
|
||||||
# S_New4
|
# S_New4
|
||||||
|
|
||||||
Aufruf: S_New4 [Unteroption] [PARAMETER]...
|
Aufruf: S_New4 [Unteroption] [PARAMETER]...
|
||||||
|
|
||||||
### Beschreibung:
|
### Beschreibung:
|
||||||
-> Mit diesem Programm kann man die Download-Urls
|
-> Mit diesem Programm kann man die Download-Urls
|
||||||
oder Informationen von Serien bekommen.
|
oder Informationen von Serien bekommen.
|
||||||
-> Mit diesem Programm kann man Redirect-Links von
|
-> Mit diesem Programm kann man Redirect-Links von
|
||||||
s.to umwandeln.
|
s.to umwandeln.
|
||||||
|
|
||||||
### Unteroptionen:
|
### Unteroptionen:
|
||||||
"--help" Gibt dieses Helpmenue aus.
|
"--help" Gibt dieses Helpmenue aus.
|
||||||
"--version" Gibt die Version des Programmes aus.
|
"--version" Gibt die Version des Programmes aus.
|
||||||
"--update" Modus um das Programm zu aktualisieren.
|
"--update" Modus um das Programm zu aktualisieren.
|
||||||
Updater funktioniert nur bei: Windows/Linux -
|
Updater funktioniert nur bei: Windows/Linux -
|
||||||
x86 Architekutur - 64 Bit Systemen und Arm6 32 Bit.
|
x86 Architekutur - 64 Bit Systemen und Arm6 32 Bit.
|
||||||
"--remove" Modus um Ordner mit Einstellungen/
|
"--remove" Modus um Ordner mit Einstellungen/
|
||||||
Zwischengespeicherte-Dateien zu löschen.
|
Zwischengespeicherte-Dateien zu löschen.
|
||||||
"url" Modus um eigene Redirect-Links umzuwandeln.
|
"url" Modus um eigene Redirect-Links umzuwandeln.
|
||||||
"default" Modus um Links von Serien zu bekommen.
|
"default" Modus um Links von Serien zu bekommen.
|
||||||
"search" Modus um Serien zu suchen.
|
"search" Modus um Serien zu suchen.
|
||||||
"info" Modus um Infos einer Serien zu bekommen.
|
"info" Modus um Infos einer Serien zu bekommen.
|
||||||
"clean" Modus um Cookie-Files zu löschen.
|
"clean" Modus um Cookie-Files zu löschen.
|
||||||
"news" Modus um neusten 75 Folgen auf s.to zu sehen.
|
"news" Modus um neusten 75 Folgen auf s.to zu sehen.
|
||||||
"log" Modus um Log Datei zu sehen / leeren.
|
"log" Modus um Log Datei zu sehen / leeren.
|
||||||
|
|
||||||
### Verzeichnisse:
|
### Verzeichnisse:
|
||||||
Ordner zum zwischenspeichern der Cookies und der AccountNummer:
|
Ordner zum zwischenspeichern der Cookies und der AccountNummer:
|
||||||
> '/home/*/.cache/S_New4/' - Linux
|
> '/home/*/.cache/S_New4/' - Linux
|
||||||
> '%LocalAppData%/S_New4' - Windows
|
> '%LocalAppData%/S_New4' - Windows
|
||||||
Ordner zum speichern der Accounts und Default-Einstellungen:
|
Ordner zum speichern der Accounts und Default-Einstellungen:
|
||||||
> '/home/*/.config/S_New4/' - Linux
|
> '/home/*/.config/S_New4/' - Linux
|
||||||
> '%AppData%/S_New4' - Windows
|
> '%AppData%/S_New4' - Windows
|
||||||
|
|
||||||
|
|
||||||
## Updater Funktion:
|
## Updater Funktion:
|
||||||
##### S_New4 hat einen Updater der für folgende Systeme funktioniert:
|
##### S_New4 hat einen Updater der für folgende Systeme funktioniert:
|
||||||
##### * Windows, 64 Bit Programm ( Die neue Version ist immer 64 Bit ), x86 Architektur
|
##### * Windows, 64 Bit Programm ( Die neue Version ist immer 64 Bit ), x86 Architektur
|
||||||
##### * Linux, 64 Bit Programm ( Die neue Version ist immer 64 Bit ), x86 Architektur
|
##### * Linux, 64 Bit Programm ( Die neue Version ist immer 64 Bit ), x86 Architektur
|
||||||
##### * Linux, 32 Bit Programm ( Die neue Version ist immer 32 Bit ), ARM v6
|
##### * Linux, 32 Bit Programm ( Die neue Version ist immer 32 Bit ), ARM v6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Compalieren
|
# Compalieren
|
||||||
|
|
||||||
|
|
||||||
### Linux:
|
### Linux:
|
||||||
|
|
||||||
##### Abhängigkeiten:
|
##### Abhängigkeiten:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install libcurl4-openssl-dev
|
sudo apt install libcurl4-openssl-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
#### g++
|
#### g++
|
||||||
```sh
|
```sh
|
||||||
g++ --std=c++14 accountManager.cpp accountManager.h main.cpp pageManager.cpp pageManager.h parameterManager.cpp parameterManager.h programManager.cpp programManager.h logger.h logger.cpp -lcurl -lpthread -o S_New4
|
g++ --std=c++14 accountManager.cpp accountManager.h main.cpp pageManager.cpp pageManager.h parameterManager.cpp parameterManager.h programManager.cpp programManager.h logger.h logger.cpp -lcurl -lpthread -o S_New4
|
||||||
```
|
```
|
||||||
|
|
||||||
#### QT-Style:
|
#### QT-Style:
|
||||||
```sh
|
```sh
|
||||||
qmake && make
|
qmake && make
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows: (nur x86_64 Architekture, wenn beigefügte Libraries verwendet werden möchten)
|
### Windows: (nur x86_64 Architekture, wenn beigefügte Libraries verwendet werden möchten)
|
||||||
|
|
||||||
##### Abhängigkeiten:
|
##### Abhängigkeiten:
|
||||||
|
|
||||||
Empfohlen: Verwende S_New4 mit einem Unicode Compatiblem Terminal: Zum Beispiel mit dem
|
Empfohlen: Verwende S_New4 mit einem Unicode Compatiblem Terminal: Zum Beispiel mit dem
|
||||||
Git Bash Terminal
|
Git Bash Terminal
|
||||||
|
|
||||||
#### QT-Style: ( MinGW-64Bit )
|
#### QT-Style: ( MinGW-64Bit )
|
||||||
|
|
||||||
Nutze den QT-Creator:
|
Nutze den QT-Creator:
|
||||||
> In dem Unterordner curl/ befinden sich die benötigten Header- und Curl-Lib-Dateien für curl
|
> In dem Unterordner curl/ befinden sich die benötigten Header- und Curl-Lib-Dateien für curl
|
||||||
> C++ und Winpthread Libs befinden sich in dem Ordner x86_64-WIN_LIBS/
|
> C++ und Winpthread Libs befinden sich in dem Ordner x86_64-WIN_LIBS/
|
||||||
|
152
alt/g++/.gitignore
vendored
152
alt/g++/.gitignore
vendored
@ -1,76 +1,76 @@
|
|||||||
# This file is used to ignore files which are generated
|
# This file is used to ignore files which are generated
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
*~
|
*~
|
||||||
*.autosave
|
*.autosave
|
||||||
*.a
|
*.a
|
||||||
*.core
|
*.core
|
||||||
*.moc
|
*.moc
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
*.so
|
*.so
|
||||||
*.so.*
|
*.so.*
|
||||||
*_pch.h.cpp
|
*_pch.h.cpp
|
||||||
*_resource.rc
|
*_resource.rc
|
||||||
*.qm
|
*.qm
|
||||||
.#*
|
.#*
|
||||||
*.*#
|
*.*#
|
||||||
core
|
core
|
||||||
!core/
|
!core/
|
||||||
tags
|
tags
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.directory
|
.directory
|
||||||
*.debug
|
*.debug
|
||||||
Makefile*
|
Makefile*
|
||||||
*.prl
|
*.prl
|
||||||
*.app
|
*.app
|
||||||
moc_*.cpp
|
moc_*.cpp
|
||||||
ui_*.h
|
ui_*.h
|
||||||
qrc_*.cpp
|
qrc_*.cpp
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
*.res
|
*.res
|
||||||
*.rc
|
*.rc
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
/.qmake.stash
|
/.qmake.stash
|
||||||
|
|
||||||
# qtcreator generated files
|
# qtcreator generated files
|
||||||
*.pro.user*
|
*.pro.user*
|
||||||
|
|
||||||
# xemacs temporary files
|
# xemacs temporary files
|
||||||
*.flc
|
*.flc
|
||||||
|
|
||||||
# Vim temporary files
|
# Vim temporary files
|
||||||
.*.swp
|
.*.swp
|
||||||
|
|
||||||
# Visual Studio generated files
|
# Visual Studio generated files
|
||||||
*.ib_pdb_index
|
*.ib_pdb_index
|
||||||
*.idb
|
*.idb
|
||||||
*.ilk
|
*.ilk
|
||||||
*.pdb
|
*.pdb
|
||||||
*.sln
|
*.sln
|
||||||
*.suo
|
*.suo
|
||||||
*.vcproj
|
*.vcproj
|
||||||
*vcproj.*.*.user
|
*vcproj.*.*.user
|
||||||
*.ncb
|
*.ncb
|
||||||
*.sdf
|
*.sdf
|
||||||
*.opensdf
|
*.opensdf
|
||||||
*.vcxproj
|
*.vcxproj
|
||||||
*vcxproj.*
|
*vcxproj.*
|
||||||
|
|
||||||
# MinGW generated files
|
# MinGW generated files
|
||||||
*.Debug
|
*.Debug
|
||||||
*.Release
|
*.Release
|
||||||
|
|
||||||
# Python byte code
|
# Python byte code
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
# Binaries
|
# Binaries
|
||||||
# --------
|
# --------
|
||||||
*.dll
|
*.dll
|
||||||
*.exe
|
*.exe
|
||||||
|
|
||||||
#Own adds:
|
#Own adds:
|
||||||
g++/*
|
g++/*
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
i686-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x32.exe -DCURL_STATICLIB -static-libgcc -static-libstdc++ -lpthread -lcurl -lwldap32 -lws2_32 -std=c++11
|
i686-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x32.exe -DCURL_STATICLIB -static-libgcc -static-libstdc++ -lpthread -lcurl -lwldap32 -lws2_32 -std=c++11
|
||||||
sleep 3
|
sleep 3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#x86_64-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x64.exe -DCURL_STATICLIB -static-libgcc -static-libstdc++ -lpthread -lcurl -lwldap32 -lws2_32 -std=c++11
|
#x86_64-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x64.exe -DCURL_STATICLIB -static-libgcc -static-libstdc++ -lpthread -lcurl -lwldap32 -lws2_32 -std=c++11
|
||||||
x86_64-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x64.exe -static-libgcc -static-libstdc++ -lpthread -lcurl -lws2_32 -std=c++11
|
x86_64-w64-mingw32-g++ ./*.h ./*.cpp -o S_New4_x64.exe -static-libgcc -static-libstdc++ -lpthread -lcurl -lws2_32 -std=c++11
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
|
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
|
||||||
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 5
|
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 5
|
||||||
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 5
|
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 5
|
||||||
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
|
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
|
||||||
QMAKE_CXX.COMPILER_MACROS = \
|
QMAKE_CXX.COMPILER_MACROS = \
|
||||||
QT_COMPILER_STDCXX \
|
QT_COMPILER_STDCXX \
|
||||||
QMAKE_GCC_MAJOR_VERSION \
|
QMAKE_GCC_MAJOR_VERSION \
|
||||||
QMAKE_GCC_MINOR_VERSION \
|
QMAKE_GCC_MINOR_VERSION \
|
||||||
QMAKE_GCC_PATCH_VERSION
|
QMAKE_GCC_PATCH_VERSION
|
||||||
QMAKE_CXX.INCDIRS = \
|
QMAKE_CXX.INCDIRS = \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++ \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++ \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++/x86_64-w64-mingw32.static \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++/x86_64-w64-mingw32.static \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++/backward \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include/c++/backward \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include-fixed \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0/include-fixed \
|
||||||
/home/markus/git/mxe/usr/x86_64-w64-mingw32.static/include
|
/home/markus/git/mxe/usr/x86_64-w64-mingw32.static/include
|
||||||
QMAKE_CXX.LIBDIRS = \
|
QMAKE_CXX.LIBDIRS = \
|
||||||
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0 \
|
/home/markus/git/mxe/usr/lib/gcc/x86_64-w64-mingw32.static/5.5.0 \
|
||||||
/home/markus/git/mxe/usr/x86_64-w64-mingw32.static/lib
|
/home/markus/git/mxe/usr/x86_64-w64-mingw32.static/lib
|
||||||
|
@ -1,44 +1,44 @@
|
|||||||
QT -= gui
|
QT -= gui
|
||||||
#CONFIG += -static -libstdc++ -static-libgcc #-static
|
#CONFIG += -static -libstdc++ -static-libgcc #-static
|
||||||
|
|
||||||
#Linux:
|
#Linux:
|
||||||
unix: LIBS += -lcurl
|
unix: LIBS += -lcurl
|
||||||
|
|
||||||
#Windows
|
#Windows
|
||||||
win32: LIBS += -L$${_PRO_FILE_PWD_}\..\lib\ -lcurl # 7.82.0
|
win32: LIBS += -L$${_PRO_FILE_PWD_}\..\lib\ -lcurl # 7.82.0
|
||||||
#win32: LIBS += -L$${_PRO_FILE_PWD_}\..\alt\ -lcurl # 7.64.1
|
#win32: LIBS += -L$${_PRO_FILE_PWD_}\..\alt\ -lcurl # 7.64.1
|
||||||
|
|
||||||
|
|
||||||
CONFIG += c++17 console
|
CONFIG += c++17 console
|
||||||
CONFIG -= app_bundle
|
CONFIG -= app_bundle
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
# any Qt feature that has been marked deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
# deprecated API in order to know how to port your code away from it.
|
# deprecated API in order to know how to port your code away from it.
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
pageManager.cpp \
|
pageManager.cpp \
|
||||||
parameterManager.cpp \
|
parameterManager.cpp \
|
||||||
programManager.cpp \
|
programManager.cpp \
|
||||||
accountManager.cpp \
|
accountManager.cpp \
|
||||||
logger.cpp
|
logger.cpp
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
pageManager.h \
|
pageManager.h \
|
||||||
parameterManager.h \
|
parameterManager.h \
|
||||||
programManager.h \
|
programManager.h \
|
||||||
accountManager.h \
|
accountManager.h \
|
||||||
logger.h
|
logger.h
|
||||||
|
@ -1,275 +1,275 @@
|
|||||||
#include "accountManager.h"
|
#include "accountManager.h"
|
||||||
|
|
||||||
AccountManager::AccountManager(std::string pathToFil, std::string pathToAccountNumberFile, PAGE page, const PAGE *pagesALL)
|
AccountManager::AccountManager(std::string pathToFil, std::string pathToAccountNumberFile, PAGE page, const PAGE *pagesALL)
|
||||||
: pagesALL(pagesALL), pathToAccountNumberFile(pathToAccountNumberFile + "_" + page.name_id), pageInUse(page)
|
: pagesALL(pagesALL), pathToAccountNumberFile(pathToAccountNumberFile + "_" + page.name_id), pageInUse(page)
|
||||||
{
|
{
|
||||||
std::string pathToAccountsFile = pathToFil + "_" + page.name_id;
|
std::string pathToAccountsFile = pathToFil + "_" + page.name_id;
|
||||||
std::ifstream ifs(pathToAccountsFile);
|
std::ifstream ifs(pathToAccountsFile);
|
||||||
if(!ifs.is_open()) {
|
if(!ifs.is_open()) {
|
||||||
if(writeDefault(pathToAccountsFile) != 0)
|
if(writeDefault(pathToAccountsFile) != 0)
|
||||||
exit(12);
|
exit(12);
|
||||||
ifs.open(pathToAccountsFile);
|
ifs.open(pathToAccountsFile);
|
||||||
if(!ifs.is_open()) {
|
if(!ifs.is_open()) {
|
||||||
std::cout << " => Error: Konnte Account File nicht aufmachen" << std::endl;
|
std::cout << " => Error: Konnte Account File nicht aufmachen" << std::endl;
|
||||||
exit(13);
|
exit(13);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(ifs, line)) {
|
while (std::getline(ifs, line)) {
|
||||||
if(line.length() > 0 && line[0] == '#')
|
if(line.length() > 0 && line[0] == '#')
|
||||||
continue;
|
continue;
|
||||||
Account account;
|
Account account;
|
||||||
size_t Delimeter = line.find("/");
|
size_t Delimeter = line.find("/");
|
||||||
|
|
||||||
if(Delimeter == std::string::npos) {
|
if(Delimeter == std::string::npos) {
|
||||||
account.Email = line;
|
account.Email = line;
|
||||||
account.Password = line;
|
account.Password = line;
|
||||||
} else {
|
} else {
|
||||||
account.Email = std::string(line).erase(Delimeter, line.length() - Delimeter);
|
account.Email = std::string(line).erase(Delimeter, line.length() - Delimeter);
|
||||||
account.Password = line.erase(0, Delimeter + 1);
|
account.Password = line.erase(0, Delimeter + 1);
|
||||||
}
|
}
|
||||||
if(account.Email == "" || account.Password == "")
|
if(account.Email == "" || account.Password == "")
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
accounts.push_back(account);
|
accounts.push_back(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
ifs.close();
|
ifs.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Account AccountManager::getNextAccount()
|
Account AccountManager::getNextAccount()
|
||||||
{
|
{
|
||||||
if(accounts.size() == 0) {
|
if(accounts.size() == 0) {
|
||||||
std::cout << " => Error: Keine Accounts vorhanden." << std::endl;
|
std::cout << " => Error: Keine Accounts vorhanden." << std::endl;
|
||||||
exit(36);
|
exit(36);
|
||||||
}
|
}
|
||||||
size_t accountNumber = getLastAccountNumber();
|
size_t accountNumber = getLastAccountNumber();
|
||||||
++accountNumber;
|
++accountNumber;
|
||||||
|
|
||||||
if( accountNumber >= accounts.size() )
|
if( accountNumber >= accounts.size() )
|
||||||
accountNumber=0;
|
accountNumber=0;
|
||||||
if(setLastAccountNumber(accountNumber) != 0)
|
if(setLastAccountNumber(accountNumber) != 0)
|
||||||
exit(45);
|
exit(45);
|
||||||
|
|
||||||
return accounts.at(accountNumber);
|
return accounts.at(accountNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AccountManager::writeDefault(std::string path)
|
int AccountManager::writeDefault(std::string path)
|
||||||
{
|
{
|
||||||
std::ofstream ofs(path);
|
std::ofstream ofs(path);
|
||||||
if(!ofs.is_open()) {
|
if(!ofs.is_open()) {
|
||||||
perror((std::string(" => Error: Konnte Account Datei nicht aufmachen: ") + path).c_str());
|
perror((std::string(" => Error: Konnte Account Datei nicht aufmachen: ") + path).c_str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
std::cout << " => Erstelle Datei mit Accounts unter: " << path << "..." <<std::endl;
|
std::cout << " => Erstelle Datei mit Accounts unter: " << path << "..." <<std::endl;
|
||||||
ofs << "# <- Am Anfang der Zeile deaktiviert diese." << std::endl;
|
ofs << "# <- Am Anfang der Zeile deaktiviert diese." << std::endl;
|
||||||
ofs << "#Email/Passwort - Falls diese gleich sind, geht auch nur Email oder Passwort" << std::endl;
|
ofs << "#Email/Passwort - Falls diese gleich sind, geht auch nur Email oder Passwort" << std::endl;
|
||||||
|
|
||||||
enum pagesID {
|
enum pagesID {
|
||||||
STO,
|
STO,
|
||||||
ANICLOUD,
|
ANICLOUD,
|
||||||
STOIP,
|
STOIP,
|
||||||
SERIENCAM,
|
SERIENCAM,
|
||||||
SERIENSTREAMTO
|
SERIENSTREAMTO
|
||||||
};
|
};
|
||||||
|
|
||||||
if( pageInUse.url == pagesALL[STO].url
|
if( pageInUse.url == pagesALL[STO].url
|
||||||
|| pageInUse.url == pagesALL[STOIP].url
|
|| pageInUse.url == pagesALL[STOIP].url
|
||||||
|| pageInUse.url == pagesALL[SERIENCAM].url
|
|| pageInUse.url == pagesALL[SERIENCAM].url
|
||||||
|| pageInUse.url == pagesALL[SERIENSTREAMTO].url)
|
|| pageInUse.url == pagesALL[SERIENSTREAMTO].url)
|
||||||
{
|
{
|
||||||
ofs << "EntzueckendPackenderSkorpion@oida.icu" << std::endl;
|
ofs << "EntzueckendPackenderSkorpion@oida.icu" << std::endl;
|
||||||
ofs << "HumorvollWundervollerDelfin@spam.care/HumorvollWundervollerDelfin@spam.care" << std::endl;
|
ofs << "HumorvollWundervollerDelfin@spam.care/HumorvollWundervollerDelfin@spam.care" << std::endl;
|
||||||
ofs << "ExzellentPackenderHirsch@muell.icu/ExzellentPackenderHirsch@muell.icu" << std::endl;
|
ofs << "ExzellentPackenderHirsch@muell.icu/ExzellentPackenderHirsch@muell.icu" << std::endl;
|
||||||
ofs << "GrandiosLeuchtenderPanda@papierkorb.me" << std::endl;
|
ofs << "GrandiosLeuchtenderPanda@papierkorb.me" << std::endl;
|
||||||
ofs << "AttraktivPositiverSteinbock@magspam.net" << std::endl;
|
ofs << "AttraktivPositiverSteinbock@magspam.net" << std::endl;
|
||||||
ofs << "FreundlichKostbarerSteinbock@spam.care" << std::endl;
|
ofs << "FreundlichKostbarerSteinbock@spam.care" << std::endl;
|
||||||
ofs << "FabelhaftSelbstsichererUhu@spam.care" << std::endl;
|
ofs << "FabelhaftSelbstsichererUhu@spam.care" << std::endl;
|
||||||
ofs << "HumorvollSinnlicherRabe@muell.icu" << std::endl;
|
ofs << "HumorvollSinnlicherRabe@muell.icu" << std::endl;
|
||||||
ofs << "AnspruchsvollTraumhafterPavian@ultra.fyi" << std::endl;
|
ofs << "AnspruchsvollTraumhafterPavian@ultra.fyi" << std::endl;
|
||||||
ofs << "FaszinierendRiskanterLuchs@magspam.net" << std::endl;
|
ofs << "FaszinierendRiskanterLuchs@magspam.net" << std::endl;
|
||||||
ofs << "BeruehmtMystischerPanda@ultra.fyi" << std::endl;
|
ofs << "BeruehmtMystischerPanda@ultra.fyi" << std::endl;
|
||||||
ofs << "CharmantRasanterLoewe@existiert.net" << std::endl;
|
ofs << "CharmantRasanterLoewe@existiert.net" << std::endl;
|
||||||
ofs << "BedeutendLuesternerAal@existiert.net" << std::endl;
|
ofs << "BedeutendLuesternerAal@existiert.net" << std::endl;
|
||||||
ofs << "ElegantSelbstsichererAdler@ultra.fyi" << std::endl;
|
ofs << "ElegantSelbstsichererAdler@ultra.fyi" << std::endl;
|
||||||
ofs << "FaszinierendKoeniglicherBaer@spam.care" << std::endl;
|
ofs << "FaszinierendKoeniglicherBaer@spam.care" << std::endl;
|
||||||
ofs << "CharmantKostbarerLoewe@magspam.net" << std::endl;
|
ofs << "CharmantKostbarerLoewe@magspam.net" << std::endl;
|
||||||
ofs << "BedeutendPrallerSkorpion@muellemail.com" << std::endl;
|
ofs << "BedeutendPrallerSkorpion@muellemail.com" << std::endl;
|
||||||
ofs << "FreundlichPerfekterRochen@muellmail.com" << std::endl;
|
ofs << "FreundlichPerfekterRochen@muellmail.com" << std::endl;
|
||||||
ofs << "AusgelassenKostbarerBasilisk@magspam.net" << std::endl;
|
ofs << "AusgelassenKostbarerBasilisk@magspam.net" << std::endl;
|
||||||
ofs << "FabelhaftLebhafterSchakal@ultra.fyi" << std::endl;
|
ofs << "FabelhaftLebhafterSchakal@ultra.fyi" << std::endl;
|
||||||
ofs << "ExzellentSchoenerSteinbock@existiert.net" << std::endl;
|
ofs << "ExzellentSchoenerSteinbock@existiert.net" << std::endl;
|
||||||
ofs << "ErhellendLustvollerAdler@muell.icu" << std::endl;
|
ofs << "ErhellendLustvollerAdler@muell.icu" << std::endl;
|
||||||
ofs << "ExzellentIdealerSchakal@muell.icu" << std::endl;
|
ofs << "ExzellentIdealerSchakal@muell.icu" << std::endl;
|
||||||
ofs << "BrillantVitalerSalamander@spam.care" << std::endl;
|
ofs << "BrillantVitalerSalamander@spam.care" << std::endl;
|
||||||
ofs << "BezauberndRiesigerSchakal@oida.icu" << std::endl;
|
ofs << "BezauberndRiesigerSchakal@oida.icu" << std::endl;
|
||||||
ofs << "DynamischWarmerBaer@magspam.net" << std::endl;
|
ofs << "DynamischWarmerBaer@magspam.net" << std::endl;
|
||||||
ofs << "EmotionalLeidenschaftlicherBaer@oida.icu" << std::endl;
|
ofs << "EmotionalLeidenschaftlicherBaer@oida.icu" << std::endl;
|
||||||
ofs << "BewundernswertWarmerSchwan@oida.icu" << std::endl;
|
ofs << "BewundernswertWarmerSchwan@oida.icu" << std::endl;
|
||||||
ofs << "HuebschUnfassbarerAal@papierkorb.me" << std::endl;
|
ofs << "HuebschUnfassbarerAal@papierkorb.me" << std::endl;
|
||||||
ofs << "FroehlichWundervollerBiber@muellmail.com" << std::endl;
|
ofs << "FroehlichWundervollerBiber@muellmail.com" << std::endl;
|
||||||
ofs << "BefreiendWilderDelfin@spam.care" << std::endl;
|
ofs << "BefreiendWilderDelfin@spam.care" << std::endl;
|
||||||
ofs << "FreundlichStilvollerTiger@oida.icu" << std::endl;
|
ofs << "FreundlichStilvollerTiger@oida.icu" << std::endl;
|
||||||
ofs << "EchtKoeniglicherStorch@existiert.net" << std::endl;
|
ofs << "EchtKoeniglicherStorch@existiert.net" << std::endl;
|
||||||
ofs << "BefluegeltPrallerSchwan@spam.care" << std::endl;
|
ofs << "BefluegeltPrallerSchwan@spam.care" << std::endl;
|
||||||
ofs << "ErhellendSeltenerSeeloewe@ultra.fyi" << std::endl;
|
ofs << "ErhellendSeltenerSeeloewe@ultra.fyi" << std::endl;
|
||||||
ofs << "FreundlichZuverlaessigerSchwan@spam.care" << std::endl;
|
ofs << "FreundlichZuverlaessigerSchwan@spam.care" << std::endl;
|
||||||
ofs << "HervorragendWundervollerReiher@oida.icu" << std::endl;
|
ofs << "HervorragendWundervollerReiher@oida.icu" << std::endl;
|
||||||
ofs << "AnspruchsvollStilvollerUhu@magspam.net" << std::endl;
|
ofs << "AnspruchsvollStilvollerUhu@magspam.net" << std::endl;
|
||||||
ofs << "AnmutigTraumhafterHai@muellemail.com" << std::endl;
|
ofs << "AnmutigTraumhafterHai@muellemail.com" << std::endl;
|
||||||
ofs << "AtemberaubendIdealerTapir@ultra.fyi" << std::endl;
|
ofs << "AtemberaubendIdealerTapir@ultra.fyi" << std::endl;
|
||||||
ofs << "GeheimLeuchtenderLuchs@muellemail.com" << std::endl;
|
ofs << "GeheimLeuchtenderLuchs@muellemail.com" << std::endl;
|
||||||
ofs << "DuftendKlarerTapir@muellmail.com" << std::endl;
|
ofs << "DuftendKlarerTapir@muellmail.com" << std::endl;
|
||||||
ofs << "GeheimUnwiderstehlicherRabe@muell.icu" << std::endl;
|
ofs << "GeheimUnwiderstehlicherRabe@muell.icu" << std::endl;
|
||||||
ofs << "ExtravagantSpektakulaererAdler@spam.care" << std::endl;
|
ofs << "ExtravagantSpektakulaererAdler@spam.care" << std::endl;
|
||||||
ofs << "BildlichWarmerLoewe@oida.icu" << std::endl;
|
ofs << "BildlichWarmerLoewe@oida.icu" << std::endl;
|
||||||
ofs << "AktivKlarerHai@spam.care" << std::endl;
|
ofs << "AktivKlarerHai@spam.care" << std::endl;
|
||||||
ofs << "AktivKostbarerElch@oida.icu" << std::endl;
|
ofs << "AktivKostbarerElch@oida.icu" << std::endl;
|
||||||
ofs << "Strust1991@jourrapide.com" << std::endl;
|
ofs << "Strust1991@jourrapide.com" << std::endl;
|
||||||
ofs << "Natchoughe1928@dayrep.com" << std::endl;
|
ofs << "Natchoughe1928@dayrep.com" << std::endl;
|
||||||
ofs << "zweirot@einrot.com" << std::endl;
|
ofs << "zweirot@einrot.com" << std::endl;
|
||||||
ofs << "AktivMagischerFrosch@existiert.net" << std::endl;
|
ofs << "AktivMagischerFrosch@existiert.net" << std::endl;
|
||||||
ofs << "ErhellendPerfekterDachs@existiert.net" << std::endl;
|
ofs << "ErhellendPerfekterDachs@existiert.net" << std::endl;
|
||||||
ofs << "ojfvwj.fgf@existiert.net" << std::endl;
|
ofs << "ojfvwj.fgf@existiert.net" << std::endl;
|
||||||
ofs << "lusiouae@wegwerfemail.de" << std::endl;
|
ofs << "lusiouae@wegwerfemail.de" << std::endl;
|
||||||
ofs << "fraiwrou@wegwerfemail.de" << std::endl;
|
ofs << "fraiwrou@wegwerfemail.de" << std::endl;
|
||||||
ofs << "driotean@wegwerfemail.de" << std::endl;
|
ofs << "driotean@wegwerfemail.de" << std::endl;
|
||||||
ofs << "tiaprour@wegwerfemail.de" << std::endl;
|
ofs << "tiaprour@wegwerfemail.de" << std::endl;
|
||||||
ofs << "FeurigWarmerPapagei@existiert.net" << std::endl;
|
ofs << "FeurigWarmerPapagei@existiert.net" << std::endl;
|
||||||
ofs << "FrischStilvollerPavian@magspam.net" << std::endl;
|
ofs << "FrischStilvollerPavian@magspam.net" << std::endl;
|
||||||
ofs << "FeurigZaghafterLoewe@muellmail.com" << std::endl;
|
ofs << "FeurigZaghafterLoewe@muellmail.com" << std::endl;
|
||||||
ofs << "GigantischKoeniglicherSchwan@magspam.net" << std::endl;
|
ofs << "GigantischKoeniglicherSchwan@magspam.net" << std::endl;
|
||||||
ofs << "FreizuegigPersoenlicherLemming@spam.care" << std::endl;
|
ofs << "FreizuegigPersoenlicherLemming@spam.care" << std::endl;
|
||||||
ofs << "BelebtIntelligenterHusky@papierkorb.me" << std::endl;
|
ofs << "BelebtIntelligenterHusky@papierkorb.me" << std::endl;
|
||||||
ofs << "FreundlichMaximalerSpecht@muellmail.com" << std::endl;
|
ofs << "FreundlichMaximalerSpecht@muellmail.com" << std::endl;
|
||||||
ofs << "FreundlichStarkerHirsch@ultra.fyi" << std::endl;
|
ofs << "FreundlichStarkerHirsch@ultra.fyi" << std::endl;
|
||||||
ofs << "ErstklassigRasanterElch@oida.icu" << std::endl;
|
ofs << "ErstklassigRasanterElch@oida.icu" << std::endl;
|
||||||
ofs << "FreundlichStarkerPavian@ultra.fyi" << std::endl;
|
ofs << "FreundlichStarkerPavian@ultra.fyi" << std::endl;
|
||||||
ofs << "EinfuehlsamRiskanterPapagei@oida.icu" << std::endl;
|
ofs << "EinfuehlsamRiskanterPapagei@oida.icu" << std::endl;
|
||||||
ofs << "FantastischPositiverHirsch@existiert.net" << std::endl;
|
ofs << "FantastischPositiverHirsch@existiert.net" << std::endl;
|
||||||
ofs << "GeborgenIndividuellerOtter@muell.icu" << std::endl;
|
ofs << "GeborgenIndividuellerOtter@muell.icu" << std::endl;
|
||||||
ofs << "HervorragendSensibelerWal@oida.icu" << std::endl;
|
ofs << "HervorragendSensibelerWal@oida.icu" << std::endl;
|
||||||
ofs << "HerrlichIndividuellerPelikan@spam.care" << std::endl;
|
ofs << "HerrlichIndividuellerPelikan@spam.care" << std::endl;
|
||||||
ofs << "HerrlichLeuchtenderTapir@muellmail.com" << std::endl;
|
ofs << "HerrlichLeuchtenderTapir@muellmail.com" << std::endl;
|
||||||
ofs << "ErstaunlichIntensiverEsel@magspam.net" << std::endl;
|
ofs << "ErstaunlichIntensiverEsel@magspam.net" << std::endl;
|
||||||
ofs << "ExtravagantPraechtigerWal@muellemail.com" << std::endl;
|
ofs << "ExtravagantPraechtigerWal@muellemail.com" << std::endl;
|
||||||
ofs << "GravierendWundervollerFalke@spam.care" << std::endl;
|
ofs << "GravierendWundervollerFalke@spam.care" << std::endl;
|
||||||
ofs << "EntzueckendLebhafterFlamingo@magspam.net" << std::endl;
|
ofs << "EntzueckendLebhafterFlamingo@magspam.net" << std::endl;
|
||||||
ofs << "GeheimSprachloserStorch@existiert.net" << std::endl;
|
ofs << "GeheimSprachloserStorch@existiert.net" << std::endl;
|
||||||
ofs << "GravierendVitalerOtter@spam.care" << std::endl;
|
ofs << "GravierendVitalerOtter@spam.care" << std::endl;
|
||||||
ofs << "GrenzenlosInteressanterElch@oida.icu" << std::endl;
|
ofs << "GrenzenlosInteressanterElch@oida.icu" << std::endl;
|
||||||
ofs << "HellPackenderGoldfisch@muellemail.com" << std::endl;
|
ofs << "HellPackenderGoldfisch@muellemail.com" << std::endl;
|
||||||
ofs << "AbenteuerlichSelbstloserFalke@muell.icu" << std::endl;
|
ofs << "AbenteuerlichSelbstloserFalke@muell.icu" << std::endl;
|
||||||
ofs << "EmotionalZaghafterPapagei@magspam.net" << std::endl;
|
ofs << "EmotionalZaghafterPapagei@magspam.net" << std::endl;
|
||||||
ofs << "HellLiebenswerterElefant@muellemail.com" << std::endl;
|
ofs << "HellLiebenswerterElefant@muellemail.com" << std::endl;
|
||||||
ofs << "BildlichImponierenderEsel@muellemail.com" << std::endl;
|
ofs << "BildlichImponierenderEsel@muellemail.com" << std::endl;
|
||||||
ofs << "ErstaunlichSprachloserPapagei@ultra.fyi" << std::endl;
|
ofs << "ErstaunlichSprachloserPapagei@ultra.fyi" << std::endl;
|
||||||
ofs << "BerauschendLebendigerDelfin@ultra.fyi" << std::endl;
|
ofs << "BerauschendLebendigerDelfin@ultra.fyi" << std::endl;
|
||||||
ofs << "GravierendIntensiverHase@oida.icu" << std::endl;
|
ofs << "GravierendIntensiverHase@oida.icu" << std::endl;
|
||||||
ofs << "BerauschendUnglaublicherGorilla@oida.icu" << std::endl;
|
ofs << "BerauschendUnglaublicherGorilla@oida.icu" << std::endl;
|
||||||
ofs << "GenuesslichPraechtigerDachs@spam.care" << std::endl;
|
ofs << "GenuesslichPraechtigerDachs@spam.care" << std::endl;
|
||||||
|
|
||||||
} else if( pageInUse.url == pagesALL[ANICLOUD].url ) {
|
} else if( pageInUse.url == pagesALL[ANICLOUD].url ) {
|
||||||
ofs << "C322334ark1954@teleworm.us/C322334ark1954@teleworm.us" << std::endl;
|
ofs << "C322334ark1954@teleworm.us/C322334ark1954@teleworm.us" << std::endl;
|
||||||
ofs << "wemixex225@iconmle.com/wemixex225@iconmle.com" << std::endl;
|
ofs << "wemixex225@iconmle.com/wemixex225@iconmle.com" << std::endl;
|
||||||
ofs << "Thw86757utary@teleworm.us" << std::endl;
|
ofs << "Thw86757utary@teleworm.us" << std::endl;
|
||||||
ofs << "thw811ssssutary@teleworm.us" << std::endl;
|
ofs << "thw811ssssutary@teleworm.us" << std::endl;
|
||||||
ofs << "Leonardoutary@teleworm.us" << std::endl;
|
ofs << "Leonardoutary@teleworm.us" << std::endl;
|
||||||
ofs << "efgewtzhewtrhterw@tonne.to" << std::endl;
|
ofs << "efgewtzhewtrhterw@tonne.to" << std::endl;
|
||||||
ofs << "dwfwqefqefqe@dsgvo.ru" << std::endl;
|
ofs << "dwfwqefqefqe@dsgvo.ru" << std::endl;
|
||||||
ofs << "dfdfgwgwrgwg@muell.ru" << std::endl;
|
ofs << "dfdfgwgwrgwg@muell.ru" << std::endl;
|
||||||
ofs << "BildlichSprachloserWal@spam.care" << std::endl;
|
ofs << "BildlichSprachloserWal@spam.care" << std::endl;
|
||||||
ofs << "BildlichLustvollerRochen@muell.ru" << std::endl;
|
ofs << "BildlichLustvollerRochen@muell.ru" << std::endl;
|
||||||
ofs << "AngenehmMaximalerHai@muell.icu" << std::endl;
|
ofs << "AngenehmMaximalerHai@muell.icu" << std::endl;
|
||||||
ofs << "FreundlichKostbarerWolf@fukaru.com" << std::endl;
|
ofs << "FreundlichKostbarerWolf@fukaru.com" << std::endl;
|
||||||
ofs << "animewatcherxgas120@oida.icu" << std::endl;
|
ofs << "animewatcherxgas120@oida.icu" << std::endl;
|
||||||
ofs << "animewatcherxgas7776@oida.icu" << std::endl;
|
ofs << "animewatcherxgas7776@oida.icu" << std::endl;
|
||||||
ofs << "animewatcherxgas777116@oida.icu" << std::endl;
|
ofs << "animewatcherxgas777116@oida.icu" << std::endl;
|
||||||
|
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
ofs << "" << std::endl;
|
ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
// ofs << "" << std::endl;
|
// ofs << "" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cout << " => WARNUNG: Keine standart Accounts für die Url '" << pageInUse.url << "' vorhanden." <<std::endl;
|
std::cout << " => WARNUNG: Keine standart Accounts für die Url '" << pageInUse.url << "' vorhanden." <<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t AccountManager::getLastAccountNumber()
|
size_t AccountManager::getLastAccountNumber()
|
||||||
{
|
{
|
||||||
std::ifstream fStream;
|
std::ifstream fStream;
|
||||||
fStream.open(pathToAccountNumberFile);
|
fStream.open(pathToAccountNumberFile);
|
||||||
if(!fStream.is_open()) {
|
if(!fStream.is_open()) {
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(pathToAccountNumberFile);
|
ofs.open(pathToAccountNumberFile);
|
||||||
ofs << "0" << std::endl;
|
ofs << "0" << std::endl;
|
||||||
ofs.close();
|
ofs.close();
|
||||||
fStream.open(pathToAccountNumberFile);
|
fStream.open(pathToAccountNumberFile);
|
||||||
if(!fStream.is_open()) {
|
if(!fStream.is_open()) {
|
||||||
perror(" => Error: Konnte Account Number Datei nicht erstellen");
|
perror(" => Error: Konnte Account Number Datei nicht erstellen");
|
||||||
exit(34);
|
exit(34);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string content( (std::istreambuf_iterator<char>(fStream) ), (std::istreambuf_iterator<char>() ) );
|
std::string content( (std::istreambuf_iterator<char>(fStream) ), (std::istreambuf_iterator<char>() ) );
|
||||||
return static_cast<size_t>( atoi(content.c_str()) );
|
return static_cast<size_t>( atoi(content.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
int AccountManager::setLastAccountNumber(size_t number)
|
int AccountManager::setLastAccountNumber(size_t number)
|
||||||
{
|
{
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(pathToAccountNumberFile, std::ios::trunc);
|
ofs.open(pathToAccountNumberFile, std::ios::trunc);
|
||||||
if(!ofs.is_open()) {
|
if(!ofs.is_open()) {
|
||||||
std::cout << " => Error: Account Number Datei ist nicht aufgemacht." << std::endl;
|
std::cout << " => Error: Account Number Datei ist nicht aufgemacht." << std::endl;
|
||||||
return 110;
|
return 110;
|
||||||
}
|
}
|
||||||
//fStream.clear();
|
//fStream.clear();
|
||||||
ofs << number << std::endl;
|
ofs << number << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
#ifndef ACCOUNTMANAGER_H
|
#ifndef ACCOUNTMANAGER_H
|
||||||
#define ACCOUNTMANAGER_H
|
#define ACCOUNTMANAGER_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
struct Account {
|
struct Account {
|
||||||
std::string Email,
|
std::string Email,
|
||||||
Password;
|
Password;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//wichtig vor Account declaration!!!!
|
//wichtig vor Account declaration!!!!
|
||||||
#include "parameterManager.h"
|
#include "parameterManager.h"
|
||||||
|
|
||||||
class AccountManager
|
class AccountManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile, PAGE page, const PAGE * pagesALL);
|
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile, PAGE page, const PAGE * pagesALL);
|
||||||
Account getNextAccount();
|
Account getNextAccount();
|
||||||
size_t getLastAccountNumber();
|
size_t getLastAccountNumber();
|
||||||
const PAGE * pagesALL;
|
const PAGE * pagesALL;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<Account> accounts;
|
std::vector<Account> accounts;
|
||||||
std::string pathToAccountNumberFile;
|
std::string pathToAccountNumberFile;
|
||||||
PAGE pageInUse;
|
PAGE pageInUse;
|
||||||
int setLastAccountNumber(size_t number);
|
int setLastAccountNumber(size_t number);
|
||||||
int writeDefault(std::string path);
|
int writeDefault(std::string path);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ACCOUNTMANAGER_H
|
#endif // ACCOUNTMANAGER_H
|
||||||
|
BIN
src/debug/S_New4.exe
Normal file
BIN
src/debug/S_New4.exe
Normal file
Binary file not shown.
170
src/logger.cpp
170
src/logger.cpp
@ -1,85 +1,85 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
||||||
Logger::Logger(std::string logFilePathm)
|
Logger::Logger(std::string logFilePathm)
|
||||||
: filePath(logFilePathm)
|
: filePath(logFilePathm)
|
||||||
{
|
{
|
||||||
if(openFile(filePath))
|
if(openFile(filePath))
|
||||||
exit(234);
|
exit(234);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::~Logger()
|
Logger::~Logger()
|
||||||
{
|
{
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Logger::getFilePath()
|
std::string Logger::getFilePath()
|
||||||
{
|
{
|
||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logger::logCommandLine(std::string logText)
|
int Logger::logCommandLine(std::string logText)
|
||||||
{
|
{
|
||||||
std::time_t now = std::time(nullptr);
|
std::time_t now = std::time(nullptr);
|
||||||
struct tm *tm_now = localtime(&now);
|
struct tm *tm_now = localtime(&now);
|
||||||
std::string date((tm_now->tm_mday < 10 ? "0" : "") + std::to_string(tm_now->tm_mday) + "." +
|
std::string date((tm_now->tm_mday < 10 ? "0" : "") + std::to_string(tm_now->tm_mday) + "." +
|
||||||
(tm_now->tm_mon +1 < 10 ? "0" : "" ) + std::to_string(tm_now->tm_mon +1) + "." +
|
(tm_now->tm_mon +1 < 10 ? "0" : "" ) + std::to_string(tm_now->tm_mon +1) + "." +
|
||||||
std::to_string(1900 + tm_now->tm_year) + " - " +
|
std::to_string(1900 + tm_now->tm_year) + " - " +
|
||||||
(tm_now->tm_hour < 10 ? "0" : "" ) + std::to_string(tm_now->tm_hour) + ":" +
|
(tm_now->tm_hour < 10 ? "0" : "" ) + std::to_string(tm_now->tm_hour) + ":" +
|
||||||
(tm_now->tm_min < 10 ? "0" : "" ) + std::to_string(tm_now->tm_min));
|
(tm_now->tm_min < 10 ? "0" : "" ) + std::to_string(tm_now->tm_min));
|
||||||
return writetoFile( " -> " + date + ": \"" + logText + "\"");
|
return writetoFile( " -> " + date + ": \"" + logText + "\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logger::logSubLine(std::string line)
|
int Logger::logSubLine(std::string line)
|
||||||
{
|
{
|
||||||
return writetoFile("\t\t" + line);
|
return writetoFile("\t\t" + line);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Logger::getLogText()
|
std::string Logger::getLogText()
|
||||||
{
|
{
|
||||||
return std::string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
|
return std::string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logger::clearFile()
|
int Logger::clearFile()
|
||||||
{
|
{
|
||||||
//close it
|
//close it
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
//open it empty + close it
|
//open it empty + close it
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(filePath, std::ofstream::out | std::ofstream::trunc);
|
ofs.open(filePath, std::ofstream::out | std::ofstream::trunc);
|
||||||
if(!ofs.is_open()) {
|
if(!ofs.is_open()) {
|
||||||
perror("Open File for clearing failed");
|
perror("Open File for clearing failed");
|
||||||
return 35;
|
return 35;
|
||||||
}
|
}
|
||||||
ofs.close();
|
ofs.close();
|
||||||
|
|
||||||
//reopen it
|
//reopen it
|
||||||
return openFile(filePath);
|
return openFile(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logger::writetoFile(std::string t)
|
int Logger::writetoFile(std::string t)
|
||||||
{
|
{
|
||||||
file << t << std::endl;
|
file << t << std::endl;
|
||||||
return file.good();
|
return file.good();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logger::openFile(std::string path)
|
int Logger::openFile(std::string path)
|
||||||
{
|
{
|
||||||
file.open(path, std::ios::in | std::ios::out | std::ios::app);
|
file.open(path, std::ios::in | std::ios::out | std::ios::app);
|
||||||
if(!file.is_open()) {
|
if(!file.is_open()) {
|
||||||
//Exestiert nicht => Erstelle Datei
|
//Exestiert nicht => Erstelle Datei
|
||||||
std::ofstream ofs(path);
|
std::ofstream ofs(path);
|
||||||
if(!ofs.is_open()) {
|
if(!ofs.is_open()) {
|
||||||
perror((" => Error: Konnte LogDatei nicht erstellen: '" + path + "'").c_str());
|
perror((" => Error: Konnte LogDatei nicht erstellen: '" + path + "'").c_str());
|
||||||
return (5656);
|
return (5656);
|
||||||
} else {
|
} else {
|
||||||
ofs.close();
|
ofs.close();
|
||||||
}
|
}
|
||||||
file.open(path);
|
file.open(path);
|
||||||
if(!file.is_open()) {
|
if(!file.is_open()) {
|
||||||
perror((" => Error: Konnte LogDatei nicht aufmachen: '" + path + "'").c_str());
|
perror((" => Error: Konnte LogDatei nicht aufmachen: '" + path + "'").c_str());
|
||||||
return (5657);
|
return (5657);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
72
src/logger.h
72
src/logger.h
@ -1,36 +1,36 @@
|
|||||||
#ifndef LOGGER_H
|
#ifndef LOGGER_H
|
||||||
#define LOGGER_H
|
#define LOGGER_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
#include <ctime> // std::time, localtime ...
|
#include <ctime> // std::time, localtime ...
|
||||||
|
|
||||||
|
|
||||||
#include "parameterManager.h"
|
#include "parameterManager.h"
|
||||||
|
|
||||||
|
|
||||||
class Logger
|
class Logger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Logger(std::string logFilePathm);
|
Logger(std::string logFilePathm);
|
||||||
~Logger();
|
~Logger();
|
||||||
std::string getFilePath();
|
std::string getFilePath();
|
||||||
std::fstream file;
|
std::fstream file;
|
||||||
|
|
||||||
int logCommandLine(std::string logText);
|
int logCommandLine(std::string logText);
|
||||||
int logSubLine(std::string line);
|
int logSubLine(std::string line);
|
||||||
std::string getLogText();
|
std::string getLogText();
|
||||||
int clearFile();
|
int clearFile();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string filePath;
|
std::string filePath;
|
||||||
int writetoFile(std::string t);
|
int writetoFile(std::string t);
|
||||||
int openFile(std::string path);
|
int openFile(std::string path);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LOGGER_H
|
#endif // LOGGER_H
|
||||||
|
42
src/main.cpp
42
src/main.cpp
@ -1,21 +1,21 @@
|
|||||||
#include "programManager.h"
|
#include "programManager.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
ProgramManager mainProgram;
|
ProgramManager mainProgram;
|
||||||
Settings settings;
|
Settings settings;
|
||||||
int res = manageParameter(settings, argc, argv);
|
int res = manageParameter(settings, argc, argv);
|
||||||
if(res == -1)
|
if(res == -1)
|
||||||
return 0;
|
return 0;
|
||||||
else if(res != 0) {
|
else if(res != 0) {
|
||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " => Error: Das Auswerten der Parameter ist fehlgeschlagen!" << std::endl;
|
std::cout << " => Error: Das Auswerten der Parameter ist fehlgeschlagen!" << std::endl;
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
if( (res = mainProgram.start(&settings)) != 0 )
|
if( (res = mainProgram.start(&settings)) != 0 )
|
||||||
std::cout << (" => Entschuldigung, ein Fehler ist aufgetreten!\n Bei wiederholtem Auftreten verwenden Sie -d, --debug für mehr Infos\n"
|
std::cout << (" => Entschuldigung, ein Fehler ist aufgetreten!\n Bei wiederholtem Auftreten verwenden Sie -d, --debug für mehr Infos\n"
|
||||||
" oder --update um, falls vorhanden, auf eine neuere Version des Programms zu wechseln") << std::endl;
|
" oder --update um, falls vorhanden, auf eine neuere Version des Programms zu wechseln") << std::endl;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1451
src/pageManager.cpp
1451
src/pageManager.cpp
File diff suppressed because it is too large
Load Diff
@ -1,81 +1,83 @@
|
|||||||
#ifndef MANAGEPAGE_H
|
#ifndef MANAGEPAGE_H
|
||||||
#define MANAGEPAGE_H
|
#define MANAGEPAGE_H
|
||||||
|
|
||||||
|
|
||||||
#include "accountManager.h"
|
#include "accountManager.h"
|
||||||
#include "parameterManager.h" // for isNumber
|
#include "parameterManager.h" // for isNumber
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "./../include/curl/curl.h"
|
#include "./../include/curl/curl.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
//----------------------?????????????????
|
//----------------------?????????????????
|
||||||
#define noSLLCheck
|
#define noSLLCheck
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include "curl/curl.h"
|
#include "curl/curl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <unistd.h> // sleep
|
#include <unistd.h> // sleep
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ctime> // std::time, localtime ...
|
#include <ctime> // std::time, localtime ...
|
||||||
|
|
||||||
|
|
||||||
struct Reply {
|
struct Reply {
|
||||||
Reply() {}
|
Reply() {}
|
||||||
Reply(std::string value_both) : html(value_both), url(value_both) {}
|
Reply(std::string value_both) : html(value_both), url(value_both) {}
|
||||||
Reply(std::string html, std::string url) : html(html), url(url) {}
|
Reply(std::string html, std::string url) : html(html), url(url) {}
|
||||||
|
|
||||||
std::string html, url;
|
std::string html, url;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct checkNameRply {
|
struct checkNameRply {
|
||||||
std::string name;
|
std::string name;
|
||||||
PAGE pageInUse;
|
PAGE pageInUse;
|
||||||
enum STATUS { SUCCESS, FAILED, NOTHING_FOUND, MULTIPLE_OPTIONS, NO_WORKING_PAGE } status;
|
enum STATUS { SUCCESS, FAILED, NOTHING_FOUND, MULTIPLE_OPTIONS, NO_WORKING_PAGE }
|
||||||
|
status;
|
||||||
checkNameRply(const std::string &name, const PAGE &p, const checkNameRply::STATUS &s )
|
|
||||||
: name(name), pageInUse(p), status(s) {}
|
|
||||||
};
|
checkNameRply(const std::string &name, const PAGE &p, const checkNameRply::STATUS &s )
|
||||||
|
: name(name), pageInUse(p), status(s) {}
|
||||||
|
};
|
||||||
class PageManager
|
|
||||||
{
|
|
||||||
public:
|
class PageManager
|
||||||
PageManager(std::string sock5ProxyOnlyAddress = "127.0.0.1:9150");
|
{
|
||||||
~PageManager();
|
public:
|
||||||
|
PageManager(std::string sock5ProxyOnlyAddress = "127.0.0.1:9150");
|
||||||
void setProxy(std::string ip, int port);
|
~PageManager();
|
||||||
void setDebugMode(bool status);
|
|
||||||
|
void setProxy(std::string ip, int port);
|
||||||
void get_terminal_size(int& width);
|
void setDebugMode(bool status);
|
||||||
|
|
||||||
Reply getServerRequest(std::string protocol, std::string Url, bool useCookies = false, std::string data = "", bool generateCookieFile = false, bool UrlAfterRedirectOnlyNeeded = false, std::string cookieFilePath = "");
|
void get_terminal_size(int& width);
|
||||||
int downLoadToFile(std::string filePath, std::string url);
|
|
||||||
|
Reply getServerRequest(std::string protocol, std::string Url, bool useCookies = false, std::string data = "", bool generateCookieFile = false, bool UrlAfterRedirectOnlyNeeded = false, std::string cookieFilePath = "");
|
||||||
int login(PAGE page, Account account, std::string cookieFilePath);
|
int downLoadToFile(std::string filePath, std::string url);
|
||||||
Reply getUrlAfterRedirect(std::string p, std::string Url, std::string cookieFilePath);
|
|
||||||
checkNameRply checkName(std::vector<PAGE> &pages, std::string Name, bool useFirstPage);
|
int login(PAGE page, Account account, std::string cookieFilePath);
|
||||||
std::string getLinks(std::string HTML);
|
Reply getUrlAfterRedirect(std::string p, std::string Url, std::string cookieFilePath);
|
||||||
std::string chooseHosterLink(std::string HosterList, std::string Hoster_with_Highst_Priority_at_First, std::string languages_with_highst_priority_at_first, bool withWarnMsg);
|
checkNameRply checkName(std::vector<PAGE> &pages, std::string Name, bool useFirstPage, std::vector<std::string> &outPutFilePaths /*for replacement*/);
|
||||||
std::string getLinkAfterHosterBasedOperation(std::string url);
|
std::string getLinks(std::string HTML);
|
||||||
|
std::string chooseHosterLink(std::string HosterList, std::string Hoster_with_Highst_Priority_at_First, std::string languages_with_highst_priority_at_first, bool withWarnMsg);
|
||||||
int counterContains(std::string text, std::string substring_with_prozent_i_for_number, int starte_mit_dieser_Zahl = 1);
|
std::string getLinkAfterHosterBasedOperation(std::string url);
|
||||||
std::string grep(std::string text, std::string substring, bool IgnoreCaseSensetifity = false);
|
|
||||||
static std::string upper_string(const std::string& str);
|
int counterContains(std::string text, std::string substring_with_prozent_i_for_number, int starte_mit_dieser_Zahl = 1);
|
||||||
size_t getDate();
|
std::string grep(std::string text, std::string substring, bool IgnoreCaseSensetifity = false);
|
||||||
std::string getExePath();
|
static std::string upper_string(const std::string& str);
|
||||||
|
size_t getDate();
|
||||||
int compareVersions(std::string Version1, std::string Version2);
|
std::string getExePath();
|
||||||
|
|
||||||
int writeToFile(std::vector<std::string> paths, std::string text);
|
int compareVersions(std::string Version1, std::string Version2);
|
||||||
|
|
||||||
static std::string getCurlVersion();
|
int writeToFile(std::vector<std::string> paths, std::string text);
|
||||||
|
|
||||||
std::string sock5Proxy;
|
static std::string getCurlVersion();
|
||||||
private:
|
|
||||||
bool debugMode = false;
|
std::string sock5Proxy;
|
||||||
};
|
private:
|
||||||
|
bool debugMode = false;
|
||||||
#endif // MANAGEPAGE_H
|
};
|
||||||
|
|
||||||
|
#endif // MANAGEPAGE_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,279 +1,279 @@
|
|||||||
#ifndef PARAMETERMANAGER_H
|
#ifndef PARAMETERMANAGER_H
|
||||||
#define PARAMETERMANAGER_H
|
#define PARAMETERMANAGER_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#error "Error Invalid System: Only for Linux and Windows systems!"
|
#error "Error Invalid System: Only for Linux and Windows systems!"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <string.h> // strlen
|
#include <string.h> // strlen
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <limits.h> // PATH_MAX
|
#include <limits.h> // PATH_MAX
|
||||||
#include <unistd.h> // readlink()
|
#include <unistd.h> // readlink()
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
|
#define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
|
||||||
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files="
|
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files="
|
||||||
#define VERSION "5.2.1"
|
#define VERSION "5.2.1"
|
||||||
#define DEFAULT_FILE_VERSION "2.3"
|
#define DEFAULT_FILE_VERSION "2.3"
|
||||||
|
|
||||||
//default, anime, normal,
|
//default, anime, normal,
|
||||||
//suche: für jede katego. eine
|
//suche: für jede katego. eine
|
||||||
//zu beginn, erst eiunmal serie suchen
|
//zu beginn, erst eiunmal serie suchen
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum Modus {
|
enum Modus {
|
||||||
EXIT = -1,
|
EXIT = -1,
|
||||||
DEFAULT_MODUS = 0,
|
DEFAULT_MODUS = 0,
|
||||||
DIRECT_LINK_MODUS = 1,
|
DIRECT_LINK_MODUS = 1,
|
||||||
SEARCH_MODUS = 2,
|
SEARCH_MODUS = 2,
|
||||||
INFO_MODUS = 3,
|
INFO_MODUS = 3,
|
||||||
NEWS_MODUS = 4,
|
NEWS_MODUS = 4,
|
||||||
UPDATE_MODUS = 5,
|
UPDATE_MODUS = 5,
|
||||||
REMOVE_SETTINGS_AND_CACHE_MODUS = 6,
|
REMOVE_SETTINGS_AND_CACHE_MODUS = 6,
|
||||||
PRINT_LOG_FILE_MODUS
|
PRINT_LOG_FILE_MODUS
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PAGE {
|
struct PAGE {
|
||||||
PAGE() {}
|
PAGE() {}
|
||||||
PAGE( std::string protocol, std::string url, std::string nameID, std::string urlAphabetSerienList, std::string urlDir )
|
PAGE( std::string protocol, std::string url, std::string nameID, std::string urlAphabetSerienList, std::string urlDir )
|
||||||
: protocol(protocol), name_id(nameID), url(url), urlAlphabetSerienList(urlAphabetSerienList), UrlDir(urlDir)
|
: protocol(protocol), name_id(nameID), url(url), urlAlphabetSerienList(urlAphabetSerienList), UrlDir(urlDir)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
std::string protocol, name_id, url, urlAlphabetSerienList, UrlDir;
|
std::string protocol, name_id, url, urlAlphabetSerienList, UrlDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
||||||
//Wichtig nach MODUS UND PAGE DECLARATION
|
//Wichtig nach MODUS UND PAGE DECLARATION
|
||||||
#include "pageManager.h"
|
#include "pageManager.h"
|
||||||
|
|
||||||
|
|
||||||
struct Settings {
|
struct Settings {
|
||||||
|
|
||||||
const std::string programName = "S_New4";
|
const std::string programName = "S_New4";
|
||||||
const PAGE _sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
const PAGE _sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||||
_stoIP = PAGE( "", "190.115.18.20", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
_stoIP = PAGE( "http://", "190.115.18.20", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||||
serienstreamto = PAGE("https://", "serienstream.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
serienstreamto = PAGE("https://", "serienstream.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||||
seriencam = PAGE("https://", "serien.cam", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
seriencam = PAGE("https://", "serien.cam", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||||
// _serienstreamsx = PAGE( "https://", "serienstream.sx", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
|
||||||
|
_anicio = PAGE( "https://" , "aniworld.to", "Animes", "/animes-alphabet", "/anime/stream/");
|
||||||
_anicio = PAGE( "https://" , "AniWorld.to", "Animes", "/animes-alphabet", "/anime/stream/");
|
const PAGE pagesALL[5] = { _sto, _anicio, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
||||||
const PAGE pagesALL[5] = { _sto, _anicio, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
|
||||||
|
std::vector<PAGE> pagesInUse; // Priority sorted
|
||||||
std::vector<PAGE> pagesInUse; // Priority sorted
|
bool useFirstPage = false;
|
||||||
bool useFirstPage = false;
|
|
||||||
|
PAGE direktLink_explizitPage;
|
||||||
PAGE direktLink_explizitPage;
|
|
||||||
|
|
||||||
|
Settings() {
|
||||||
Settings() {
|
for(const auto &e : pagesALL)
|
||||||
for(const auto &e : pagesALL)
|
pagesInUse.push_back( e );
|
||||||
pagesInUse.push_back( e );
|
}
|
||||||
}
|
|
||||||
|
// Wenn das Betriebsystem x86 ist:
|
||||||
// Wenn das Betriebsystem x86 ist:
|
#if defined (_X86_) || defined (__amd64__) || defined (_M_IX86)
|
||||||
#if defined (_X86_) || defined (__amd64__) || defined (_M_IX86)
|
// Wenn das Betriebsystem LINUX ist und 64 Bit ist:
|
||||||
// Wenn das Betriebsystem LINUX ist und 64 Bit ist:
|
#if defined (__linux) && ( defined (_LP64) || defined (__LP64__))
|
||||||
#if defined (__linux) && ( defined (_LP64) || defined (__LP64__))
|
const std::string VersionFileName = std::string("Version-LINx86.txt");
|
||||||
const std::string VersionFileName = std::string("Version-LINx86.txt");
|
const std::string ProgrammFileName = std::string("S_New4-LINx86");
|
||||||
const std::string ProgrammFileName = std::string("S_New4-LINx86");
|
#else
|
||||||
#else
|
//Wenn das Betriebsystem Windows ist und 64 Bit ist
|
||||||
//Wenn das Betriebsystem Windows ist und 64 Bit ist
|
#if defined (_WIN64)
|
||||||
#if defined (_WIN64)
|
const std::string VersionFileName = std::string("Version-WINx86.txt");
|
||||||
const std::string VersionFileName = std::string("Version-WINx86.txt");
|
const std::string ProgrammFileName = std::string("S_New4-WINx86.exe");
|
||||||
const std::string ProgrammFileName = std::string("S_New4-WINx86.exe");
|
#else
|
||||||
#else
|
//Ungültiges Betriebsystem => Error
|
||||||
//Ungültiges Betriebsystem => Error
|
#error Kein Windows oder Linux 64 Bit System: Der Updater Fuktion wird nicht Funktionieren! Remove this Line in the Code to use S_New4 without the Updater. ( But your System must be Windows or Linux )
|
||||||
#error Kein Windows oder Linux 64 Bit System: Der Updater Fuktion wird nicht Funktionieren! Remove this Line in the Code to use S_New4 without the Updater. ( But your System must be Windows or Linux )
|
const std::string VersionFileName = "";
|
||||||
const std::string VersionFileName = "";
|
const std::string ProgrammFileName = "";
|
||||||
const std::string ProgrammFileName = "";
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
//Nicht x86 Architekture
|
||||||
//Nicht x86 Architekture
|
#else
|
||||||
#else
|
//Raspberry Pi -> ARMv6 -> 32Bit
|
||||||
//Raspberry Pi -> ARMv6 -> 32Bit
|
#if defined(__ARM_ARCH_6__) && defined (__linux)
|
||||||
#if defined(__ARM_ARCH_6__) && defined (__linux)
|
const std::string VersionFileName = std::string("Version-LIN-ARMv6.txt");
|
||||||
const std::string VersionFileName = std::string("Version-LIN-ARMv6.txt");
|
const std::string ProgrammFileName = std::string("S_New4-LIN-ARMv6");
|
||||||
const std::string ProgrammFileName = std::string("S_New4-LIN-ARMv6");
|
#else
|
||||||
#else
|
#error Falsche Architektur: Der Updater Fuktion wird nicht Funktionieren! Remove this Line in the Code to use S_New4 without the Updater. ( But your System must be Windows or Linux )
|
||||||
#error Falsche Architektur: Der Updater Fuktion wird nicht Funktionieren! Remove this Line in the Code to use S_New4 without the Updater. ( But your System must be Windows or Linux )
|
const std::string VersionFileName = "";
|
||||||
const std::string VersionFileName = "";
|
const std::string ProgrammFileName = "";
|
||||||
const std::string ProgrammFileName = "";
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
std::string name,
|
||||||
std::string name,
|
accountFilePath = "",
|
||||||
accountFilePath = "",
|
accountNumberPath= "",
|
||||||
accountNumberPath= "",
|
cookieFilePath = "",
|
||||||
cookieFilePath = "",
|
serienListPath = "",
|
||||||
serienListPath = "",
|
|
||||||
|
lastUpdateDateFilePath = "",
|
||||||
lastUpdateDateFilePath = "",
|
lastProgrammUpdateDateFilePath = "",
|
||||||
lastProgrammUpdateDateFilePath = "",
|
|
||||||
|
|
||||||
|
configDir="",
|
||||||
configDir="",
|
cacheDir="",
|
||||||
cacheDir="",
|
logFilePath="",
|
||||||
logFilePath="",
|
|
||||||
|
defaultsFilePath = "",
|
||||||
defaultsFilePath = "",
|
proxy_ip = "127.0.0.1",
|
||||||
proxy_ip = "127.0.0.1",
|
languages = "GerDub,GerSub,Eng,",
|
||||||
languages = "GerDub,GerSub,Eng,",
|
genaueHoster = "",
|
||||||
genaueHoster = "",
|
version = VERSION,
|
||||||
version = VERSION,
|
defaultFileVersion= DEFAULT_FILE_VERSION,
|
||||||
defaultFileVersion= DEFAULT_FILE_VERSION,
|
default_checkPath = "",
|
||||||
default_checkPath = "",
|
default_Searchmuster = "S%Staffel%E%Folge%",
|
||||||
default_Searchmuster = "S%Staffel%E%Folge%",
|
argv0,
|
||||||
argv0;
|
downloadCoverPfad;
|
||||||
|
|
||||||
std::vector<std::string> outputFilePaths;
|
std::vector<std::string> outputFilePaths;
|
||||||
|
|
||||||
|
|
||||||
Modus modus = Modus::EXIT;
|
Modus modus = Modus::EXIT;
|
||||||
bool colorless = false,
|
bool colorless = false,
|
||||||
debugMode = false,
|
debugMode = false,
|
||||||
search_IgnoreUpperLower = true,
|
search_IgnoreUpperLower = true,
|
||||||
search_wantUpdate = false,
|
search_wantUpdate = false,
|
||||||
search_show_othernames = false,
|
search_show_othernames = false,
|
||||||
askForEveryDir = true,
|
askForEveryDir = true,
|
||||||
skipEpisodenNameOutput = false,
|
skipEpisodenNameOutput = false,
|
||||||
showLastUpdate = false;
|
showLastUpdate = false;
|
||||||
|
|
||||||
int startEpisode = 1,
|
int startEpisode = 1,
|
||||||
stopEpisode = 0,
|
stopEpisode = 0,
|
||||||
startSeason = 1,
|
startSeason = 1,
|
||||||
stopSeason = 0,
|
stopSeason = 0,
|
||||||
proxy_port = 9050,
|
proxy_port = 9050,
|
||||||
default_maxDirs = 20,
|
default_maxDirs = 20,
|
||||||
updateWarningDays = 10,
|
updateWarningDays = 10,
|
||||||
|
|
||||||
programmUpdateWarningDays = 20;
|
programmUpdateWarningDays = 20;
|
||||||
|
|
||||||
|
|
||||||
char pathSymbol = '/';
|
char pathSymbol = '/';
|
||||||
char wrongPathSymbol = '\\';
|
char wrongPathSymbol = '\\';
|
||||||
unsigned maxThreads = 0;
|
unsigned maxThreads = 0;
|
||||||
|
|
||||||
enum COLOR {
|
enum COLOR {
|
||||||
NO_COLOR = 0,
|
NO_COLOR = 0,
|
||||||
Black = 30,
|
Black = 30,
|
||||||
Dark_Gray = 90,
|
Dark_Gray = 90,
|
||||||
Red = 31,
|
Red = 31,
|
||||||
Light_Red = 91,
|
Light_Red = 91,
|
||||||
Green = 32,
|
Green = 32,
|
||||||
Light_Green = 92,
|
Light_Green = 92,
|
||||||
Brown_Orange = 33,
|
Brown_Orange = 33,
|
||||||
Yellow = 93,
|
Yellow = 93,
|
||||||
Blue = 34,
|
Blue = 34,
|
||||||
Light_Blue = 94,
|
Light_Blue = 94,
|
||||||
Purple = 35,
|
Purple = 35,
|
||||||
Light_Purple = 95,
|
Light_Purple = 95,
|
||||||
Cyan = 36,
|
Cyan = 36,
|
||||||
Light_Cyan = 96,
|
Light_Cyan = 96,
|
||||||
Light_Gray = 37,
|
Light_Gray = 37,
|
||||||
White = 97
|
White = 97
|
||||||
|
|
||||||
};
|
};
|
||||||
std::string setPColor(const COLOR &color) {
|
std::string setPColor(const COLOR &color) {
|
||||||
return ( (colorless) ? "" : "\033[" + std::to_string(color) +"m" );
|
return ( (colorless) ? "" : "\033[" + std::to_string(color) +"m" );
|
||||||
}
|
}
|
||||||
std::string resetPColor() {
|
std::string resetPColor() {
|
||||||
return ( (colorless) ? "" : "\033[0m" );
|
return ( (colorless) ? "" : "\033[0m" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::string replace(std::string str, std::string substr1, std::string substr2);
|
std::string replace(std::string str, std::string substr1, std::string substr2);
|
||||||
|
|
||||||
int manageParameter(Settings &settings, int argc, char ** argv);
|
int manageParameter(Settings &settings, int argc, char ** argv);
|
||||||
int loadDefaulOptions(Settings & settings);
|
int loadDefaulOptions(Settings & settings);
|
||||||
std::vector<std::string> compare(std::string All_Options_with_komma_between, std::string input);
|
std::vector<std::string> compare(std::string All_Options_with_komma_between, std::string input);
|
||||||
bool isSame(char ** argv, std::string FunktionName);
|
bool isSame(char ** argv, std::string FunktionName);
|
||||||
bool isNumber(std::string number);
|
bool isNumber(std::string number);
|
||||||
|
|
||||||
int setPaths(Settings &settings);
|
int setPaths(Settings &settings);
|
||||||
|
|
||||||
bool fileExists (const std::string& name);
|
bool fileExists (const std::string& name);
|
||||||
bool dirExists(std::string dir);
|
bool dirExists(std::string dir);
|
||||||
bool nothingExists(std::string path);
|
bool nothingExists(std::string path);
|
||||||
|
|
||||||
bool createDirIsOk(std::string path);
|
bool createDirIsOk(std::string path);
|
||||||
bool makePathIsOk(std::string path);
|
bool makePathIsOk(std::string path);
|
||||||
bool removeDirIsOk(std::string path, Settings *settings, bool askForDelete);
|
bool removeDirIsOk(std::string path, Settings *settings, bool askForDelete);
|
||||||
|
|
||||||
int unterOption_help(Settings &settings);
|
int unterOption_help(Settings &settings);
|
||||||
void unterOption_printVersion(Settings &settings);
|
void unterOption_printVersion(Settings &settings);
|
||||||
|
|
||||||
int unterOption_default(Settings * settings, int argc, char **argv);
|
int unterOption_default(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_default_help(std::string programName);
|
void unterOption_default_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_url(Settings * settings, int argc, char **argv);
|
int unterOption_url(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_url_help(std::string programName);
|
void unterOption_url_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_search(Settings * settings, int argc, char **argv);
|
int unterOption_search(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_search_help(std::string programName);
|
void unterOption_search_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_info(Settings * settings, int argc, char **argv);
|
int unterOption_info(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_info_help(std::string programName);
|
void unterOption_info_help(std::string programName);
|
||||||
|
|
||||||
void unterOption_clean(Settings * settings, int argc, char **argv);
|
void unterOption_clean(Settings * settings, int argc, char **argv);
|
||||||
|
|
||||||
int unterOption_printJD2_renameSkript(Settings * settings, int, char **);
|
int unterOption_printJD2_renameSkript(Settings * settings, int, char **);
|
||||||
|
|
||||||
|
|
||||||
int unterOption_news(Settings * settings, int argc, char **argv);
|
int unterOption_news(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_news_help(std::string programName);
|
void unterOption_news_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_update(Settings * settings, int argc, char **argv);
|
int unterOption_update(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_update_help(std::string programName);
|
void unterOption_update_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_RemoveSettings_or_CacheDir(Settings * settings, int argc, char **argv);
|
int unterOption_RemoveSettings_or_CacheDir(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_RemoveSettings_or_CacheDire_help(std::string programName);
|
void unterOption_RemoveSettings_or_CacheDire_help(std::string programName);
|
||||||
|
|
||||||
int unterOption_printLogFile(Settings * settings, int argc, char **argv);
|
int unterOption_printLogFile(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_printLogFile(std::string programName);
|
void unterOption_printLogFile(std::string programName);
|
||||||
|
|
||||||
int setS5ProxytoSettings(Settings &settings, std::string optarg);
|
int setS5ProxytoSettings(Settings &settings, std::string optarg);
|
||||||
int setUpInternetPages(Settings &settings, std::string optarg);
|
int setUpInternetPages(Settings &settings, std::string optarg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // PARAMETERMANAGER_H
|
#endif // PARAMETERMANAGER_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,72 +1,72 @@
|
|||||||
#ifndef MANAGEPROGRAM_H
|
#ifndef MANAGEPROGRAM_H
|
||||||
#define MANAGEPROGRAM_H
|
#define MANAGEPROGRAM_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#include "pageManager.h"
|
//#include "pageManager.h"
|
||||||
#include "parameterManager.h"
|
#include "parameterManager.h"
|
||||||
//#include "accountManager.h"
|
//#include "accountManager.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
|
||||||
struct ThreadData
|
struct ThreadData
|
||||||
{
|
{
|
||||||
ThreadData(unsigned id, pthread_t init, std::string nameinUrl,int exitStateInit, Settings * settings, AccountManager * accountMg, PageManager * pM, PAGE p)
|
ThreadData(unsigned id, pthread_t init, std::string nameinUrl,int exitStateInit, Settings * settings, AccountManager * accountMg, PageManager * pM, PAGE p)
|
||||||
: id(id), page(p), thread(init), nameInUrl(nameinUrl), exitState(exitStateInit), settings(settings), accountManager(accountMg), pageManager(pM) {}
|
: id(id), page(p), thread(init), nameInUrl(nameinUrl), exitState(exitStateInit), settings(settings), accountManager(accountMg), pageManager(pM) {}
|
||||||
|
|
||||||
unsigned id;
|
unsigned id;
|
||||||
PAGE page;
|
PAGE page;
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
std::string nameInUrl, returnValue;
|
std::string nameInUrl, returnValue;
|
||||||
int staffel, folge, exitState;
|
int staffel, folge, exitState;
|
||||||
Settings * settings;
|
Settings * settings;
|
||||||
AccountManager * accountManager;
|
AccountManager * accountManager;
|
||||||
PageManager * pageManager;
|
PageManager * pageManager;
|
||||||
|
|
||||||
void * setState(int state) {
|
void * setState(int state) {
|
||||||
this->exitState = state;
|
this->exitState = state;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
void setData(int staffel, int folge) { this->staffel = staffel; this->folge = folge; }
|
void setData(int staffel, int folge) { this->staffel = staffel; this->folge = folge; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ProgramManager
|
class ProgramManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ProgramManager();
|
ProgramManager();
|
||||||
~ProgramManager();
|
~ProgramManager();
|
||||||
int start(Settings *setting);
|
int start(Settings *setting);
|
||||||
int listDir(std::string &list, std::string path, int maxDepth, bool debugMode);
|
int listDir(std::string &list, std::string path, int maxDepth, bool debugMode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int defaultModus(Settings * settings);
|
int defaultModus(Settings * settings);
|
||||||
int directLinkModus(Settings * settings);
|
int directLinkModus(Settings * settings);
|
||||||
int searchModus(Settings * settings, std::string *saveTo = nullptr, bool noPrint = false);
|
int searchModus(Settings * settings, std::string *saveTo = nullptr, bool noPrint = false);
|
||||||
int infoModus(Settings * settings);
|
int infoModus(Settings * settings);
|
||||||
int newsModus(Settings *settings);
|
int newsModus(Settings *settings);
|
||||||
int updateModus(Settings *settings);
|
int updateModus(Settings *settings);
|
||||||
int cleanUpSettingsAndCache(Settings *settings);
|
int cleanUpSettingsAndCache(Settings *settings);
|
||||||
|
|
||||||
|
|
||||||
PageManager pageManager;
|
PageManager pageManager;
|
||||||
std::vector<ThreadData*> threadList;
|
std::vector<ThreadData*> threadList;
|
||||||
unsigned nextThread;
|
unsigned nextThread;
|
||||||
|
|
||||||
int convertLink(PAGE page, std::string redirectLink, AccountManager *accountManager, Settings * settings, int Staffel = -1, int Folge = -1, std::string allLinks = "NOT_EMPTY");
|
int convertLink(PAGE page, std::string redirectLink, AccountManager *accountManager, Settings * settings, int Staffel = -1, int Folge = -1, std::string allLinks = "NOT_EMPTY");
|
||||||
int searchModus_update(Settings * settings);
|
int searchModus_update(Settings * settings);
|
||||||
int waitForThreads();
|
int waitForThreads();
|
||||||
int sucheNach_1_Serien(Settings *settings, PageManager &pageManager, checkNameRply &newNameAndPage);
|
int sucheNach_1_Serien(Settings *settings, PageManager &pageManager, checkNameRply &newNameAndPage);
|
||||||
int checkLastUpdate(Settings * settings, ssize_t *days);
|
int checkLastUpdate(Settings * settings, ssize_t *days);
|
||||||
|
|
||||||
int checkLastProgrammUpdate(Settings *settings);
|
int checkLastProgrammUpdate(Settings *settings);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MANAGEPROGRAM_H
|
#endif // MANAGEPROGRAM_H
|
||||||
|
Loading…
Reference in New Issue
Block a user