forked from markus/S_New4
v3.6.1: extra ausgabe für ungültige link vorallem beu snew4 url
This commit is contained in:
parent
812df40b98
commit
61995f0587
@ -63,7 +63,7 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng,",
|
languages = "GerDub,GerSub,Eng,",
|
||||||
genaueHoster = "",
|
genaueHoster = "",
|
||||||
version = "3.6.0",
|
version = "3.6.1",
|
||||||
defaultFileVersion="1.6",
|
defaultFileVersion="1.6",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkPath = "",
|
default_checkPath = "",
|
||||||
|
@ -1402,10 +1402,13 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
|||||||
|
|
||||||
for (int i = 1; i <= 3; ++i) {
|
for (int i = 1; i <= 3; ++i) {
|
||||||
std::string newUrl = pageManager.getUrlAfterRedirect("https://s.to" + redirectLink);
|
std::string newUrl = pageManager.getUrlAfterRedirect("https://s.to" + redirectLink);
|
||||||
|
//wenn function fehl schlug beende das Programm
|
||||||
if (newUrl == "-1") {
|
if (newUrl == "-1") {
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": getUrlAfterRedirect f() failed." << std::endl;
|
std::cerr << ">>> Debug In " << __FUNCTION__ << ": getUrlAfterRedirect f() failed." << std::endl;
|
||||||
return 102;
|
return 102;
|
||||||
|
|
||||||
|
// wenn nach der Umwandlung immern och ein redirect vorhanden ist, also wenn z.B.: account gewechselt werden muss
|
||||||
} else if(newUrl.find("/s.to/redirect/") != std::string::npos ) {
|
} else if(newUrl.find("/s.to/redirect/") != std::string::npos ) {
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
std::cout << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl;
|
std::cout << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl;
|
||||||
@ -1416,6 +1419,17 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
//wenn nach der Umwandlung https://s.to/ vorhanden ist, die ist wenn der Link Ungültig war:
|
||||||
|
} else if (newUrl == "https://s.to/") {
|
||||||
|
std::cout << " => " << red << folgenID << ( (folgenID == "") ? "" : ": " ) << "Ungültige Url: 'https://s.to" << redirectLink << "'\033[0m" << std::endl;
|
||||||
|
if(settings->outputFilePath != "")
|
||||||
|
if(pageManager.writeToFile(settings->outputFilePath, folgenID + ( (folgenID == "") ? "" : ": " ) + "Ungültige Url: https://s.to" + redirectLink) != 0) {
|
||||||
|
if(settings->debugMode)
|
||||||
|
std::cerr << ">>> Debug In " << __FUNCTION__ << ": writeToFile f() failed." << std::endl;
|
||||||
|
return 108;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
//sonst war die umwandlung erfolgreich
|
||||||
} else {
|
} else {
|
||||||
std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << green << newUrl << "\033[0m" << std::endl;
|
std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << green << newUrl << "\033[0m" << std::endl;
|
||||||
if(settings->outputFilePath != "")
|
if(settings->outputFilePath != "")
|
||||||
@ -1427,6 +1441,8 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nach 3temn Versuch gib error aus:
|
||||||
std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << red << "https://s.to" << redirectLink << "\033[0m" << std::endl;
|
std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << red << "https://s.to" << redirectLink << "\033[0m" << std::endl;
|
||||||
if(settings->outputFilePath != "") {
|
if(settings->outputFilePath != "") {
|
||||||
if(pageManager.writeToFile(settings->outputFilePath, folgenID + ( (folgenID == "") ? "" : ": " ) + redirectLink) != 0) {
|
if(pageManager.writeToFile(settings->outputFilePath, folgenID + ( (folgenID == "") ? "" : ": " ) + redirectLink) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user