New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

proapi

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proapi

PRONOTE 2014 - Permet de se connecter à Pronote sans passer par l'interface web.

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

node-proAPI

PRONOTE 2014 - Permet de se connecter à Pronote sans passer par l'interface web.

Voici un exemple script pour récupérer les devoirs à faire :

var proAPI = require("proAPI"),
	fs = require('fs');

var PRONOTE = new proAPI({
	url: "http://XXXXXXXXXXXXXXX/pronote/",
	user: ["username", "password"],
	//proxy: "http://localhost:8000/" // activer le proxy pour le debogage
}, function() {
	PRONOTE.getHomework(function(aJSON) {
		var dmy2mdy = function(a) {
			return a.replace(/^(\d+)\/(\d+)\/(\d+)$/, "$2/$1/$3");
		};

		var listeTravaux = aJSON.xml.PageCahierDeTexteReponse.ListeTravauxAFaire[0].TravailAFaire,
			travail = null;

		var jours = [],
			travaux = [],
			cle, date, matiere, tache;
		for (var x in listeTravaux) {
			travail = listeTravaux[x];

			date = +new Date(dmy2mdy(travail.PourLe[0]._));
			matiere = travail.Matiere[0].$.L;
			tache = travail.Descriptif[0]._;
			tache = tache.replace(/<div>\s+<\/div>/g, "");
			tache = tache.replace(/<div>(.+?)<\/div>/g, "$1");
			tache = tache.replace(/(\r\n)\1+/g, "");

			if (jours.indexOf(date) === -1)
				jours.push(date);

			if (date >= new Date().setHours(0,0,0,0)) 
				travaux.push([date, matiere, tache]);
		}

		jours.sort();
		travaux.sort(function (a, b) {
			return jours.indexOf(a[0]) > jours.indexOf(b[0]);
		});
		console.log(travaux);
	});

	PRONOTE.clearPresence();
});

FAQs

Package last updated on 05 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts