Currently I have created a working peer-to-peer communication using two browsers using simple-peer.
My problem is that I need to create my own SDP file and not have it generated. So far, I have copy pasted a working SDP file (Printed when a successful call was made) and am slowly modifying it. Although, with great difficult to get it working. So far I have.
"v=0
o=- 3427781692201307364 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio data
a=msid-semantic: WMS U9yTSe3lyMtWw6tNcSvbzKK9TnxpIRxLZCbW
m=audio 36700 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 172.16.214.18
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:4150813302 1 udp 2122260223 172.16.214.18 36700 typ host generation 0 network-id 1
a=ice-ufrag:1IIc
a=ice-pwd:HwiOe9O5NcjOB/xVH5GSkiqb
a=ice-options:trickle
a=fingerprint:sha-256 76:57:AB:96:ED:1F:86:3E:AD:CF:9F:C2:D1:66:9C:8F:91:92:AF:11:EE:F8:79:38:C5:F0:87:FA:F4:31:43:3D
a=setup:active
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:0 PCMU/8000
a=ssrc:61095280 cname:0gTP3tO0LNbaJlRe
a=ssrc:61095280 msid:U9yTSe3lyMtWw6tNcSvbzKK9TnxpIRxLZCbW aec10cc7-461e-496a-87cd-9305cbb5b1f8
a=ssrc:61095280 mslabel:U9yTSe3lyMtWw6tNcSvbzKK9TnxpIRxLZCbW
a=ssrc:61095280 label:aec10cc7-461e-496a-87cd-9305cbb5b1f8
m=application 9 DTLS/SCTP 5000
c=IN IP4 0.0.0.0
b=AS:30
a=ice-ufrag:1IIc
a=ice-pwd:HwiOe9O5NcjOB/xVH5GSkiqb
a=ice-options:trickle
a=fingerprint:sha-256 76:57:AB:96:ED:1F:86:3E:AD:CF:9F:C2:D1:66:9C:8F:91:92:AF:11:EE:F8:79:38:C5:F0:87:FA:F4:31:43:3D
a=setup:active
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
"
I understand that most are not changed, and some are just ID's. But I am simply connecting peer-peer over a local network. How much of this can I simply remove? I just need to create a connection and stream RTP, I do not care if it is encrypted. What is the simplest SDP file I can create to create the connection.
https://webrtchacks.com/the-minimum-viable-sdp/ walks through the process of "compressing" the SDP if that is what you need. If you are trying to connect different machines without exchanging an offer and answer that is not possible. Nor is it possible to turn off encryption.
Related
we are using Kafka version - 2.7.1. cluster includes 5 Kafka machines on Linux RHEL 7.6 version
in order to find the brokers ids number , we can ask the zookeeper server as the following
/usr/bin/zookeeper-shell ZOO_SERVER:2181 <<< "ls /brokers/ids"
Connecting to ZOO_SERVER:2181
Welcome to ZooKeeper!
JLine support is disabled
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
[1001, 1002, 1003, 1004, 1005]
so we know from above that brokers ids are - 1001, 1002, 1003, 1004, 1005
the question that I want to ask now:
how to know the Kafka machines names that equivalent brokers id's numbers?
I know that kafka01 is broker id 1001 and kafka02 is broker id 1002 , and so on , and this we can verified from meta.properties file on which broker!
example
more meta.properties
#
#Mon Jun 21 10:41:58 UTC 2021
cluster.id=SZtPtVDBS1eTZsPRwhmnpg
version=0
broker.id=1004
** but we not want to perform ssh connection to each Kafka broker/s ( kafka01-05 ) and verify the file meta.properties
So I want to know if we can use some Kafka cli that show exactly the Kafka names that are relevant for the brokers id's
for example , expected results ( below are only example to what we want to get )
1001 --> kafka01
1002 --> kafka02
1003 --> kafka03
1004 --> kafka04
1004 --> kafka04
You can get the endpoint name by the following zookeeper command
zookeeper-shell.sh [ZK_IP] get /brokers/ids/1001
In relation to your other question
by calling zookeeper-shell.sh twice, we can get directly the broker name that is the active controller, instead of the broker id.
zookeeper-shell.sh [ZK_IP] get /brokers/ids/$(zookeeper-shell.sh [ZK_IP] get /controller|tail -1|jq .brokerid)|tail -1|jq .endpoints[]
I am trying to configure suricata in my network. When I set one HOME_NET in /etc/suricata/suricata.yml as :
HOME_NET: "[172.20.5.0/24]"
everything works fine. But when I try to define more than one pool of addresses as:
HOME_NET: "[172.20.5.0/24,172.16.0.0/16,172.20.1.0/24]"
I cannot observe any events in /var/log/suricata/log.fast.
How to properly define a few networks in HOME_NET variable?
The problem was that I was trying to ping and Home_Net(172.20.5.12) from a Home_Net(172.20.5.18). And the property External_Net was set as !$Home_Net. The rule triggering ping alert:
alert icmp $EXTERNAL_NET any -> $HOME_NET any (msg:"GPL ICMP_INFO PING
*NIX"; itype:8; content:"|10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F|"; depth:32; classtype:misc-activity; sid:2100366; rev:8;
metadata:created_at 2010_09_23, updated_at 2010_09_23;)
Alerts only from EXTERNAL_NET to HOME_NET and I was pinging from HOME_NET to HOME_NET.
To see this "internal" ping alerts you need to define EXTERNAL_NET as any.
I'm trying to install an applet on a SIM card wich supports java card V3.0.4. When I try to establish a secure channel to load the applet, the card returns an error:
mode_211
enable_trace
establish_context
card_connect
select -AID A000000151000000
Command --> 00A4040008A000000151000000
Wrapped command --> 00A4040008A000000151000000
Response <-- 6F108408A000000151000000A5049F6501FF9000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 79AA24D80FF0056101F1D9AB6DCAF0E6
-enc_key 79AA24D80FF0056101F1D9AB6DCAF0E6
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664A734806072A864886FC6B01600B06092A864886FC6B020202630906072A86488
6FC6B03640B06092A864886FC6B048000640B06092A864886FC6B040255640B06092A864886FC6B0
481079000
Command --> 8050000008F05E65BF5254BC9F00
Wrapped command --> 8050000008F05E65BF5254BC9F00
Response <-- 00005147A5190C5352322002001C1F47B6C76BABFD305EBBC2CD1BB39000
mutual_authentication() returns 0x8030F00A (The Secure Channel Protocol passed and reported do not match.)
I'm using GPShell-1.4.4. I guess the problem is using wrong key set! Am I true or there is something else I cannot guess what?!
Thanks for your response,
(I am partly reusing an answer I wrote for your previous question which you suddenly deleted)
Error code GP211_ERROR_INCONSISTENT_SCP means that GPShell's intended SCP version mismatches with the real SCP version given by the card (see here).
Check the 12th byte of card response to INITIALIZE UPDATE -- Secure Channel Protocol identifier (see e.g. GP Card Specification 2.3, section E5.1.6) and use parameter -scp.
Alternatively you might want to use GlobalPlatformPro as GPShell is quite outdated...
Beware that you can block your card by issuing multiple INITIALIZE UPDATE commands without successful authentication!
As your current question contains the complete log it is possible to parse the Card Data tag giving (according to GP 2.2.1):
66 Card Data
73 Card Recognition Data / Discretionary Data Objects
06 OID
2A864886FC6B01 {globalPlatform 1} // Card Recognition Data
60 Application Tag 0
06 OID
2A864886FC6B020202 {globalPlatform 2 2 2} // GP 2.2 Card
63 Application Tag 3
06 OID
2A864886FC6B03 {globalPlatform 3} // Card Identification Scheme
64 Application Tag 4
06 OID
2A864886FC6B048000 {globalPlatform 4 128 0x00} // SCP80 i=0x00
64 Application Tag 4
06 OID
2A864886FC6B040255 {globalPlatform 4 2 0x55} // SCP02 i=0x55
64 Application Tag 4
06 OID
2A864886FC6B048107 {globalPlatform 4 129 0x07} // SCP81 i=0x07
So you might want to use -scp 2 -scpimpl 0x55 or -scp 2 -scpimpl 85 (which happens to be the same).
Or use GlobalPlatformPro.
Alternatively -scpimpl 0x15 should work as well as the Well-known pseudo-random algorithm
(card challenge) bit in 'i' should not matter...
Good luck!
Is there any way to receive data of a specific VLAN tagged frame? Currently I am receiving all VLAN tagged frames by giving htons(0x22f0) as input to socket() function like:
m_iSocketDesc = socket(AF_PACKET, SOCK_RAW, htons(0x22f0));
numBytes = recvfrom(m_iSocketDesc, message_data, 1522, 0, NULL, 0)
I had a similar requirement. To receive packets with a specific VLAN, I created a VLAN interface and bound my raw socket to it. Now I can just send 802.3 frames, the kernel inserts/extracts VLAN tag.
Create a VLAN interface, you should have root permission
ip link add link <phyInterface> name <phyInterface.VLANID> type vlan id VLANID
Eg: ip link add link eth0 name eth0.100 type vlan 100
Use normal bind function in your application to bind to the VLAN interface. In the above example eth0.100.
You can refer to the below two links for sample code (I am NOT the owner of the code)
Sending: https://gist.github.com/austinmarton/1922600
Receiving: https://gist.github.com/austinmarton/2862515#file-recvraweth-c
The only change needed is that instead of binding to physical interface, bind to the virtual VLAN interface. Note that the Ethernet frames received are un-tagged frames. Any frames sent on this interface will automatically tagged with the VLANID.
I am new to snmp and after some readings I have 2 questions:-
1) Does net-snmp AUTOMATICALLY sends trap when we configure agent's snmpd.conf file with directives like trapsink, monitor, etc. for inbuilt OIDs like cpu and disk??
I am asking because I am trying to send a trap when cpu goes beyond 90%.
My agent and master are on the same linux box.
My snmptrad.conf file:-
authCommunity log aaa
authCommunity log public
My snmpd.conf file (removing extra comment lines):-
master agentx com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser group
notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1 view systemview
included .1.3.6.1.2.1.25.1.1 view all included .1 view mib2
included .iso.org.dod.internet.mgmt.mib-2 fc
access notConfigGroup "" any noauth exact systemview
none none
createUser internalMonitoringName SHA mysecretpassword AES rouser
internalMonitoringName iquerySecName internalMonitoringName
com2sec local localhost aaa
com2sec net-27 10.0.0.0/8 aaa
com2sec net-46 10.9.46.0/24 aaa
com2sec net-60 10.9.60.0/24 aaa
com2sec net-10 10.20.0.0/16 aaa
group MyRWGroup any local
group MyROGroup any net-27
group MyROGroup any net-46
group MyROGroup any net-60
group MyROGroup any net-10
access MyROGroup "" any noauth 0 all none none
access MyRWGroup "" any noauth 0 all mib2 mib2
syslocation "Somewhere in testlab"
syscontact Root root#localhost
dontLogTCPWrappersConnects yes
trap2sink localhost aaa
monitor -r 30 machineTooBusy hrProcessorLoad > 90
When I run some process to increase cpu load, the cpu load goes beyond 90% (I can see that in top command) but I can't see the trap message in /var/log/messages.
What I am doing wrong here?
2) Also, my next question is, if I have a custom MIB file for which I have wrtten an agent, Can I add the variable/OID from that custom MIB with "monitor" directive in snmpd.conf file to send trap AUTOMATICALLY? OR I must send trap from within my agent???
Please help on my confusion...
No, it doesn't send anything automatically. You have two steps to follow:
1) define where you want to send traps or informs. That's what the trapsink and similar lines do.
2) then define what you want sent. That's what the monitor and similar directives do. The monitor directive can be used to monitor just about anything, including your own custom MIB variables.
When you include both of these, then it'll send out traps automatically (by doing internal monitoring, and then sending a trap to each configured trapsink or other destination).