We are now allowing external requests via our new API system.
You can request an archive by using the following information, no user id or authentication is needed for now but this may change.
This API is designed to allow the rest of the Information Security researches access our data without any hassle at all. Currently our API is focusing on single archives but in the near future we are going to expand this to searchs to match the compatibilty of our main search engine.
By using the below information you can get the single archives via JSON or XML format from simple and easy to use scripts.
If you would like to contribute to this project please contact lee j on admin @ cyberwarnews [dot] info .
When a users makes a request to the api.php page it must be in the following format. http://api.ozdc.net/index.php?aid=1671 where 1671 is the id of the archive that you are requesting. The output of this will vary depending on archive and its related information.
Example raw output of http://api.ozdc.net/index.php?aid=1671
{
"aid":"1671",
"active":"1",
"size":"105.72 KB",
"type":"Breached Email Accounts",
"title":"Unknown","by":"@p0ccc",
"source":"http:\/\/pastebin.com\/qpbsqTDN",
"submitted":"2012-05-17",
"attack_date":"2012-05-16",
"method":"Unknown",
"latlong":"",
"latlong_name":"USA",
"target":"",
"target_ip":"",
"target_type":"Unknown",
"notes":"N\/A",
"news":"N\/A",
"statistics":
{
"total_emails":"1243",
"valids_email":"1062",
"already_stored":"181",
"duplicated":"0",
"livemail":"116",
"hotmail":"87",
"gmail":"723",
"yahoo":"185"
}
}
We figure the best way to get and read this data would be to turn the JSON to a readable php array therefore we can now easily print single values or a complete array. Examples below.
Basic php script using file_get_contents to obtain the archive in json format and turn it into a php array.
<?php
if(isset($_GET['aid'])){
$id = $_GET['aid'];
$g = file_get_contents('http://api.ozdc.net/index.php?aid='.$id);
$a = json_decode($g, true);
print_r($a);
}
?>
Returns an array as below which is taken from archive 1671
Array
(
[aid] => 1671
[active] => 1
[size] => 105.72 KB
[type] => Breached Email Accounts
[title] => Unknown
[by] => @p0ccc
[source] => http://pastebin.com/qpbsqTDN
[submitted] => 2012-05-17
[attack_date] => 2012-05-16
[method] => Unknown
[latlong] =>
[latlong_name] => USA
[target] =>
[target_ip] =>
[target_type] => Unknown
[notes] => N/A
[news] => N/A
[statistics] => Array
(
[total_emails] => 1243
[valids_email] => 1062
[already_stored] => 181
[duplicated] => 0
[livemail] => 116
[hotmail] => 87
[gmail] => 723
[yahoo] => 185
)
)
Now we understand what the values are we can call single ones to make pretty tables for users to read.
Example of getting and printing out the title of a requested Archive.
<?php
if(isset($_GET['aid'])){
$id = $_GET['aid'];
$raw = file_get_contents('http://api.ozdc.net/api.php?aid='.$id);
$archive = json_decode($raw, true);
echo 'AID: '.$archive['aid'].'<br>';
echo 'Approved: '.$archive['active'].'<br>';
echo 'Submission size: '.$archive['size'].'<br>';
echo 'Data Type: '.$archive['type'].'<br>';
echo 'Title: '.$archive['title'].'<br>';
echo 'By: '.$archive['by'].'<br>';
echo 'Source: '.$archive['source'].'<br>';
echo 'Submitted: '.$archive['submitted'].'<br>';
echo 'Attack Date: '.$archive['attack_date'].'<br>';
echo 'Attack Method: '.$archive['method'].'<br>';
echo 'GeoLoc Country: '.$archive['latlong'].'<br>';
echo 'GeoLoc Country Name: '.$archive['latlong_name'].'<br>';
echo 'Attack Target: '.$archive['target'].'<br>';
echo 'Target IP: '.$archive['target_ip'].'<br>';
echo 'Target Type: '.$archive['target_type'].'<br>';
echo 'Notes: '.$archive['notes'].'<br>';
echo 'News: '.$archive['news'].'<br>';
echo 'Total Mails: '.$archive['statistics']['total_emails'].'<br>';
echo 'Valid Mails: '.$archive['statistics']['valids_email'].'<br>';
echo 'Already Stored Mails: '.$archive['statistics']['already_stored'].'<br>';
echo 'Duplicated Mails: '.$archive['statistics']['duplicated'].'<br>';
echo 'live mails: '.$archive['statistics']['livemail'].'<br>';
echo 'hotmails: '.$archive['statistics']['hotmail'].'<br>';
echo 'gmails: '.$archive['statistics']['gmail'].'<br>';
echo 'yahoos: '.$archive['statistics']['yahoo'].'<br>';
}
?>
Example output of the above php example.
AID: 1715
Approved: 1
Submission size: 12.63 KB
Data Type: Breached Email Accounts
Title: data dump with emails
By: Anonymous
Source: http://pastebin.com/eE5Q62qA
Submitted: 2012-05-20
Attack Date: N/A
Attack Method: Unknown
GeoLoc Country: N/A
GeoLoc Country Name: USA
Attack Target: N/A
Target IP: N/A
Target Type: Unknown
Notes: N/A
News: N/A
Total Mails: 14
Valid Mails: 5
Already Stored Mails: 9
Duplicated Mails: 0
live mails: 0
hotmails: 2
gmails: 1
yahoos: 3 s
By adding a simple string to the query we can also return it as proper valid XML. To do this just add &format=xml and it will return as below.
<archive>
<aid>1715</aid>
<active>1</active>
<size>12.63 KB</size>
<type>Breached Email Accounts</type>
<title>data dump with emails</title>
<by>Anonymous</by>
<source>http://pastebin.com/eE5Q62qA</source>
<submitted>2012-05-20</submitted>
<attack_date>N/A</attack_date>
<method>Unknown</method>
<latlong>N/A</latlong>
<latlong_name>USA</latlong_name>
<target>N/A</target>
<target_ip>N/A</target_ip>
<target_type>Unknown</target_type>
<notes>N/A</notes>
<news>N/A</news>
<statistics>
<total_emails>14</total_emails>
<valids_email>5</valids_email>
<already_stored>9</already_stored>
<duplicated>0</duplicated>
<livemail>0</livemail>
<hotmail>2</hotmail>
<gmail>1</gmail>
<yahoo>3</yahoo>
</statistics>
</archive>
Coming..
Coming..