binwalk in reversing switch - router

everyone. I am a green apple in reversing. Recently i wanna reverse a switch but get some problems. i reaaaaaaaaly need your guys help.
first i extract the .bin file from the switch and use binwalk to analyse. but it shows nothing.
then i rename the bin file into zip file and unzip it to a new bin file.
this time binwalk told me this new bin seemed like a 7-zip file. so i rename it again as a .7z file and get a new bin second time.
For this time, i re-binwalk this new bin and i get this:
root#kali:/# binwalk -e ./root/Desktop/3900.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
15483795 0xEC4393 Copyright string: "Copyright(c) 1998-"
15483879 0xEC43E7 Copyright string: "Copyright(c) 2004-"
15508246 0xECA316 Unix path: /../../../software/config/cfgplane/cfg_msgp.c
15509456 0xECA7D0 Copyright string: "copyright-info enable"
15514394 0xECBB1A Copyright string: "Copyright (c) 1998-%s Huawei Technologies Co., Ltd. All rights reserved."
15514526 0xECBB9E Copyright string: "Copyright (c) 2004-%s 3Com Corporation and its licensors, All rights reserved."
15514690 0xECBC42 Copyright string: "Copyright (c) 2004-%s NEC Corporation. All rights reserved."
15514886 0xECBD06 Copyright string: "Copyright (c) 2004-%s Hangzhou H3C Technologies Co., Ltd. All rights reserved."
15515210 0xECBE4A Copyright string: "Copyright(c) 1998-%s Huawei Tech. Co.,Ltd. All rights reserved."
15515486 0xECBF5E Copyright string: "Copyright(c) 2004-%s 3Com Corporation and its licensors. All rights reserved."
15515566 0xECBFAE Copyright string: "Copyright(c) 2004-%s NEC Corporation. All rights reserved."
15515736 0xECC058 Copyright string: "Copyright (c) 2004-%s Hangzhou H3C Technologies Co., Ltd. All rights reserved."
15518176 0xECC9E0 Copyright string: "copyright-info"
15530163 0xECF8B3 Copyright string: "copyright information"
15565459 0xED8293 Copyright string: "Copyright (c) 1998-%s by VRP Team Beijing Institute Huawei Tech, Inc"
15611066 0xEE34BA Unix path: /../../../software/config/vosvfs/vfs_cmd.c
15614526 0xEE423E Unix path: /../../../software/config/vosvfs/vfs_flsh.c
15626866 0xEE7272 Unix path: /../../../software/config/vosvfs/vfs_lio.c
15650452 0xEECE94 Base64 standard index table
15856182 0xF1F236 Unix path: /../../../software/ifnet/ifkern/if_func.c
15866478 0xF21A6E Unix path: /../../../software/ifnet/ifkern/if_index.c
15868270 0xF2216E Unix path: /../../../software/ifnet/ifkern/if_mib.c
15913506 0xF2D222 Unix path: /../../../software/ip/ipaddr/ip_addr.c
15949882 0xF3603A Unix path: /../../../software/ip/ipicmp/ip_icmp.c
15985058 0xF3E9A2 Unix path: /../../../software/ip/ipmib/ip_mib.c
16088257 0xF57CC1 eCos RTOS string reference: "eCost"
16089638 0xF58226 Neighborly text, "NeighborspfVirtIfHelloInterval"
16112196 0xF5DA44 Neighborly text, "NeighborSolicitscmpInRedirects"
16112228 0xF5DA64 Neighborly text, "NeighborAdvertisementsupMembQueries"
16112669 0xF5DC1D Neighborly text, "NeighborSolicitsmpOutRedirects"
16112701 0xF5DC3D Neighborly text, "NeighborAdvertisementsupMembQueries"
16140727 0xF649B7 eCos RTOS string reference: "eCos"
16209471 0xF7563F eCos RTOS string reference: "eCos"
16222603 0xF7898B Neighborly text, "NeighborTablecDLDPNotification"
16222627 0xF789A3 Neighborly text, "NeighborEntryx"
16223179 0xF78BCB Neighborly text, "NeighborBridgeMacidirection"
16223207 0xF78BE7 Neighborly text, "NeighborPortIndexrState"
16223263 0xF78C1F Neighborly text, "NeighborStatenalPort"
16223287 0xF78C37 Neighborly text, "NeighborAgingTimeo"
16257031 0xF81007 eCos RTOS string reference: "eCos"
16330271 0xF92E1F eCos RTOS string reference: "eCos"
16343083 0xF9602B Neighborly text, "NeighborTablecDLDPNotification"
16343107 0xF96043 Neighborly text, "NeighborEntryx"
16343659 0xF9626B Neighborly text, "NeighborBridgeMacidirection"
16343687 0xF96287 Neighborly text, "NeighborPortIndexrState"
16343743 0xF962BF Neighborly text, "NeighborStatenalPort"
16343767 0xF962D7 Neighborly text, "NeighborAgingTimeo"
16380631 0xF9F2D7 eCos RTOS string reference: "eCos"
16421755 0xFA937B Neighborly text, "NeighborTablecDLDPNotification"
16421779 0xFA9393 Neighborly text, "NeighborEntryx"
16422331 0xFA95BB Neighborly text, "NeighborBridgeMacidirection"
16422359 0xFA95D7 Neighborly text, "NeighborPortIndexrState"
16422415 0xFA960F Neighborly text, "NeighborStatenalPort"
16422439 0xFA9627 Neighborly text, "NeighborAgingTimeo"
16465775 0xFB3F6F eCos RTOS string reference: "eCos"
16524211 0xFC23B3 Neighborly text, "NeighborLoss"
16600952 0xFD4F78 OpenSSH RSA public key
16600964 0xFD4F84 OpenSSH DSA public key
16601040 0xFD4FD0 Base64 standard index table
16653303 0xFE1BF7 Neighborly text, "Neighbor Information%s, %s, aging count %d"
16653330 0xFE1C12 Neighborly text, "neighbor %s(node %s)ormal"
16653477 0xFE1CA5 Neighborly text, "neighbor %s(node %s), aging count %d %s), aging count %d"
16653524 0xFE1CD4 Neighborly text, "neighbor %s(node %s), aging count %d02x"
16653751 0xFE1DB7 Copyright string: "Copyright (c) 2004-%s 3Com Corporation and its licensors, All rights reserved."
16653947 0xFE1E7B Copyright string: "Copyright (c) Reserved."
16654087 0xFE1F07 Copyright string: "Copyright(c) 2004-%s Hangzhou H3C Tech. Co., Ltd. All rights reserved."
16654327 0xFE1FF7 Copyright string: "Copyright (c) 1998-%s Huawei Technologies Co.,Ltd. All rights reserved."
16657037 0xFE2A8D Neighborly text, "Neighbor Informations(node %s)"
16657061 0xFE2AA5 Neighborly text, "Neighbor Information "
16657090 0xFE2AC2 Neighborly text, "neighbor %s(node %s)"
16670514 0xFE5F32 Unix path: /../../../software/vos/vosipc/ipc_intf.c
16680294 0xFE8566 Unix path: /../../../software/vos/vosipc/ipc_cmd.c
16724146 0xFF30B2 Unix path: /../../../software/lsw/devm/dev_api.c
16742510 0xFF786E Unix path: /../../../software/lsw/devm/dev_cli.c
16775050 0xFFF78A Unix path: /../../../software/lsw/devm/dev_cli2.c
16776610 0xFFFDA2 Unix path: /../../../software/lsw/devm/dev_dbp.c
16777922 0x10002C2 Unix path: /../../../software/lsw/devm/dev_di.c
16782142 0x100133E Unix path: /../../../software/lsw/devm/dev_disp.c
16783018 0x10016AA Unix path: /../../../software/lsw/devm/dev_drm.c
16786342 0x10023A6 Unix path: /../../../software/lsw/devm/dev_ekdm.c
16787106 0x10026A2 Unix path: /../../../software/lsw/devm/dev_ibc.c
16787458 0x1002802 Unix path: /../../../software/lsw/devm/dev_smth.c
16787634 0x10028B2 Unix path: /../../../software/lsw/devm/dev_ddm.c
16799838 0x100585E Unix path: /../../../software/lsw/mam/mam_cfg.c
16802322 0x1006212 Unix path: /../../../software/lsw/mam/mam_hot.c
16806630 0x10072E6 Unix path: /../../../software/lsw/l2inf/src/inf_bdrn.c
16810006 0x1008016 Unix path: /../../../software/lsw/l2inf/src/inf_cfg1.c
16820550 0x100A946 Unix path: /../../../software/lsw/l2inf/src/inf_cfg2.c
16837078 0x100E9D6 Unix path: /../../../software/lsw/l2inf/src/inf_cmd.c
16838994 0x100F152 Unix path: /../../../software/lsw/l2inf/src/inf_func.c
16907862 0x101FE56 Unix path: /../../../software/lsw/l2inf/src/inf_init.c
16907970 0x101FEC2 Unix path: /../../../software/lsw/l2inf/src/inf_hot.c
16926534 0x1024746 Unix path: /../../../software/lsw/l2inf/src/inf_dbug.c
16933362 0x10261F2 Unix path: /../../../software/lsw/l2inf/src/inf_agg.c
16935970 0x1026C22 Unix path: /../../../software/lsw/l2inf/src/inf_irf.c
17022870 0x103BF96 Unix path: /../../../software/lsw/8021x/8021x_init.c
17023070 0x103C05E Unix path: /../../../software/lsw/8021x/8021x_aut.c
17034054 0x103EB46 Unix path: /../../../software/lsw/8021x/8021x_cfg.c
17043978 0x104120A Unix path: /../../../software/lsw/8021x/8021x_func.c
17061814 0x10457B6 Unix path: /../../../software/lsw/8021x/8021x_rcv.c
17062702 0x1045B2E Unix path: /../../../software/lsw/8021x/8021x_snd.c
17064454 0x1046206 Unix path: /../../../software/lsw/8021x/8021x_tmr.c
17076050 0x1048F52 Neighborly text, "Neighbor %ld: Aging Time: %ld(s)ld, Pkts Rvd: %ld, Pkts Err: %ld"
17076171 0x1048FCB Neighborly text, "Neighbor Discovery Protocol Ver: %ld, Hello Timer: %ld(s), Aging Timer: %ld(s)g Timer: %ld(s)"
17076255 0x104901F Neighborly text, "Neighbor Discovery Protocol is disabled.Protocol is enabled."
17077888 0x1049680 Neighborly text, "neighbor discovery protocol protocol"
17077933 0x10496AD Neighborly text, "Neighbor discovery protocolent setting"
17206274 0x1068C02 Unix path: /../../../software/lsw/lacp/lacp_agt.c
17210514 0x1069C92 Unix path: /../../../software/lsw/lacp/lacp_al.c
17217766 0x106B8E6 Unix path: /../../../software/lsw/lacp/lacp_cfg.c
17224400 0x106D2D0 Ubiquiti partition header, header size: 56 bytes, name: "PARTNER_CHURN", base address: 0x52000000, data size: -1127147903 bytes
17226050 0x106D942 Unix path: /../../../software/lsw/lacp/lacp_fsm.c
17237842 0x1070752 Unix path: /../../../software/lsw/lacp/lacp_pub.c
17252458 0x107406A Unix path: /../../../software/lsw/mac_auth/mac_auth.c
17261086 0x107621E Unix path: /../../../software/lsw/mac_auth/mac_cfg.c
17429270 0x109F316 Unix path: /../../../software/lsw/port_sec/psec_func.c
17446945 0x10A3821 Neighborly text, "Neighbor discovery protocolor discovery protocol"
17447002 0x10A385A Neighborly text, "Neighbor discovery protocolnt setting"
17449794 0x10A4342 Unix path: /../../../software/lsw/oadp/src/oadp_snd.c
17485268 0x10ACDD4 HTML document header
17485756 0x10ACFBC HTML document footer
17485764 0x10ACFC4 HTML document header
17486039 0x10AD0D7 HTML document footer
17486048 0x10AD0E0 HTML document header
17486524 0x10AD2BC HTML document footer
17486572 0x10AD2EC HTML document header
17486771 0x10AD3B3 HTML document footer
17486780 0x10AD3BC HTML document header
17487112 0x10AD508 HTML document footer
17487120 0x10AD510 HTML document header
17487466 0x10AD66A HTML document footer
17487476 0x10AD674 HTML document header
17487685 0x10AD745 HTML document footer
17487696 0x10AD750 HTML document header
17488016 0x10AD890 HTML document footer
17516670 0x10B487E Copyright string: "copyright C 1988 by the Institute of Electrical and "
17518516 0x10B4FB4 Copyright string: "Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The "
17518648 0x10B5038 Copyright string: "copyrighted by The"
17519959 0x10B5557 Copyright string: "copyright notice, "
17520092 0x10B55DC Copyright string: "copyright notice, "
17520260 0x10B5684 Copyright string: "Copyright 1994-2002 FreeBSD, Inc. All rights reserved."
17520871 0x10B58E7 Copyright string: "copyright notice and this permission *"
17520951 0x10B5937 Copyright string: "copyright notice appears in all *"
17521134 0x10B59EE Copyright string: "Copyright (c) David L. Mills 1992-2003 *"
17521554 0x10B5B92 Copyright string: "copyright notice applies to all files collectively called"
17521777 0x10B5C71 Copyright string: "Copyright law to grant that status or there are a variety of "
17522425 0x10B5EF9 Copyright string: "copyright notices impose conditions for redistribution, use "
17522850 0x10B60A2 Copyright string: "copyright claims of the distributing "
17522914 0x10B60E2 Copyright string: "copyright notices. Note that Linux "distributions" "
17523152 0x10B61D0 Copyright string: "copyright terms that are at odds with the OpenBSD license can not be included "
17523312 0x10B6270 Copyright string: "copyright notices based on the Berkeley model. Such material can be included "
17523858 0x10B6492 Copyright string: "copyrighted by individuals who have "
17525203 0x10B69D3 Copyright string: "copyrighted code. "
17525823 0x10B6C3F Copyright string: "copyright is similar to the Berkeley copyright, except that it "
17525860 0x10B6C64 Copyright string: "copyright, except that it "
17525934 0x10B6CAE Copyright string: "copyrights, which prevents the general distribution of "
17526252 0x10B6DEC Copyright string: "copyright is similar to the Berkeley copyright, except "
17526289 0x10B6E11 Copyright string: "copyright, except "
17526396 0x10B6E7C Copyright string: "copyright notice effectively releases any rights "
17526464 0x10B6EC0 Copyright string: "copyright, or where the material is the product of an "
17526652 0x10B6F7C Copyright string: "copyright owner has "
17526721 0x10B6FC1 Copyright string: "copyrighted by manufacturers or "
17526943 0x10B709F Copyright string: "copyrights, "
17527015 0x10B70E7 Copyright string: "copyrights can be included in "
17527062 0x10B7116 Copyright string: "copyright or included licensing terms similar to the Berkeley "
17527162 0x10B717A Copyright string: "copyrights, or material to which AT&T has "
17527305 0x10B7209 Copyright string: "copyrights to much "Unix" code and documentation, "
17527451 0x10B729B Copyright string: "copyrighted material. Material with Berkeley copyrights, or copyrights "
17527496 0x10B72C8 Copyright string: "copyrights, or copyrights "
17527511 0x10B72D7 Copyright string: "copyrights "
17527538 0x10B72F2 Copyright string: "copyright holder, while imposing minimal conditions on the use "
17527617 0x10B7341 Copyright string: "copyright is the model for the OpenBSD copyright. It retains the "
17527656 0x10B7368 Copyright string: "copyright. It retains the "
17527717 0x10B73A5 Copyright string: "copyrights. "
17527980 0x10B74AC Copyright string: "copyright holder decide to "go commercial" he can not revoke permissions "
17528136 0x10B7548 Copyright string: "copyright holder can not retroactively say that an individual or class of "
17529073 0x10B78F1 Copyright string: "copyright, rather all "
17529141 0x10B7935 Copyright string: "copyright notice or associated "
17529184 0x10B7960 Copyright string: "copyright arises from the creation of a work and not the text or a "
17529378 0x10B7A22 Copyright string: "copyright on a derivative work can neither grant additional "
17529500 0x10B7A9C Copyright string: "copyright holder "
17529872 0x10B7C10 Copyright string: "copyright law, usually subject to a variety of conditions. At one extreme "
17530100 0x10B7CF4 Copyright string: "copyright laws. "
17530284 0x10B7DAC Copyright string: "copyrights arise from the creation of a work, rather than through a "
17530440 0x10B7E48 Copyright string: "copyright holder/distributor with respect to liability "
17530525 0x10B7E9D Copyright string: "copyright law and with disclaimers that state "
17530688 0x10B7F40 Copyright string: "copyright to the material or to part of "
17530775 0x10B7F97 Copyright string: "copyrights, but rather notices "
i find nothing meaningful, if i use command: binwalk -Me 3900.bin, i get a bunch of nonsense. No single file could be analyzed in IDA pro. Only some html files were extracted.
And i doubt if this new bin file is some sort of file operation system but not recognized by binwalk.
So i don't know how to continue my reversing. if anyone could give any advice, i will appreciate a lot.
Any answer is welcome!
Thanks a lot!

