Forum Games

Ctrl + V

Submitted by Day, , Thread ID: 7130

Thread Closed

RE: Ctrl + V

AlexT
Newbie
Prime
Level:
0
Reputation:
2
Posts:
18
Likes:
1
Credits:
3
01-09-2016, 01:45 PM
#231
Now i will look weird, thanks 4chan .

[Image: 1472729850249.jpg]

RE: Ctrl + V

Bobikygo
Novice
Level:
0
Reputation:
0
Posts:
28
Likes:
0
Credits:
0
01-09-2016, 01:50 PM
#232
Poland :spooky: :spooky: :spooky:

RE: Ctrl + V

Wanda99
Novice
Level:
0
Reputation:
3
Posts:
26
Likes:
2
Credits:
22
16-10-2016, 10:15 PM
#233
/*
* Simple example makes call to Omniture API to get a companies report suites
*
* Requires the following libraries
*
* jakarta commons-lang 2.4
* jakarta commons-beanutils 1.7.0
* jakarta commons-collections 3.2
* jakarta commons-logging 1.1.1
* ezmorph 1.0.6
* json-lib-2.3-jdk13
*
*
* @author Lamont Crook
* @email [email protected]
*
*/

package com.omniture.security;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class OMTR_REST {
private static String USERNAME = "[your username]";
private static String PASSWORD = "[your shared secret]";
private static String ENDPOINT = "https://api.omniture.com/admin/1.3/rest/"; //san jose endpoint, change for your company's datacenter

private OMTR_REST() {}

public static String callMethod(String method, String data) throws IOException {
URL url = new URL(ENDPOINT + "?method=" + method);
URLConnection connection = url.openConnection();
connection.addRequestProperty("X-WSSE", getHeader());

connection.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
wr.write(data);
wr.flush();

InputStream in = connection.getInputStream();
BufferedReader res = new BufferedReader(new InputStreamReader(in, "UTF-8"));

StringBuffer sBuffer = new StringBuffer();
String inputLine;
while ((inputLine = res.readLine()) != null)
sBuffer.append(inputLine);

res.close();

return sBuffer.toString();
}

private static String getHeader() throws UnsupportedEncodingException {
byte[] nonceB = generateNonce();
String nonce = base64Encode(nonceB);
String created = generateTimestamp();
String password64 = getBase64Digest(nonceB, created.getBytes("UTF-8"), PASSWORD.getBytes("UTF-8"));
StringBuffer header = new StringBuffer("UsernameToken Username=\"");
header.append(USERNAME);
header.append("\", ");
header.append("PasswordDigest=\"");
header.append(password64.trim());
header.append("\", ");
header.append("Nonce=\"");
header.append(nonce.trim());
header.append("\", ");
header.append("Created=\"");
header.append(created);
header.append("\"");
return header.toString();
}

private static byte[] generateNonce() {
String nonce = Long.toString(new Date().getTime());
return nonce.getBytes();
}

private static String generateTimestamp() {
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
return dateFormatter.format(new Date());
}

private static synchronized String getBase64Digest(byte[] nonce, byte[] created, byte[] password) {
try {
MessageDigest messageDigester = MessageDigest.getInstance("SHA-1");
// SHA-1 ( nonce + created + password )
messageDigester.reset();
messageDigester.update(nonce);
messageDigester.update(created);
messageDigester.update(password);
return base64Encode(messageDigester.digest());
} catch (java.security.NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}

private static String base64Encode(byte[] bytes) {
return Base64Coder.encodeLines(bytes);
}

public static void main(String[] args) throws IOException {
Map map = new HashMap();
map.put("rs_type", new String[]{"standard"});
map.put("sp", "");

String response = OMTR_REST.callMethod("Company.GetReportSuites", JSONObject.fromObject(map).toString());
JSONObject jsonObj = JSONObject.fromObject(response);
JSONArray jsonArry = JSONArray.fromObject(jsonObj.get("report_suites"));

for(int i = 0; i < jsonArry.size(); i++) {
System.out.println("Report Suite ID: " + JSONObject.fromObject(jsonArry.get(i)).get("rsid"));
System.out.println("Site Title: " + JSONObject.fromObject(jsonArry.get(i)).get("site_title"));
System.out.println();
}
}
}

Copied it to paste into pastebin cause the website's font was shit.

RE: Ctrl + V

Yondu
Marry Poppins Y'all
Administrators
Level:
36
Reputation:
190
Posts:
1.55K
Likes:
336
Credits:
3.5K
28-10-2016, 05:22 PM
#236
the elder scrolls skyrim special edition
[Image: wsUuw16j6oyxLLRnnK.gif]

RE: Ctrl + V

Jaee
Pool full of liquor
Prime
Level:
0
Reputation:
38
Posts:
755
Likes:
29
Credits:
202
28-10-2016, 06:19 PM
#237
steam://joinlobby/730/109775243671313161/76561198264937248
Natsu is Bae
[Image: uFwKbzI.png]

RE: Ctrl + V

GmCiccio
Newbie
Level:
0
Reputation:
0
Posts:
11
Likes:
0
Credits:
5
30-10-2016, 02:24 PM
#239
AQUA GROTESQUE TYPEFACE
Direzione artistica Progettazione grafica Composizione tipografica

RE: Ctrl + V

Deleted_3747
0,004 IQ
Level:
19
Reputation:
216
Posts:
3.15K
Likes:
513
Credits:
150
30-10-2016, 02:38 PM
This post was last modified: 30-10-2016, 02:38 PM by Deleted_3747
#240
185.38.148.35:9053

Ip adress to a ts3 server lol

Users browsing this thread: 1 Guest(s)