Bugfixes Update
This commit is contained in:
@@ -14,7 +14,8 @@ define('SCHULPORTAL_BASE0_URL', "https://portal.schulen.bayern.de");
|
||||
define('SCHULPORTAL_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesig2d1dfad4a11c25e42c462e53b4721e48/uniquesig0');
|
||||
define('SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesigc3ba1685059aaf325d44099df697a0a635e79a4ec36ec614a98f3bf4b79d7c043ac3880605b7751df91d11233380ad86/uniquesig0/asd');
|
||||
//define('PROD_SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesigc3ba1685059aaf325d44099df697a0a635e79a4ec36ec614a98f3bf4b79d7c043ac3880605b7751df91d11233380ad86/uniquesig0/asd');
|
||||
define('PROD_SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesig632cea04e8c585dd8dd40ffb367af53448ad1113e945323b22126735ae9513abb1f12262cb9414f17e32ca470882289a/uniquesig0/asd');
|
||||
//define('PROD_SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesig632cea04e8c585dd8dd40ffb367af53448ad1113e945323b22126735ae9513abb1f12262cb9414f17e32ca470882289a/uniquesig0/asd');
|
||||
define('PROD_SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/f5-w-687474703a2f2f6173642d6170702d70726f642e727a2d737565642e62617965726e2e64653a38323830$$/asd/');
|
||||
define('PARA_SCHULPORTAL_ASD_BASE_URL', SCHULPORTAL_BASE0_URL . '/uniquesiga877c16a8d4fa0326c4d1f7447020d3867d9b0ca4503652219a0f5b2b569f316747c8c199bc9626ccb01613a0a36a342/uniquesig0/asd');
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,9 @@ class AsdCurl
|
||||
public function login_asd($ch,$env)
|
||||
{
|
||||
$SCHULPORTAL_ASD_BASE_URL = Configure::read('AsdCurl.asdbaseurl.'.$env);
|
||||
$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/asddv/dv_xy_00.jsf', false);
|
||||
//debug($SCHULPORTAL_ASD_BASE_URL);die;
|
||||
//$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/asddv/dv_xy_00.jsf', false);
|
||||
$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/login/login.jsf', false);
|
||||
if(!($this->status)) {
|
||||
die($this->error);
|
||||
}
|
||||
@@ -99,7 +101,7 @@ class AsdCurl
|
||||
|
||||
$login_data = [
|
||||
'asd_username' => 'A005_TrinklW',
|
||||
'asd_password' => 'HiegTzs!183',
|
||||
'asd_password' => 'HiegTzs!195',
|
||||
//'asd_username' => 'A005_KnollmüllerP',
|
||||
//'asd_password' => 'Ooricha8e!',
|
||||
];
|
||||
@@ -176,6 +178,19 @@ class AsdCurl
|
||||
if(!($this->status)) {
|
||||
die($this->error);
|
||||
}
|
||||
|
||||
$vorschalt = $this->get_string_between($this->html,'an parallelen Zugriffen zu ',' beim');
|
||||
//debug($vorschalt);
|
||||
if($vorschalt == 'Anmeldeproblemen') {
|
||||
|
||||
$post = [
|
||||
'choice' => 1
|
||||
];
|
||||
|
||||
$this->exec_curl($ch, 'https://portal.schulen.bayern.de/my.policy', $post);
|
||||
//debug($this->html);
|
||||
}
|
||||
|
||||
//echo $this->html; die;
|
||||
$login_data = [
|
||||
'portal_username' => 'asd.trinkl',
|
||||
@@ -183,23 +198,26 @@ class AsdCurl
|
||||
];
|
||||
|
||||
$post = [
|
||||
'user_name' => $login_data['portal_username'],
|
||||
'username' => $login_data['portal_username'],
|
||||
'password' => $login_data['portal_password'],
|
||||
'repository' => 'schulen.bayern.de',
|
||||
'site_name' => 'schulportal',
|
||||
'secure' => '1',
|
||||
'resource_id' => '2',
|
||||
'login_type' => '2',
|
||||
//'repository' => 'schulen.bayern.de',
|
||||
//'site_name' => 'schulportal',
|
||||
//'secure' => '1',
|
||||
//'resource_id' => '2',
|
||||
//'login_type' => '2',
|
||||
];
|
||||
// Anmeldeformular fuer das Schulportal abschicken - Step 2
|
||||
|
||||
//https://portal.schulen.bayern.de/uniquesig2d1dfad4a11c25e42c462e53b4721e48/uniquesig0/SecureSchulportalPortalHomePage/
|
||||
//$this->exec_curl($ch, $SCHULPORTAL_BASE_URL . '/SecureSchulportalPortalHomePage', $post);
|
||||
$this->exec_curl($ch, $SCHULPORTAL_BASE_URL . '/InternalSite/Validate.asp', $post);
|
||||
//debug($SCHULPORTAL_BASE_URL);
|
||||
//$this->exec_curl($ch, $SCHULPORTAL_BASE_URL . '/InternalSite/Validate.asp', $post);
|
||||
$this->exec_curl($ch,'https://portal.schulen.bayern.de/my.policy', $post);
|
||||
if(!($this->status)) {
|
||||
die($this->error);
|
||||
}
|
||||
$this->exec_curl($ch, $SCHULPORTAL_BASE_URL . '/SecureSchulportalPortalHomePage/',false);
|
||||
//debug($this->html);die;
|
||||
//$this->exec_curl($ch, $SCHULPORTAL_BASE_URL . '/SecureSchulportalPortalHomePage/',false);
|
||||
//debug($this->html);die;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,44 @@ class AsdUs extends AsdCurl
|
||||
$this->error = false;
|
||||
}
|
||||
|
||||
public function hack($ch,$env) {
|
||||
$SCHULPORTAL_ASD_BASE_URL = Configure::read('AsdCurl.asdbaseurl.'.$env);
|
||||
// Anfrage abschicken
|
||||
|
||||
$post = ['<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<ASD_ANFRAGE_SVSW_ASD>
|
||||
<LIEFERUNGSCHLUESSEL>6460632610085</LIEFERUNGSCHLUESSEL>
|
||||
<DIENSTSTELLE>9400</DIENSTSTELLE>
|
||||
<SCHULJAHR>2019</SCHULJAHR>
|
||||
<AUFTRAG>
|
||||
<AUFTRAGSCHLUESSEL>6460632613170</AUFTRAGSCHLUESSEL>
|
||||
<SST_OBJECT_TYPE>UsSchuelerSucheSvswAsd</SST_OBJECT_TYPE>
|
||||
<US_SCHUELER_SUCHE_SVSW_ASD ANFRAGEMODUS="einzelabfrage">
|
||||
<NACHNAME>Trinkl</NACHNAME>
|
||||
<VORNAMEN>Fabian</VORNAMEN>
|
||||
<GEBURTSDATUM>
|
||||
<GEBURTSJAHR>2004</GEBURTSJAHR>
|
||||
<GEBURTSMONAT>1</GEBURTSMONAT>
|
||||
<GEBURTSTAG>1</GEBURTSTAG>
|
||||
</GEBURTSDATUM>
|
||||
<GESCHLECHT>1</GESCHLECHT>
|
||||
<GEBURTSORT>München</GEBURTSORT>
|
||||
<PHONETISCHE_SUCHE>1</PHONETISCHE_SUCHE>
|
||||
</US_SCHUELER_SUCHE_SVSW_ASD>
|
||||
</AUFTRAG>
|
||||
<SCHEMA_VERSION>1.0</SCHEMA_VERSION>
|
||||
<WERTELISTEN_VERSION>183.0.514</WERTELISTEN_VERSION>
|
||||
<CLIENT_VERSION>2.10.295_032_57_by</CLIENT_VERSION>
|
||||
<PLAUSI_VERSION>190809.093</PLAUSI_VERSION>
|
||||
</ASD_ANFRAGE_SVSW_ASD>
|
||||
'
|
||||
];
|
||||
$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/asd-sst/sst/any', $post);
|
||||
if(!($this->status)) {
|
||||
die($this->error);
|
||||
}
|
||||
}
|
||||
|
||||
public function save_us_data($ch,$env) {
|
||||
$SCHULPORTAL_ASD_BASE_URL = Configure::read('AsdCurl.asdbaseurl.'.$env);
|
||||
// Maske US 01 01 vom linken Menü aufrufen
|
||||
@@ -73,40 +111,24 @@ class AsdUs extends AsdCurl
|
||||
// Auf der Ergebnisseite auf "Alle" Klicken
|
||||
$viewstate = $this->get_string_between($this->html, 'id="javax.faces.ViewState" value="', '" autocomplete');
|
||||
$conversationId = $this->get_string_between($this->html, 'name="conversationId" value="', '" />');
|
||||
//$mainform = $this->get_string_between($this->html, 'j_idt', 'ALLE');
|
||||
//$mainform = $this->get_string_between($this->html, 'mojarra.jsfcljs(document.getElementById(', 'ALLE');
|
||||
//echo $this->html;
|
||||
//debug($mainform);die;
|
||||
|
||||
|
||||
$htmlParser = new \DOMDocument(); //to parse html using DOMDocument
|
||||
libxml_use_internal_errors(true); // your HTML gives parser warnings, keep them internal
|
||||
$htmlParser->loadHTML($this->html); //Loaded the html string we took from simple xml
|
||||
//$htmlParser->preserveWhiteSpace = false;
|
||||
|
||||
$xpath = new \DOMXPath($htmlParser);
|
||||
$elements = $xpath->query("//a[text()='ALLE']/@onclick");
|
||||
if (!is_null($elements)) {
|
||||
foreach ($elements as $element) {
|
||||
//echo "<br/>[". $element->nodeName. "]";
|
||||
//echo "<br/>[". $element->nodeValue. "]";
|
||||
$text = $element->nodeValue;
|
||||
preg_match_all('!\d+!', $text, $matches);
|
||||
//print_r($matches);
|
||||
$mainform = $matches[0][0];
|
||||
$htmlParser->preserveWhiteSpace = false;
|
||||
$hrefs = $htmlParser->getElementsByTagName('a');
|
||||
foreach($hrefs as $href) {
|
||||
if($href->textContent == 'ALLE') {
|
||||
foreach ($href->attributes as $attribute) {
|
||||
if($attribute->name == 'onclick') {
|
||||
$linktext = $attribute->textContent;
|
||||
preg_match('/j_idt\d\d\d/',$linktext,$matches);
|
||||
$linkid = substr($matches[0],5,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$mainform='184';
|
||||
//die;
|
||||
|
||||
/*
|
||||
if($env == 'prod') {
|
||||
$mainform = '189';
|
||||
}
|
||||
else {
|
||||
$mainform = '184';
|
||||
}
|
||||
*/
|
||||
$post = [
|
||||
'mainForm' => 'mainForm',
|
||||
'referenzBaumAnzeigen' => 'false',
|
||||
@@ -121,7 +143,7 @@ class AsdUs extends AsdCurl
|
||||
'skipvalidation' => 'true',
|
||||
'mainForm:istAnzeigeMaske' => 'false',
|
||||
'javax.faces.ViewState' => $viewstate,
|
||||
'mainForm:j_idt'.$mainform => 'mainForm:j_idt'.$mainform,
|
||||
'mainForm:j_idt'.$linkid => 'mainForm:j_idt'.$linkid,
|
||||
];
|
||||
$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/asdus/us_01_02.jsf?cid=' . $conversationId, $post);
|
||||
if(!($this->status)) {
|
||||
@@ -225,6 +247,23 @@ class AsdUs extends AsdCurl
|
||||
if(!($this->status)) {
|
||||
die($this->error);
|
||||
}
|
||||
|
||||
$htmlParser = new \DOMDocument(); //to parse html using DOMDocument
|
||||
libxml_use_internal_errors(true); // your HTML gives parser warnings, keep them internal
|
||||
$htmlParser->loadHTML($this->html); //Loaded the html string we took from simple xml
|
||||
$htmlParser->preserveWhiteSpace = false;
|
||||
$hrefs = $htmlParser->getElementsByTagName('a');
|
||||
foreach($hrefs as $href) {
|
||||
if($href->textContent == 'ALLE') {
|
||||
foreach ($href->attributes as $attribute) {
|
||||
if($attribute->name == 'onclick') {
|
||||
$linktext = $attribute->textContent;
|
||||
preg_match('/j_idt\d\d\d/',$linktext,$matches);
|
||||
$linkid = substr($matches[0],5,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//echo $this->html;die;
|
||||
// Auf der Ergebnisseite auf "Alle" Klicken
|
||||
$viewstate = $this->get_string_between($this->html, 'id="javax.faces.ViewState" value="', '" autocomplete');
|
||||
@@ -245,7 +284,7 @@ class AsdUs extends AsdCurl
|
||||
'skipvalidation' => 'true',
|
||||
'mainForm:istAnzeigeMaske' => 'false',
|
||||
'javax.faces.ViewState' => $viewstate,
|
||||
'mainForm:j_idt189' => 'mainForm:j_idt189'
|
||||
'mainForm:j_idt'.$linkid => 'mainForm:j_idt'.$linkid
|
||||
];
|
||||
$this->exec_curl($ch, $SCHULPORTAL_ASD_BASE_URL . '/asdup/up_03_02.jsf?cid=' . $conversationId, $post);
|
||||
if(!($this->status)) {
|
||||
|
||||
Reference in New Issue
Block a user