Related

Auto fill some fields in form when you found id of other form, odoo 8.0

I try to create a simple function who try to fill specific fields in own form when I select the ID of patient registered in other form/module. I put an example:
Module Registro:
(create patient)
(automatic generation ID and visible)
-Nombre:
-Email:
-Teléfono:
(save)
Admisión module:
(Open new form)
-ID: select id
(function for auto fill the next fields)
-Nombre: nombre (registro)
-Email: email(registro)
-Teléfono: teléfono(registro)
Use the new API Odoo 8.0 I try this, but doesn't work with message: error 500 type.
función autocompletar campos
#api.onchange('telefono_contacto','persona_contacto','email','nombre_acompanante') # mete campos a afectar
def autofill(self):
# comdición; si esta con el id seleccionado
# self.id_anamnesis
# llenar los campos con los correspondientes del id
# self.telefono_contacto =''
# self.persona_contacto = ''
# self.email = ''
# self.nombre_acompanante = ''
pass # aquí la lógica
(La plataforma es Odoo 8.0, S.O: Ubuntu 14.04)
Thank you and best reegards,
Marco García Baturan.
product_id = fields.Many2one("myproduct.model",string="Product", required=True)
description = fields.Char("Description", related="product_id.description", store=True)
It is done using related="......"
What I have done is When I select my product it will automatically
set description of that particular product.
So you need to add related where you want to auto fill.
If you set store=True then description is store into database.

Saving 2 versions of an entity at the same time

I'm currently trying to implement a CRUD-Application für Orders/Articles in JSF/Primefaces.
Whenever I create a new version of an article I want to merge the old entity with a different status and save the new entity populated by form input with a new ID.
This is the relationship between Article and OrderLine:
The Article Entity has the following field:
#OneToMany(cascade = CascadeType.ALL, mappedBy = "fkArticleID")
#XmlTransient
private Collection<OrderLine> orderLineCollection;
This is the method that updates/saves the new Entity:
public void edit(Article article) throws OptimisticLockException {
/* PK des Auftrags/der Auftragsposition speichern um die Suche zu vereinfachen */
int articleID = article.getArticleID();
/**
*
* Falls sich article im Zustand "detached" befindet, werden in
* attachedArticle die aktuellen Daten aus der DB geladen.
*
* Falls sich orderLine im Zustand "managed" befindet, werden in
* attachedOrderLine die Daten aus dem PersistenceContext geladen. Dies
* ist notwendig, da nur Datensätze für Entities gesperrt werden können
* die sich im Zustand "managed" befinden.
*
*/
Article attachedArticle = em.find(Article.class, articleID, LockModeType.OPTIMISTIC);
/* Prüfen ob der Artikel noch in der Datenbank vorhanden ist */
if (attachedArticle != null) {
/* Laden des aktuellsten Datensatzes aus der Datenbank */
Article latestVersionArticle = findLatestVersion(articleID);
/* Anhand der Version wird geprüft ob die bearbeiteten Daten noch konsistent mit dem Zustand der Datenbank sind */
if (latestVersionArticle.getVersion() == article.getVersion()) {
/**
* Schreibt den bearbeiteten Artikel zurück in die Datenbank,
* Versionsnummer wird am Ende der Transaktion automatisch
* inkrementiert (optimistische Sperre)
*/
latestVersionArticle.setArticleStatus(ArticleStatus.GESPERRT);
em.merge(latestVersionArticle);
/**
* Erstellt einen neuen Artikel mit den eingegebenen Daten und
* dem Status Freigegeben.
*/
article.setArticleStatus(ArticleStatus.FREIGEGEBEN);
article.setOrderLineCollection(null);
em.persist(article);
} else {
/* OptimisticLockException werfen falls die Daten des Auftrags nicht mehr konsistent sind */
throw new OptimisticLockException(article);
}
} else {
throw new OptimisticLockException(article);
}
}
Everything seems to work fine at first.. however the newer Version of the article seems to automatically create another OrderLine which shows up in the existing Order.. so whenever I "update" an article, while the newer version is created, it is also creating another OrderLine.. I suspect the fault lies with the #OneToMany field in the Article-Entity.. I'm trying to set the orderLineCollection to null before persisting but it doesnt seem to work.
You have to remove cascading on the orderLineCollection.
If you persist an article, you'll always get duplicates of the existing orderLines.
Please also consider to remove the bidirectional relationship between Article and OrderLine. Usually you only need a unidirectional relationship from OrderLine to Article. If you need all OrderLines for an article, you can use a NamedQuery.

geocode don't show subpremise address Brazil

how to collect room number information on a building in the google geocode?
in my search don't show. SUBPREMISE
example address: rua joao samaha 1385, sala 403 bl 02 sao joao batista, belo horizonte, MG, Brazil.
https://maps.googleapis.com/maps/api/geocode/json?address=
I'm a developer at SmartyStreets, an international address verification API provider. Here's the component information that we have on that address:
[
{
// preceding data omitted
"components":{
"administrative_area":"MG",
"building":"Bloco 02",
"dependent_locality":"São João Batista (Venda Nova)",
"country_iso_3":"BRA",
"locality":"Belo Horizonte",
"postal_code":"31520-100",
"postal_code_short":"31520-100",
"premise":"1385",
"premise_number":"1385",
"thoroughfare":"Rua João Samaha",
"thoroughfare_name":"Joao Samaha",
"thoroughfare_type":"Rua",
"building_leading_type":"Bloco",
"sub_building_type":"Sala",
"sub_building_number":"403"
},
// remaining data omitted
}
]
Does that information help?
https://smartystreets.com/docs/international#components

phpseclib cant parse CSR from Microsoft CA?

In my ongoing struggle with public key crypto i ran into a snag that's possibly beyond my expertise with parsing CSR's:
I have not been able to get phpseclib to X509->loadCSR() this chunk from a MS server 2012r2 CA:
# more file
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIFGDCCAwACAQAwOjEWMBQGCgmSJomT8ixkARkWBnNlY3VyZTEgMB4GA1UEAxMX
LlNlY3VyZSBFbnRlcnByaXNlIENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
ggIKAoICAQCzgEpL+Za7a3y7YpURDrxlGIBlks25fD0tHaZIYkBTaXA5h+9MWoXn
FA7AlIUt8pbBvXdJbOCmGaeQmBfBH0Qy9vTbx/DR2IOwzqy2ZHuurI5bPL12ceE2
Mxa9xgY/i7U6MAUtoA3amEd7cKj2fz9EWZruRladOX0DXv9KexSan+45QjCWH+u2
Cxem2zH9ZDNPGBuAF9YsAvkdHdAoX8aSm05ZAjUiO2e/+L57whh7zZiDY3WIhin7
N/2JNTKVO6lx50S8a34XUKBt3SKgSR941hcLrBYUNftUYsTPo40bzKKcWqemiH+w
jQiDrln4V2b5EbVeoGWe4UDPXCVmC6UPklG7iYfF0eeK4ujV8uc9PtV2LvGLOFdm
AYE3+FAba5byQATw/DY8EJKQ7ptPigJhVe47NNeJlsKwk1haJ9k8ZazjS+vT45B5
pqe0yBFAEon8TFnOLnAOblmKO12i0zqMUNAAlmr1c8jNjLr+dhruS+QropZmzZ24
mAnFG+Y0qpfhMzAxTGQyVjyGwDfRK/ARmtrGpmROjj5+6VuMmZ6Ljf3xN09epmtH
gJe+lYNBlpfUYg16tm+OusnziYnXL6nIo2ChOY/7GNJJif9fjvvaPDCC98K64av5
5rpIx7N/XH4hwHeQQkEQangExE+8UMyBNFNmvPnIHVHUZdYo4SLsYwIDAQABoIGY
MBsGCisGAQQBgjcNAgMxDRYLNi4zLjk2MDAuMi4weQYJKoZIhvcNAQkOMWwwajAQ
BgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU5nEIMEUT5mMd1WepmviwgK7dIzww
GQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB
/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAKZl6bAeaID3b/ic4aztL8ZZI7vi
D3A9otUKx6v1Xe63zDPR+DiWSnxb9m+l8OPtnWkcLkzEIM/IMWorHKUAJ/J871D0
Qx+0/HbkcrjMtVu/dNrtb9Z9CXup66ZvxTPcpEziq0/n2yw8QdBaa+lli65Qcwcy
tzMQK6WQTRYfvVCIX9AKcPKxwx1DLH+7hL/bERB1lUDu59Jx6fQfqJrFVOY2N8c0
MGvurfoHGmEoyCMIyvmIMu4+/wSNEE/sSDp4lZ6zuF6rf1m0GiLdTX2XJE+gfvep
JTFmp4S3WFqkszKvaxBIT+jV0XKTNDwnO+dpExwU4jZUh18CdEFkIUuQb0gFF8B7
WJFVpNdsRqZRPBz83BW1Kjo0yAmaoTrGNmG0p6Qf3K2zbk1+Jik3VZq4rvKoTi20
6RvLA2//cMNfkYPsuqvoHGe2e0GOLtIB63wJzloWROpb72ohEHsvCKullIJVSuiS
9sfTBAenHCyndgAEd4T3npTUdaiNumVEm5ilZId7LAYekJhkgFu3vlcl8blBJKjE
skVTp7JpBmdXCL/G/6H2SFjca4JMOAy3DxwlGdgneIaXazHs5nBK/BgKPIyPzZ4w
secxBTTCNgI48YezK3GDkn65cmlnkt6F6Mf0MwoDaXTuB88Jycbwb5ihKnHEJIsO
draiRBZruwMPwPIP
-----END NEW CERTIFICATE REQUEST-----
# openssl req -in file -noout -text
Certificate Request:
Data:
Version: 0 (0x0)
Subject: DC=secure, CN=.Secure Enterprise CA 1
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (4096 bit)
Modulus:
00:b3:80:4a:4b:f9:96:bb:6b:7c:bb:62:95:11:0e:
bc:65:18:80:65:92:cd:b9:7c:3d:2d:1d:a6:48:62:
40:53:69:70:39:87:ef:4c:5a:85:e7:14:0e:c0:94:
85:2d:f2:96:c1:bd:77:49:6c:e0:a6:19:a7:90:98:
17:c1:1f:44:32:f6:f4:db:c7:f0:d1:d8:83:b0:ce:
ac:b6:64:7b:ae:ac:8e:5b:3c:bd:76:71:e1:36:33:
16:bd:c6:06:3f:8b:b5:3a:30:05:2d:a0:0d:da:98:
47:7b:70:a8:f6:7f:3f:44:59:9a:ee:46:56:9d:39:
7d:03:5e:ff:4a:7b:14:9a:9f:ee:39:42:30:96:1f:
eb:b6:0b:17:a6:db:31:fd:64:33:4f:18:1b:80:17:
d6:2c:02:f9:1d:1d:d0:28:5f:c6:92:9b:4e:59:02:
35:22:3b:67:bf:f8:be:7b:c2:18:7b:cd:98:83:63:
75:88:86:29:fb:37:fd:89:35:32:95:3b:a9:71:e7:
44:bc:6b:7e:17:50:a0:6d:dd:22:a0:49:1f:78:d6:
17:0b:ac:16:14:35:fb:54:62:c4:cf:a3:8d:1b:cc:
a2:9c:5a:a7:a6:88:7f:b0:8d:08:83:ae:59:f8:57:
66:f9:11:b5:5e:a0:65:9e:e1:40:cf:5c:25:66:0b:
a5:0f:92:51:bb:89:87:c5:d1:e7:8a:e2:e8:d5:f2:
e7:3d:3e:d5:76:2e:f1:8b:38:57:66:01:81:37:f8:
50:1b:6b:96:f2:40:04:f0:fc:36:3c:10:92:90:ee:
9b:4f:8a:02:61:55:ee:3b:34:d7:89:96:c2:b0:93:
58:5a:27:d9:3c:65:ac:e3:4b:eb:d3:e3:90:79:a6:
a7:b4:c8:11:40:12:89:fc:4c:59:ce:2e:70:0e:6e:
59:8a:3b:5d:a2:d3:3a:8c:50:d0:00:96:6a:f5:73:
c8:cd:8c:ba:fe:76:1a:ee:4b:e4:2b:a2:96:66:cd:
9d:b8:98:09:c5:1b:e6:34:aa:97:e1:33:30:31:4c:
64:32:56:3c:86:c0:37:d1:2b:f0:11:9a:da:c6:a6:
64:4e:8e:3e:7e:e9:5b:8c:99:9e:8b:8d:fd:f1:37:
4f:5e:a6:6b:47:80:97:be:95:83:41:96:97:d4:62:
0d:7a:b6:6f:8e:ba:c9:f3:89:89:d7:2f:a9:c8:a3:
60:a1:39:8f:fb:18:d2:49:89:ff:5f:8e:fb:da:3c:
30:82:f7:c2:ba:e1:ab:f9:e6:ba:48:c7:b3:7f:5c:
7e:21:c0:77:90:42:41:10:6a:78:04:c4:4f:bc:50:
cc:81:34:53:66:bc:f9:c8:1d:51:d4:65:d6:28:e1:
22:ec:63
Exponent: 65537 (0x10001)
Attributes:
1.3.6.1.4.1.311.13.2.3 :6.3.9600.2.
Requested Extensions:
1.3.6.1.4.1.311.21.1:
...
X509v3 Subject Key Identifier:
E6:71:08:30:45:13:E6:63:1D:D5:67:A9:9A:F8:B0:80:AE:DD:23:3C
1.3.6.1.4.1.311.20.2: ..S.u.b.C.A
X509v3 Key Usage:
Digital Signature, Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
a6:65:e9:b0:1e:68:80:f7:6f:f8:9c:e1:ac:ed:2f:c6:59:23:
bb:e2:0f:70:3d:a2:d5:0a:c7:ab:f5:5d:ee:b7:cc:33:d1:f8:
38:96:4a:7c:5b:f6:6f:a5:f0:e3:ed:9d:69:1c:2e:4c:c4:20:
cf:c8:31:6a:2b:1c:a5:00:27:f2:7c:ef:50:f4:43:1f:b4:fc:
76:e4:72:b8:cc:b5:5b:bf:74:da:ed:6f:d6:7d:09:7b:a9:eb:
a6:6f:c5:33:dc:a4:4c:e2:ab:4f:e7:db:2c:3c:41:d0:5a:6b:
e9:65:8b:ae:50:73:07:32:b7:33:10:2b:a5:90:4d:16:1f:bd:
50:88:5f:d0:0a:70:f2:b1:c3:1d:43:2c:7f:bb:84:bf:db:11:
10:75:95:40:ee:e7:d2:71:e9:f4:1f:a8:9a:c5:54:e6:36:37:
c7:34:30:6b:ee:ad:fa:07:1a:61:28:c8:23:08:ca:f9:88:32:
ee:3e:ff:04:8d:10:4f:ec:48:3a:78:95:9e:b3:b8:5e:ab:7f:
59:b4:1a:22:dd:4d:7d:97:24:4f:a0:7e:f7:a9:25:31:66:a7:
84:b7:58:5a:a4:b3:32:af:6b:10:48:4f:e8:d5:d1:72:93:34:
3c:27:3b:e7:69:13:1c:14:e2:36:54:87:5f:02:74:41:64:21:
4b:90:6f:48:05:17:c0:7b:58:91:55:a4:d7:6c:46:a6:51:3c:
1c:fc:dc:15:b5:2a:3a:34:c8:09:9a:a1:3a:c6:36:61:b4:a7:
a4:1f:dc:ad:b3:6e:4d:7e:26:29:37:55:9a:b8:ae:f2:a8:4e:
2d:b4:e9:1b:cb:03:6f:ff:70:c3:5f:91:83:ec:ba:ab:e8:1c:
67:b6:7b:41:8e:2e:d2:01:eb:7c:09:ce:5a:16:44:ea:5b:ef:
6a:21:10:7b:2f:08:ab:a5:94:82:55:4a:e8:92:f6:c7:d3:04:
07:a7:1c:2c:a7:76:00:04:77:84:f7:9e:94:d4:75:a8:8d:ba:
65:44:9b:98:a5:64:87:7b:2c:06:1e:90:98:64:80:5b:b7:be:
57:25:f1:b9:41:24:a8:c4:b2:45:53:a7:b2:69:06:67:57:08:
bf:c6:ff:a1:f6:48:58:dc:6b:82:4c:38:0c:b7:0f:1c:25:19:
d8:27:78:86:97:6b:31:ec:e6:70:4a:fc:18:0a:3c:8c:8f:cd:
9e:30:b1:e7:31:05:34:c2:36:02:38:f1:87:b3:2b:71:83:92:
7e:b9:72:69:67:92:de:85:e8:c7:f4:33:0a:03:69:74:ee:07:
cf:09:c9:c6:f0:6f:98:a1:2a:71:c4:24:8b:0e:76:b6:a2:44:
16:6b:bb:03:0f:c0:f2:0f
I added the mystery vendor specific OID's to the OID list in hopes that would get me somewhere:
// the following are X.509 extensions not supported by phpseclib
'1.3.6.1.5.5.7.1.12' => 'id-pe-logotype',
'1.3.6.1.4.1.311.13.2.3' => 'szOID_OS_VERSION',
'1.3.6.1.4.1.311.20.2' => 'szOID_ENROLL_CERTTYPE_EXTENSION',
'1.3.6.1.4.1.311.21.1' => 'szOID_CERTSRV_CA_VERSION',
But I am unable to get past this part of the loadCSR() function:
$asn1->loadOIDs($this->oids);
$decoded = $asn1->decodeBER($csr);
//... $decoded contains content, but turns into binary junk in the middle
$csr = $asn1->asn1map($decoded[0], $this->CertificationRequest);
if (!isset($csr) || $csr === false) {
Apparently the asn1map function does not like the garbage in the middle of $decoded??? Not sure if there is some kind of way to go about debugging this I am missing, but I dont know enough about BER decoding and asn1 mapping to correct the issue on my own =(
Pretty please help, I really love this library (i use it for so many great things) and would like to use it to authorize enterprise CA's from my offline Linux Root CA with a really awesome php web frontend ;D
The problem is that phpseclib does not appear to support the "Requested Extensions" block that openssl req is showing. A quick Google search suggests that CSR's are governed by PKCS10 and that the "Requested Extensions" block is governed by PKCS9. I'll contact the author and see what can be done about addressing this.
In the mean time, a quick workaround is this:
#
#-----[ OPEN ]------------------------------------------
#
File/ASN1.php
#
#-----[ FIND ]------------------------------------------
#
return $i < $n? null: $map;
#
#-----[ REPLACE WITH ]----------------------------------
#
return $map;

Date Formatting in C++ Code Templates in Netbeans 7.1

I'm using Netbeans for my C++ programming.
Would like to create the following code template for C++ source file and header file:
/**
* Name: %<%NAME%>%.%<%EXTENSION%>%
* Author(s): %<%USER%>%
* Date: %<%DATE%>%
* Revision: 1.0
*/
Above NAME, EXTENSION, USER and DATE are default code templates provided by Netbeans. Where do I find this list in Netbeans? Also, the default result of DATE is MMM DD, YYYY format, e.g. February 29, 2012. Is it possible to customize the format to DD-MMM-YYYY (e.g. 29-Feb-2012)?
The following works for PHP, it should be the same in C++.
<?php
<#assign licenseFirst = "/** ">
<#assign licensePrefix = " * ">
<#assign licenseLast = "*---------------------------------------------------- ">
<#include "../Licenses/license-${project.license}.txt">
* ${date}
* File: ${nameAndExt}
* Encoding: ${encoding}
* Project: ${project.displayName}
*
* Author: Rob Haag :: rob#mydomain.com
*
**/
?>
Reference